var req;
var req2;
var serviceuri = "http://"+window.location.host+"/system/Services.asmx";



function Initialize()
{
    try
    {
        req=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e)
    {
        try
        {
            req=new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(oc)
        {
            req=null;
        }
    }

    if(!req&&typeof XMLHttpRequest!="undefined")
    {
        req=new XMLHttpRequest();
    }


}

function SaveDdlState(pValue, pSessionName)
{
    Initialize();
    
    var url=serviceuri+"/SaveDdlState";

    if(req!=null)
    {
		pausecomp(2000);
        req.onreadystatechange = Process;
        req.open("POST", url, true);
        req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
        req.send('pValue='+pValue + '&pSessionName=' + pSessionName);

    }
}

function Process()
{

    if (req.readyState == 4)
        {
        }
}

function pausecomp(millis)
{
	date = new Date();
	var curDate = null;

	do { var curDate = new Date(); }
	while(curDate.getMilliseconds< millis);
} 
