function popup_image(setfilename,setwindowtitle,setwidth,setheight) {
	var win = window.open('','','border=0,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + setwidth + ',height=' + setheight + '');
	with (win.document)
	{
	writeln("<html><head><title>" + setwindowtitle + "</title></head><body style='margin:0px;padding:0px;'><table width='83%' height='83%' cellpadding='0' cellspacing='0' border='0'><tr><td align='center'><img src='" + setfilename + "' border='0'></td></tr></table></body></html>");
	}
}

function popup_page(setfilename,setwindowtitle,setwidth,setheight) {
var win = window.open(setfilename,'','border=0,toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=' + setwidth + ',height=' + setheight + '');
}

function redirect(linktogo){
	window.location = linktogo;
}

function create_cookie(name,value,seconds)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function read_cookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function erase_cookie(name)
{
	createCookie(name,"",-1);
}
