
var callObj = null;
var callCount = 0;

var is_ie = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0; 
var is_ie5 = (navigator.appVersion.indexOf("MSIE 5.5")!=-1) ? 1 : 0; 



function CallServer(pCalling,pContainer)
{
  callCount++;

  if (is_ie)
  {       
    var strObjName = "";
    
    if (is_ie5)
      strObjName = "Microsoft.XMLHTTP";
    else
      strObjName = "Msxml2.XMLHTTP";
           
    try
    { 
      objXmlHttp = new ActiveXObject(strObjName); 
      objXmlHttp.onreadystatechange = function()
      {
        if (objXmlHttp.readyState == 4 || objXmlHttp.readyState == "complete") 
        {
        	// Return //
        	document.getElementById(pContainer).innerHTML = objXmlHttp.responseText;
        }
        else
        {
        	// Loading //
        }
      }
      objXmlHttp.open('GET', pCalling, true); 
      objXmlHttp.send(null); 		 
    } 
    catch(e)
    { 
  //		alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled'); 
      return; 
    }    
  }
  else
  { 
    // Mozilla | Netscape | Safari | ... //
    objXmlHttp = new XMLHttpRequest(); 
    objXmlHttp.onload = function()
    {
      if (objXmlHttp.readyState == 4 || objXmlHttp.readyState == "complete") 
      {
       	// Return //
       	document.getElementById(pContainer).innerHTML = objXmlHttp.responseText;
      }
      else
      {
       	// Loading //
      }
    }
    
    objXmlHttp.onerror = function()
    {
      if (objXmlHttp.readyState == 4 || objXmlHttp.readyState == "complete") 
      {
       	// Return //
       	document.getElementById(pContainer).innerHTML = objXmlHttp.responseText;
      }
      else
      {
       	// Loading //
      }
    }
                    
    objXmlHttp.open('GET', pCalling, true); 
    objXmlHttp.send(null); 		 
  }        
}


function getFlashMovie(movieName) 
{   
	var isIE = navigator.appName.indexOf("Microsoft") != -1;   
	return (isIE) ? window[movieName] : document[movieName];  
}  

function setFlashText(pId,pValue) 
{   
	try
	{
		getFlashMovie(pId).sendTextToFlash(pValue);     
	}
	catch(e)
	{
		
	}
}    


