/* This script is used to set theme	*/

var xmlhttp;

function loadcss(csspath)
{
	var theme = document.getElementById("theme");
	theme.setAttribute("href", csspath);
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null)
  	{
  		alert ("Your browser does not support XMLHTTP!");
  		return;
	}
	var url="/settheme.php?"+"SetTheme="+csspath+"&sid="+Math.random();		//ampersand and math.random is necessary
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
