<!--

/* include */
function incdata(path){
	document.write('<style type="text/css">@import url( '+path+'common/css/style.css );</style>');
	document.write('<script type="text/javascript" src="'+path+'common/js/scrolling.js"></script>');
	document.write('<script type="text/javascript" src="'+path+'common/js/common.js"></script>');
}

/* windowOpen */
function WinOpen(theURL,winName,features) {
	window.open(theURL,winName,features);
}
function Win_Open(url,name,x,y) {
	if( navigator.appVersion.indexOf("Mac",0)!= -1)
	{
		if(document.all)
		{
			x = eval(x) + 10;
			subWin = window.open(url,name,'width=' + x + ',height=' + y + ',toolbar=1,location=0,directories=0,status=1,resizable=1,scrollbars=1');
		}
		else if(document.layers)
		{
			x = eval(x) + 22;
			subWin = window.open(url,name,'width=' + x + ',height=' + y + ',toolbar=1,location=0,directories=0,status=1,resizable=1,scrollbars=1');
			subWin.focus();
		}
		else
		{
			x = eval(x) + 15;
			subWin = window.open(url,name,'width=' + x + ',height=' + y + ',toolbar=1,location=0,directories=0,status=1,resizable=1,scrollbars=1');
			subWin.focus();
		}
	}
	else
	{
		if(document.all)
		{
			x = eval(x) + 22;
			y = eval(y) + 10;
			subWin = window.open(url,name,'width=' + x + ',height=' + y + ',toolbar=1,location=0,directories=0,status=1,resizable=1,scrollbars=1');
		}
		else if(document.layers)
		{
			x = eval(x) + 15;
			y = eval(y) + 10;
			subWin = window.open(url,name,'width=' + x + ',height=' + y + ',toolbar=1,location=0,directories=0,status=1,resizable=1,scrollbars=1');
			subWin.focus();
		}
		else
		{
			x = eval(x) + 20;
			subWin = window.open(url,name,'width=' + x + ',height=' + y + ',toolbar=1,location=0,directories=0,status=1,resizable=1,scrollbars=1');
			subWin.focus();
		}
	}
}


/* setCookie */
function setCookie(keyname,val){
	expTime = new Date( );
	expTime.setFullYear(expTime.getFullYear( ) + 1);
	expTime = expTime.toGMTString( );
	
	tmp = keyname + "=" + val + ";";
	tmp += "expires=" + expTime + ";";
	tmp += "path=/;";
	document.cookie = tmp;
}

/* getCookie */
function getCookie(keyname){
	tmp = document.cookie + ";";
	index1 = tmp.indexOf(keyname,0);
	if (index1 !=-1){
	tmp = tmp.substring(index1,tmp.length);
	index2 = tmp.indexOf("=",0) + 1;
	index3 = tmp.indexOf(";",index2);
	return(unescape(tmp.substring(index2,index3)));
	}
	return("");
}

/* fontsize */
function changeStyleSheet(title) {
	var i, main;
	main = document.getElementsByTagName("link");
	for(i=0; i<main.length; i++) {
		if(main[i].getAttribute("rel").indexOf("style") != -1 && main[i].getAttribute("title")) {
			main[i].disabled = true;
			if(main[i].getAttribute("title") == title){
				 main[i].disabled = false;
			}
		}
	}
	setCookie("fontsize",title);
}

var fontsize = getCookie("fontsize");
if (!fontsize.match(/^(small|medium|large)$/)){
    fontsize = "medium";
}
changeStyleSheet(fontsize);
//-->
