function NewWindow(w,h,url){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars'
	win = window.open(url, "PopUp", winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
//return false;
}

function NewGallery(url){
var w = 780;
var h = 530;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars'
	win = window.open(url, "PopUp", winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
//return false;
}

//var font_size = 11;
if (getCookie("dynfontsize") != null){
	var font_size = parseInt(getCookie("dynfontsize"));
} else {
	var font_size = 11;
}
var MAX = 16;
var MIN = 9;

function adjust_text(num) {
	font_size += num;
	if(font_size > MAX) {font_size = MAX;}
	if(font_size < MIN) {font_size = MIN;}
	document.getElementById("bodyText").style.fontSize = (font_size) + "px";
	storeSize();
}

function initFont(){
	document.getElementById("bodyText").style.fontSize = font_size;
}		

/* STORE COOKIE */
function storeSize(){
	var exp = new Date();
	exp.setTime(exp.getTime() + 24*60*60*90*1000);
	size=document.getElementById("bodyText").style.fontSize;
	setCookie("dynfontsize",size,exp);
}
/* SAVE COOKIE */
function setCookie(name, value, expires, path, domain, secure) { 
	var curCookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() + "; path=/;"
	document.cookie = curCookie 
} 

/* READ COOKIE */
function getCookie(name) { 
	var prefix = name + "="
	var cookieStartIndex = document.cookie.indexOf(prefix)
	if (cookieStartIndex == -1)
	return null
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
	if (cookieEndIndex == -1)
	cookieEndIndex = document.cookie.length
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length,cookieEndIndex))
}