//Browser Support Code 

    var xmlhttp = false;  // The variable that makes Ajax possible! 
     
    try{ 
		//If javascript version is greater than 5
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		//alert ("you are using IE");         
    } catch (e){ 
        // If not, use the older active x object
        try{ 
		// If you are using IE
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			//alert ("you are using IE (2)");
        } catch (E) {            
			// Else we must be using a non-IE browser
			xmlhttp = false;
			//alert ("you are using a non-IE brower");
        } 
    } 
	
//If you are using a non-IE brower, create a javascript instace of the object
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined'){
		xmlhttp = new XMLHttpRequest();
		//alert ("You are not using Microsoft Internet Explorer");
	}
	
function makerequest(serverPage, objID, e){

	
	var obj = document.getElementById(objID);
	obj.style.visibility = "visible";
		obj.style.height = "120px";
		obj.style.width = "300px";
	
	
 	
	var posx = 0;
	var posy = 0;
	
	posx = e.clientX + document.body.scrollLeft;
	posy = e.clientY + document.body.scrollTop;
	apDiv1.style.left = (posx - 350) + "px";
	apDiv1.style.top = (posy - 200) + "px";


	
		
	xmlhttp.open("GET", serverPage);

	xmlhttp.onreadystatechange = function(){

		if (xmlhttp.readyState == 4 && xmlhttp.status == 200){

			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
	
}

function makerequest2(serverPage, objID, e){

	
	var obj = document.getElementById(objID);
	obj.style.visibility = "visible";
		obj.style.height = "120px";
		obj.style.width = "300px";
	
	var posx = 0;
	var posy = 0;
	
	posx = e.clientX + document.body.scrollLeft;
	posy = e.clientY + document.body.scrollTop;
	apDiv1.style.left = (posx - 350) + "px";
	apDiv1.style.top = (posy - 20) + "px";


	
		
	xmlhttp.open("GET", serverPage);

	xmlhttp.onreadystatechange = function(){

		if (xmlhttp.readyState == 4 && xmlhttp.status == 200){

			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
	
}

function hidePrices (objID){
		tObj = document.getElementById(objID);
		tObj.style.visibility = "hidden";
		tObj.style.height = "0px";
		tObj.style.width = "0px";
}

var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function AssignPosition(d) {
if(self.pageYOffset) {
	rX = self.pageXOffset;
	rY = self.pageYOffset;
	}
else if(document.documentElement && document.documentElement.scrollTop) {
	rX = document.documentElement.scrollLeft;
	rY = document.documentElement.scrollTop;
	}
else if(document.body) {
	rX = document.body.scrollLeft;
	rY = document.body.scrollTop;
	}
if(document.all) {
	cX += rX; 
	cY += rY;
	}
d.style.left = (cX-300) + "px";
d.style.top = (cY-200) + "px";
}
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d, serverPage) {
	var obj = document.getElementById(d);
	obj.style.visibility = "visible";	
	
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
xmlhttp.open("GET", serverPage);

xmlhttp.onreadystatechange = function(){

	if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
		obj.innerHTML = xmlhttp.responseText;
	}
}
xmlhttp.send(null);
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
if(dd.style.display == "none") { dd.style.display = "block"; }
else { dd.style.display = "none"; }
}
