//AJAX OPERATION
var CSShttp;
function SetStyle(ColorStyle, TextStyle)
{	qstr="";
	
	if(TextStyle!="")
	{	if(qstr!="")
			qstr+="&";
		qstr+="TextStyle="+TextStyle;
		CurTextStyle=TextStyle;
	}
	if(ColorStyle!="")
	{	if(qstr!="")
			qstr+="&";
		qstr+="ColorStyle="+ColorStyle;
		CurColorStyle=ColorStyle;
	}
	
	url="SetStyle.asp?"+qstr;
	
	if (window.XMLHttpRequest)//  Mozilla, etc.
	  {
		  CSShttp=new XMLHttpRequest();
		  CSShttp.onreadystatechange=onCSSLoad;
		  CSShttp.open("GET",url,true);
		  CSShttp.send(null);
	  }
	else if (window.ActiveXObject)// IE
	  {
	  	CSShttp=new ActiveXObject("Microsoft.XMLHTTP");
		if (CSShttp)
		{
			CSShttp.onreadystatechange=onCSSLoad;
			CSShttp.open("GET",url,true);
			CSShttp.send();
		}
	  }
}
function onCSSLoad()
{
	if (CSShttp.readyState==4)// load complete
	{
		if (CSShttp.status==200)
		{	
			eval(CSShttp.responseText);
			if(Res>0)
			{
				window.location.reload();
				//document.getElementById("CSSStyle").href="css/style_"+ CurColorStyle +"_"+ CurTextStyle +".css";
			}
		}
		else
		{
			return null; // Error Occured
		}
	}
}
