/* Font Size */
function scaleFont(val) {
	var fontSize = parseInt(getFontCookie());

	var content, lineHeight; 
	content = document.getElementById("egn_cont"); 
	
	if (val > 0) { 
		if (fontSize <= 14) { 
			fontSize = fontSize + val; 
			lineHeight = fontSize+Math.round(1.1*fontSize); 
			content.style.fontSize = fontSize + "pt"; 
		} 
	} 
	else { 
		if (fontSize > 8) { 
			fontSize = fontSize + val; 
			lineHeight = fontSize+Math.round(1.1*fontSize); 
			content.style.fontSize = fontSize + "pt"; 
		} 
	} 

	var mydate = new Date; 
	mydate.setDate(mydate.getDate()+1000); 
	setFCookie("egn_fontSize", fontSize, mydate); 
}

function getFontCookie() 
{ 
	var cookie = getFCookie("egn_fontSize"); 
	if ( cookie == null ) return 13; 
	if ( cookie.length ) return cookie; 
	else return 13; 
}

function getFCookie(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){ var end = document.cookie.indexOf(";",j); if(end == -1) end = document.cookie.length; return unescape(document.cookie.substring(j,end)); } i=document.cookie.indexOf(" ",i)+1; if (i==0) break; } return null; }
function setFCookie(name,value,expires) { 
	document.cookie = name + "="+ escape(value) +"; path=/; expires=" + expires.toGMTString() + ";"
}

function setFontSize(){
	fontSize = parseInt(getFontCookie());
	var content; 
	content = document.getElementById("egn_cont"); 
	content.style.fontSize = fontSize + "pt";
}


function Print(seq,menu){
	var print = window.open("/Print.asp?seq="+seq+"&m="+menu,"egnprint","width=650,height=600,scrollbars=yes,resizable=no");
	print.focus();
}

function MPPrint(newsid,menu){
	var print = window.open("/MPPrint.asp?newsid="+newsid+"&m="+menu,"egnprint","width=650,height=600,scrollbars=yes,resizable=no");
	print.focus();
}

function reloadPage(goPage){
	document.list.page.value=goPage;
	document.list.submit();
}

function goList(listvalue){
	//document.list.listtype.value = document.getElementById("listtype").value;
	document.list.listtype.value = listvalue;
	document.list.submit();
}
