

var pee = -810
var drec = 10;
var speed = 10;

//Don't touch!
var l = pee;

//Don't touch. This is the function that closes the menu
function Proj7GlideBack () {
  
	l += drec;
	
	if (document.layers) 
	{
		document.searcBar.left = l;
	}
	else if (document.all) 
	{
		document.all.searcBar.style.pixelLeft = l;
	}
	else if (document.getElementById) 
	{
		document.getElementById('searcBar').style.left = l + 'px';
	}
	if (l < 0)
		setTimeout('Proj7GlideBack()', speed);
  
}
//Don't touch. This is the function that opens the menu
function Proj7GlideOut () 
{
	l -= drec;
	if (document.layers) {
		document.searcBar.left = l;
		
	}
	else if (document.all) {
	    
		document.all.searcBar.style.pixelLeft = l;
	}
	else if (document.getElementById) {
		
		document.getElementById('searcBar').style.left = l + 'px';		
	}
	
	if (l > (pee))
			setTimeout('Proj7GlideOut()', speed);
  
}

function moveIn () 
{	
	//Proj7GlideOut();
	return false;
}


    //******************************************************************************************
    //      Help 
    //******************************************************************************************
    function helpBar(str,str1)
        {
            
        xmlHttp1=GetXmlHttpObject1();
            
        if (xmlHttp1==null) 
            {
            alert ("Your browser does not support AJAX!");
            return;
            } 
            document.all("processing_panel").style.visibility = "visible";
            document.all("processing_panel1").style.visibility = "visible";
            //alert("show");
            var url = "ajaxhelp.asp";
            url=url+"?QS="+str;
            url=url+"&QS1="+str1;
            url=url+"&id="+1;
            xmlHttp1.onreadystatechange = searchRecordHelp;
            xmlHttp1.open("GET", url, true);
            xmlHttp1.send(null);
            //alert (url);
            
        }

    function searchRecordHelp() 
        { 
            
            document.all("discription").length  = 0;
            if (xmlHttp1.readyState==4) 
            { 
                        //alert(xmlHttp1.responseText);
                
                document.all("discription").innerHTML  = xmlHttp1.responseText;
               
            
            }
            
            //document.getElementById('searcBar').style.top = 104;
            //Proj7GlideBack();
            document.all("processing_panel").style.visibility = "hidden";
            //alert("hide");
            document.all("processing_panel1").style.visibility = "hidden";
        }

        function GetXmlHttpObject1() 
        {
            var xmlHttp1= null;
            try 
            {
                xmlHttp1 = new XMLHttpRequest();
            }
            catch (e) 
            {
                try 
                {
                    xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e)
                    {
                        xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
                    }
            }
        return xmlHttp1;
        }
        
        
        
        
        
        
        function helpBar2(str,str1)
        {
            
        xmlHttp2=GetXmlHttpObject2();
            
        if (xmlHttp2==null) 
            {
            alert ("Your browser does not support AJAX!");
            return;
            } 
            document.all("processing_panel2").style.visibility = "visible";
            
            //alert("show");
            var url = "ajaxhelp.asp";
            url=url+"?QS="+str;
            url=url+"&QS1="+str1;
            url=url+"&id="+1;
            xmlHttp2.onreadystatechange = searchRecordHelp2;
            xmlHttp2.open("GET", url, true);
            xmlHttp2.send(null);
            //alert (url);
            
        }

    function searchRecordHelp2() 
        { 
            
            document.all("discription").length  = 0;
            if (xmlHttp2.readyState==4) 
            { 
                        //alert(xmlHttp1.responseText);
                
                document.all("discription").innerHTML  = xmlHttp1.responseText;
               
            
            }
            
            //document.getElementById('searcBar').style.top = 104;
            //Proj7GlideBack();
            //document.all("processing_panel2").style.visibility = "hidden";
            //alert("hide");
            
        }

        function GetXmlHttpObject2() 
        {
            var xmlHttp2= null;
            try 
            {
                xmlHttp2 = new XMLHttpRequest();
            }
            catch (e) 
            {
                try 
                {
                    xmlHttp2 = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e)
                    {
                        xmlHttp2 = new ActiveXObject("Microsoft.XMLHTTP");
                    }
            }
        return xmlHttp2;
        }
        
         function GetXmlHttpObjects() 
        {
            var xmlHttps= null;
            try 
            {
                xmlHttps = new XMLHttpRequest();
            }
            catch (e) 
            {
                try 
                {
                    xmlHttps = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e)
                    {
                        xmlHttps = new ActiveXObject("Microsoft.XMLHTTP");
                    }
            }
        return xmlHttps;
        }
        
function saveOfficesCountry(hCountryRemove,hCountryAdd,hOfficesAdd,hOfficesRemove,temp)
{
    
    var xmlHttps;
    //alert(hCountryRemove);
//    alert(hCountryAdd)
//    alert(hOfficesRemove)
//    alert(hOfficesAdd)
    xmlHttps = GetXmlHttpObjects();
   
    if (xmlHttps==null) 
    {
        alert ("Your browser does not support AJAX!");
        return;
    }//end if
    
    var url = "SaveOfficeCountry.asp";
    url = url + "?hCountryRemove=" + hCountryRemove;
    url = url + "&hCountryAdd=" + hCountryAdd;
    url = url + "&hOfficesAdd=" + hOfficesAdd;
    url = url + "&hOfficesRemove=" + hOfficesRemove
    url = url + "&temp=" + "|" + temp; 
    //alert(url);
    //debugger;
    
    //document.all("forqs").value = url;.
    //alert(url);
    //window.open(url, 'savingSession')
    window.location.href = url;
//    xmlHttps.onreadystatechange = printvalues(xmlHttps);
//    xmlHttps.open("GET", url, true);
//    xmlHttps.send(null);
}//end function

function printvalues(xmlHttps)
{
    alert(xmlHttps.readyState)    
    if (xmlHttps.readyState==4) 
    {
        arlet('asdfdsf')
    }
}