<!--

function showLinks() {
	document.write('<p class="padTop">Change font size:');
	document.write(' <a href="#" onclick="ChangeStyleSheet(\'new_style\');return false;" style="font-size:100%;font-weight:bold;" title="Small">A<\/a>');
	document.write(' <a href="#" onclick="ChangeStyleSheet(\'large_style\');return false;" style="font-size:125%;font-weight:bold;" title="Large">A<\/a>');
	document.write(' <a href="#" onclick="ChangeStyleSheet(\'larger_style\');return false;" style="font-size:150%;font-weight:bold;" title="Larger">A<\/a><\/p>');
}

function SetCookie(name,value) {
	var theCookie = name + "=";
	theCookie = theCookie + escape(value);
	document.cookie = theCookie;
}

function GetCookieVal(offset) {
	var endstr = document.cookie.indexOf (";",offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset,endstr));
}

function GetACookie(name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	
	while(i < clen)
	{
	var j = i + alen;
		if (document.cookie.substring(i,j) == arg)
		{
		 return GetCookieVal(j);
		}
	i = document.cookie.indexOf(" ", i) + 1;
		if(i == 0) break;
		}
	return null;
}

function ChangeStyleSheet(sStyleSheet,sPath) {
	
	var sDirPath;
	
	if (sPath == null) {
		sDirPath = "";
	} else {
		sDirPath = sPath
	}		
	
	SetCookie('dsc_fontsize',sStyleSheet);
	sStyleSheet = 'scripts/' + sStyleSheet + '.css';
	sStyleSheet = sDirPath + sStyleSheet;
	
	document.getElementById('cssHolder').setAttribute('href',sStyleSheet);	
}

function SetCurrentStyleSheet(sPath) {
	
	var sStyleSheet;	
	(document.cookie.indexOf("dsc_fontsize")!=-1)?cookieEnabled=true:cookieEnabled=false;
	
	//default
	sStyleSheet = 'new_style';
	
	if (cookieEnabled) {
		sStyleSheet = GetACookie('dsc_fontsize');
	}
	ChangeStyleSheet(sStyleSheet,sPath);
}

//-->
