/*
This file is used for calling a web page dynamically and getting the contents of that
page in the div id specified by specifying placetextin as div id.

Any page is called by taking the following action:
htmlData(The url of the page from which data is to be taken with query string);
*/
var placetextin="";
function GetXmlHttpObject(handler)
{
   var objXMLHttp=null
   if (window.XMLHttpRequest)
   {
       objXMLHttp=new XMLHttpRequest()
   }
   else if (window.ActiveXObject)
   {
       objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
   }
   return objXMLHttp
}

function stateChanged()
{
   if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   {
//var wopts  = "width=450,height=300,resizable=0, navigation bar=0";
           //document.getElementById(placetextin).innerHTML= xmlHttp.responseText;
		//  selwindow = window.open("a.html");
	 //selwindow.document.getElementById("ab").innerHtml=xmlHttp.responseText;
		// selwindow.document.write(xmlHttp.responseText);
		 //alert(xmlHttp.responseText)
document.write(xmlHttp.responseText);
   }

   else {
           //alert(xmlHttp.status);
   }
}

// Will populate data based on input
function htmlData(url)
{
   if (url.length==0)
   {
       //document.getElementById(placetextin).innerHTML="";
       return;
   }
   xmlHttp=GetXmlHttpObject()
   if (xmlHttp==null)
   {
       alert ("Browser does not support HTTP Request");
       return;
   }

   url=url;
   xmlHttp.onreadystatechange=stateChanged;
   xmlHttp.open("GET",url,true) ;
   xmlHttp.send(null);
}
