var sz=100;
var flg=1;
function chg(clr)
{
	if(clr==1)
	{
		setCookie('clrstatus',clr,365)
		document.body.style.background="#FFFFFF"
		document.getElementById("topLinks").className="colorBlue"
		document.getElementById("container").className="colorBlue"				
		document.getElementById("sep").className="colorBlue"
		if (document.getElementById("navigation")) {
		document.getElementById("navigation").className="colorBlue"
		}
		if (document.getElementById("fntClrW")) {
		document.getElementById("fntClrW").className="colorBlue"
		}
		document.getElementById("pie").className="colorBlue"								
	}
	else if(clr==2)
	{
		setCookie('clrstatus',clr,365)
		document.body.style.background="#FFE6B5"
		document.getElementById("topLinks").className="colorBlack"
		document.getElementById("container").className="colorBlack"				
		document.getElementById("sep").className="colorBlack"
		if (document.getElementById("navigation")) {		
		document.getElementById("navigation").className="colorBlack"
		}
		if (document.getElementById("fntClrW")) {		
		document.getElementById("fntClrW").className="colorBlack"
		}
		document.getElementById("pie").className="colorBlack"								
	}
	else if(clr==3)
	{
		setCookie('clrstatus',clr,365)
		document.body.style.background="#000000"
		document.getElementById("topLinks").className="colorWhite"
		document.getElementById("container").className="colorWhite"		
		document.getElementById("sep").className="colorWhite"
		if (document.getElementById("navigation")) {
			document.getElementById("navigation").className="colorWhite"
		}
		if (document.getElementById("fntClrW")) {
			document.getElementById("fntClrW").className="colorWhite"
		}
		document.getElementById("pie").className="colorWhite"								
	}
}
function chg1(no)
{
	sz=getCookie('fntstatus');
	if(no==2 && sz <=130)
	{
		sz=Number(sz)+10;
		document.getElementById("wrapper").style.fontSize=sz+"%";
		document.getElementById("overDiv").style.fontSize=sz+"%";
		flg++;
		setCookie('fntstatus',sz,365);
	}
	if(no==1 && sz >100)
	{
		sz=Number(sz)-10;
		document.getElementById("wrapper").style.fontSize=sz+"%";
		document.getElementById("overDiv").style.fontSize=sz+"%";
		flg--;
		setCookie('fntstatus',sz,365);
	}
}
function chgfnt(no)
{
	document.getElementById("wrapper").style.fontSize=no+"%";
	document.getElementById("overDiv").style.fontSize=no+"%";
}
function cgg()
{
	document.fgColor='#FF0000';
}
function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1)
		{ 
			c_start=c_start + c_name.length+1; 
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}

function setCookie(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function checkCookie()
{
	clrstatus=getCookie('clrstatus');
	fntstatus=getCookie('fntstatus');
	if (clrstatus!=null && clrstatus!="")
	{
		chg(clrstatus);
	}
	if (fntstatus!=null && fntstatus!="")
	{
		chgfnt(fntstatus);
	}
	else 
	{
		clrstatus=1;
		fntstatus=100;
		if (clrstatus!=null && clrstatus!="")
		{
			setCookie('clrstatus',clrstatus,365);
		}
		if (fntstatus!=null && fntstatus!="")
		{
			setCookie('fntstatus',fntstatus,365);
		}
	}
}

