<!-- 
var lr_Browser = new Object();
lr_Browser.isMozilla = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined') && (typeof HTMLDocument!='undefined');
lr_Browser.isIE = window.ActiveXObject ? true : false;
lr_Browser.isOpera = (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);


//Browser Support Code
function ajaxFunction(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		var loading='<span style="background-color:#000;color:#FFF">&nbsp;Loading...&nbsp;</span><br /><br />';
		
		switch (ajaxRequest.readyState) {
			case 0: document.getElementById("print_message").innerHTML = loading; break; 
			case 1: document.getElementById("print_message").innerHTML = loading; break; 
			case 2: document.getElementById("print_message").innerHTML = loading; break; 
			case 3: document.getElementById("print_message").innerHTML = loading; break; 
			case 4: document.getElementById("print_message").innerHTML = ajaxRequest.responseText; document.myForm.reset();
		}//end of switch statement
	}//end of function ajaxRequest.onreadystatechange

	//assigning content of the form ob variables
	var personal_name = document.getElementById("personal_name").value;
	var company_name = document.getElementById("company_name").value;
	var email = document.getElementById("email").value;
	var message = document.getElementById("message").value;

	//this variable holds all the 
	var str = "personal_name="+personal_name+"&company_name="+company_name+"&email="+email+"&message="+message+"";
	ajaxRequest.open("POST", "send_message.php", true);
	ajaxRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
	ajaxRequest.send(str); 
}

// this makes the tooltip appear onfocus
function tooltip_on(uid, message, s1, s2) {
    o = document.getElementById(uid);
    o.innerHTML = unescape(message);
    o.style.height = s1 + 'px';
    if (lr_Browser.isIE) o.style.height = s2 + 'px';
    o.style.display = 'block';
}

//  this makes the tooltip disappear onblur
function tooltip_off(uid) {
    o = document.getElementById(uid);
    o.style.display = 'none';
}

// this makes input field background on
function background_on(o) {
    o.style.backgroundColor = '#E2FFE4';
}


// this makes input field background off
function background_off(o) {
    o.style.backgroundColor = '#FFF';
}


//-->
