///Module two

var xmlHttppoll
function fn_pollsetting(reur){
	xmlHttppoll=GetXmlHttpObject();
	if (xmlHttppoll==null)	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  } 
	if(reur == 'hotpoll') {
		document.getElementById(reur).style.backgroundImage = "";
		document.getElementById("business").style.backgroundImage = "url(/themes/images/subhead.jpg)";
		document.getElementById("oss").style.backgroundImage = "url(/themes/images/subhead.jpg)";
	}
	if(reur == 'business') {
		document.getElementById(reur).style.backgroundImage = "";
		document.getElementById("hotpoll").style.backgroundImage = "url(/themes/images/subhead.jpg)";
		document.getElementById("oss").style.backgroundImage = "url(/themes/images/subhead.jpg)";
	}
	if(reur == 'oss') {
		document.getElementById(reur).style.backgroundImage = "";
		document.getElementById("hotpoll").style.backgroundImage = "url(/themes/images/subhead.jpg)";
		document.getElementById("business").style.backgroundImage = "url(/themes/images/subhead.jpg)";
	}

	var url="/modules/homebox/"+reur+".php";
        if(reur == 'hotpoll')
		document.getElementById("pollaccount").innerHTML= '<iframe src="'+url+'" id="secondbox" scrolling="no" frameborder="0" style="width: 240px; height: 470px;"></iframe>';
	else {
	xmlHttppoll.onreadystatechange=stateChanged3;
	xmlHttppoll.open("GET",url,true);
	xmlHttppoll.send(null);
	}
}

function stateChanged3(){
	if (xmlHttppoll.readyState==4){ 

		document.getElementById("pollaccount").innerHTML=xmlHttppoll.responseText;
	}
}

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



