//Create a boolean variable to check for a valid ie instance
var xmlhttp = false;

//Check if we are using ie
try {
    //if the javascript version is greater than 5
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e) {
    //if not then use the older activex object
    try {
        //if we are using ie
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(E) {
        //we must be using a non ie browser
        xmlhttp = false;
    }
}

//if we are using a non ie browser, create a javascript instance of the object
if(!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    xmlhttp = new XMLHttpRequest();
}

function makerequest(serverPage, objID) {
    var obj = document.getElementById(objID);
    xmlhttp.open("GET", serverPage);
    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            obj.innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.send(null);
}

// Email functions

function clearText(obj) {
    if(obj.innerHTML == "Please Enter Your Message Here.") {
        obj.innerHTML = "";
    }    
}

function clearInput(obj) {
	if(obj.value == "Please Enter Your Email Address Here...") {
		obj.value = "";
	}
}

/*function subtractChars(obj) {
    var maxChars = document.getElementById("charsLeft")
}*/

