// this script will populate the div in htm pages

function getDivObj(name)
 {
	if (document.getElementById)
	 {
		this.obj = document.getElementById(name); 
	 }
	else if (document.all)
	 {
	    this.obj = document.all[name];
	 }
	else if (document.layers)
	 {
	    this.obj = document.layers[name];	
	 }
}// function over



function createRequestObject()
 {
   	var xmlhttp;
	if (window.XMLHttpRequest)
	 { 
	    xmlhttp = new XMLHttpRequest();
	 }
	else if (window.ActiveXObject)
	 {
	    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	 } 
	return  xmlhttp;
 }// function over



function populateDiv()
{
   
   xmlHttpObj1=createRequestObject();
   
   if (xmlHttpObj1==null)
    {
      alert ("Your browser does not support AJAX!");
      return;
    } 
  
   
  var url1="/content/fo/foTrdStat_temp.htm?time="+ new Date();
  // alert("inside function & symbol is----"); 
   //var url1="templt_grph_lnk_"+symbol+".htm";
   xmlHttpObj1.onreadystatechange=function()
   {
      if(xmlHttpObj1.readyState == 4 || xmlHttpObj1.readyState == "complete") 
	   {  
	     if (xmlHttpObj1.status == 200 ) 
	      {
		    var s=xmlHttpObj1.responseText;
		    //alert("rrererrer"+s);
	        divBoxObj = new getDivObj('trade_stat');
            divBoxObj.obj.innerHTML=xmlHttpObj1.responseText;
	      }
      } 
   }
 //alert("inside function & symbol is----");
 xmlHttpObj1.open("GET",url1,true);
 xmlHttpObj1.send(null);



}// fun populateDiv over

