﻿var xmlHttp;
var myLng="en-US";
var now = new Date();
var num = now.getSeconds();
myxmlhttp();
if (navigator.appName.indexOf("Netscape")>=0)
{
    xmlHttp.onload=CallBack;
}
else
{
    xmlHttp.onreadystatechange=CallBack;
}
xmlHttp.open("GET","/AjaxMethod.aspx?rMyLng=x&num=" + num,false);
xmlHttp.send(null);
function CallBack()
{
    if(xmlHttp.readyState == 4)
    {
        if(xmlHttp.status == 200 )
        {	
            if(xmlHttp.responseText!='')
            {					
	          myLng=xmlHttp.responseText;		                   	            						
            }                       
        }
     }
}

function myxmlhttp()
{	
//    if (navigator.appName.indexOf("Netscape")>=0)
//    {
//        xmlHttp = new XMLHttpRequest();
//    }
//    // Microsoft Internet Explorer // Netscape
	try
	{
		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try
		{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e2)
		{
			if (typeof XMLHttpRequest != 'undefined')
			{
				xmlHttp = new XMLHttpRequest();
			}			
		}
	}	
}
function mytrim(strtxt)
{
	while(strtxt.indexOf(' ')>=0)
	{
		strtxt=strtxt.replace(' ','');
	}
	return strtxt;
}
