var xmlHttp

function get_qouts()
{ 
	
    xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	
	if(path){
	var url=path+"cache/quotes.html"
     }else{
     var url="cache/quotes.html"
     }
	url=url+"?sid="+Math.random()
	
	xmlHttp.onreadystatechange=stateChangeds_quots
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	}
	


function stateChangeds_quots() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 document.getElementById("Rates").innerHTML=xmlHttp.responseText
	 if(path){
	 setTimeout("get_qouts('"+path+"');", 3000);
	 }else{
	 	setTimeout("get_qouts();", 3000);
	 }
	 } 
	return;
}

function stateChange_password() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 alert(xmlHttp.responseText)
	 }
	return;
}
function PasswordRecovery()
{
	pass=document.getElementById('username').value;
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	 
	var url="parts/ajax/passreco.php?mcheck="+pass+"&sid="+Math.random()
	
	xmlHttp.onreadystatechange=stateChange_password
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	

}
function get_qouts_en_ar()
{ 
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	
	
	if(path){
	var url=path+"cache/quotes.html"
     }else{
     var url="cache/quotes.html"
     }
	url=url+"?sid="+Math.random()
	
	xmlHttp.onreadystatechange=stateChangeds_quots_en_ar
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChangeds_quots_en_ar() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 	
		 document.getElementById("measurecontent").innerHTML=xmlHttp.responseText;
		 cl=1;
		 for(i=0;i<quotesview.length;i++){
		 	
		 	
		 	
		 	
		 	//clN='measurerowsecond';
		 	if(document.getElementById(quotesview[i]+'1')){
		 		if(cl==1){
		 		clN='measurerowfirst';
		 		cl=2;
		 	}else{
		 		clN='measurerowsecond';
		 		cl=1;
		 	}
		 	document.getElementById(quotesview[i]+'1').className=clN;
		 	//alert(document.getElementById(quotesview[i]+'1').className)
		 	document.getElementById(quotesview[i]+'1').style.display='block';
		 	}
		 }
		/* if(document.getElementById('EURILS1') && langs!='2')
		 {
		 	
		 	document.getElementById('EURILS1').style.display='none';
		 	document.getElementById('USDILS1').style.display='none';
		 }
		 
		 if(document.getElementById('USDTRY1') && langs!='5')
		 {
		 	
		 	document.getElementById('USDTRY1').style.display='none';
		 	document.getElementById('EURTRY1').style.display='none';
		 }*/
		 if(autoref=='1'){
		 if(path){
		 setTimeout("get_qouts_en_ar('"+path+"');", 3000);
		 }else{
		 setTimeout("get_qouts_en_ar();", 3000);
		 }
		 }
	 } 
	return;
}



function GetXmlHttpObject()
{
var xmlHttp=null;

try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
 
return xmlHttp;
}

