﻿var xmlHttp2
function getDiv(str)
{ 
	xmlHttp2=GetXmlHttpObject2();
	if (xmlHttp2==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
  	} 
	var url="Ajx.asp";
	url=url+"?gdiv=fback";
	xmlHttp2.onreadystatechange=stateChanged2;
	xmlHttp2.open("GET",url,true);
	xmlHttp2.send(null);
}
function stateChanged2() 
{ 
	if (xmlHttp2.readyState==4)	{ 
		document.getElementById('displaybox').style.height = '';
		if(document.getElementById('displaybox').style.display == 'none'){
			document.getElementById('displaybox').style.display = '';
			document.getElementById('displaybox').innerHTML = xmlHttp2.responseText;
			document.getElementById('displaybox').style.height = '100%';
			document.getElementById('displaybox').style.position = 'fixed'; 
			}
		}
		else{
		document.getElementById("displaybox").style.display = "none";
		document.getElementById("displaybox").innerHTML = '';
		document.getElementById("displaybox").style.height = "0px";
		document.getElementById("displaybox").style.position = "";
	}
	return false;
	}
function GetXmlHttpObject2()
	{
		var xmlHttp2=null;
		try
		{
			// Firefox, Opera 8.0+, Safari
			xmlHttp2=new XMLHttpRequest();
		  }
		catch (e)
		{
			// Internet Explorer
		try
	    {
		    xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
	    {
		    xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
	    }
	}
return xmlHttp2;
}
