function onwdw(link)
{
	window.open(link, '_blank', '');
	return false;
}
function getCookie( name ) 
{
	var start = document.cookie.indexOf( name + "=" );  
	var len = start + name.length + 1;   
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) 
	{
		return null;
	}
	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ';', len );
	if ( end == -1 ) end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}

function setCookie(name, value, expires) 
{
	document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString());
} 

var exp = new Date();    
exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 30));    

function setActivestyleSheet(pTitle, pWidth) 
{
	var vLoop, vLink;
	for(vLoop=0; (vLink = document.getElementsByTagName("link")[vLoop]); vLoop++)
	{
		if(vLink.getAttribute("rel").indexOf("style")!= -1 && vLink.getAttribute("title")) 
		{
			vLink.disabled = true;
			if(vLink.getAttribute("title") == pTitle || vLink.getAttribute("title") == pWidth)
				vLink.disabled = false;
		}
	}
}

function ChennaigsmStyle(pTitle)
{ 
    pTitle = pTitle;
	setActivestyleSheet(pTitle, pWidth)
	setCookie("mysheet",pTitle, exp);     
}
function ChennaigsmWidth()
{ 
    pWidth = (pWidth=='fix-theme'?'none':'fix-theme');
	setActivestyleSheet(pTitle, pWidth)
	setCookie("mywidth",pWidth, exp);     
}

var pTitle=getCookie("mysheet")
var pWidth=getCookie("mywidth")
setActivestyleSheet(pTitle, pWidth)



