function doPopup(URL, WIDTH, HEIGHT) {
	url = URL;
	width = WIDTH;  // width of window in pixels
	height = HEIGHT; // height of window in pixels
	windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + "toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=no," + "resizable=no,";
	preview = document.open(URL, "_blank", windowprops);
}


function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}


function ReadCookie(n) {

var cookiecontent = new String();
if(document.cookie.length > 0) {
	var cookiename = n+ '=';
	var cookiebegin = document.cookie.indexOf(cookiename);
	var cookieend = 0;
	if(cookiebegin > -1) {
		cookiebegin += cookiename.length;
		cookieend = document.cookie.indexOf(";",cookiebegin);
		if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
		cookiecontent = document.cookie.substring(cookiebegin,cookieend);
		}
	}

return unescape(cookiecontent);
} // function ReadCookie()

function SetInitial(n) {

	if(n == 1) {
		document.body.style.fontSize = "60%";
		SetCookie('fontSetup',1,3);
	}
	
	if(n == 2) {
		document.body.style.fontSize = "70%";
		SetCookie('fontSetup',2,3);
	}

	if(n == 3) {
		document.body.style.fontSize = "80%";
		SetCookie('fontSetup',3,3);
	}

	// alert(ReadCookie('fontSetup'));
}

function SetSize(n) {

	if(n == 1) {
		document.body.style.fontSize = '60%';
		SetCookie('fontSetup',1,3);
	}
	
	if(n == 2) {
		document.body.style.fontSize = '70%';
		SetCookie('fontSetup',2,3);
	}

	if(n == 3) {
		document.body.style.fontSize = '80%';
		SetCookie('fontSetup',3,3);
	}

	//alert(ReadCookie('fontSetup'));
}

function LoadSetup() {

	var fs = ReadCookie('fontSetup');
	// alert(fs);

	if(fs != false) {
 		SetInitial(fs);
	}

}