var xmlHttp
function fn_usersetting(reurl){
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	if(reurl == 'login') {
		document.getElementById(reurl).style.backgroundImage = "";
		document.getElementById("profile").style.backgroundImage = "url(/themes/images/subhead.jpg)";
		document.getElementById("settings").style.backgroundImage = "url(/themes/images/subhead.jpg)";
	}
	if(reurl == 'profile') {
		document.getElementById(reurl).style.backgroundImage = "";
		document.getElementById("login").style.backgroundImage = "url(/themes/images/subhead.jpg)";
		document.getElementById("settings").style.backgroundImage = "url(/themes/images/subhead.jpg)";
	}
	if(reurl == 'settings') {
		document.getElementById(reurl).style.backgroundImage = "";
		document.getElementById("profile").style.backgroundImage = "url(/themes/images/subhead.jpg)";
		document.getElementById("login").style.backgroundImage = "url(/themes/images/subhead.jpg)";
	}

	var url="http://www.opinionpoll.in/modules/homebox/"+reurl+".php";
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged(){
	if (xmlHttp.readyState==4){ 
		document.getElementById("uaccount").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject(){
	var xmlHttp=null;
	try  {
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
	  try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	  }
	  catch (e){
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	}
	return xmlHttp;
}



