var myimages = new Array();
function preloadimages(){
	for (i = 0; i < preloadimages.arguments.length; i++) {
		myimages[i]=new Image();
		myimages[i].src=preloadimages.arguments[i];
	}
}

function show_logo(pic) {
eval("document.logo" + pic + ".src = '/common/uk/img/logo" + pic + "_sel.gif'");
}
function hide_logo(pic) {
eval("document.logo" + pic + ".src = '/common/uk/img/logo" + pic + ".gif'");
}

function show_logo_en(pic) {
eval("document.logo_en_" + pic + ".src = '/common/uk/img/logo_en_" + pic + "_sel.gif'");
}
function hide_logo_en(pic) {
eval("document.logo_en_" + pic + ".src = '/common/uk/img/logo_en_" + pic + ".gif'");
}
var newWindow = 0;
function enlargeImage(img_src,title)
{
	if(newWindow) if(!newWindow.closed) newWindow.close();
	if(!title) title = '';
	var width=100, height=100;
	var left = 0, top = 0;
	var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
	var newWindow = window.open("","newWindow", styleStr);
	var head = '';
	newWindow.document.write('<html><head><title>'+title+'</title></head>');
	newWindow.document.write('<body style="margin:5px;background-color:#CCCCCC;"></body></html>');
	
	newWindow.document.body.innerHTML = '<img id="enlargedImage" onclick="window.close();"/>';
	var img = newWindow.document.getElementById('enlargedImage');
	img.src = img_src;
	img.onload = function(e){
		newWindow.resizeTo(img.width+20,img.height+60);
		newWindow.focus();
	}
}
function OpenWindow(url, width, height)
{
	var w = screen.width, h = screen.height;
	window.open(url, '', 'status=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height+',top='+Math.floor((h - height)/2-14)+',left='+Math.floor((w - width)/2-5));
}

	function setCookie( name, value, expires, path, domain, secure )
	{
		var today = new Date();
		today.setTime( today.getTime() );
		if(expires) expires = expires * 1000 * 60 * 60 * 24;
		var expires_date = new Date(today.getTime() + (expires));
		document.cookie = name + "=" +escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
		( ( path ) ? ";path=" + path : "" ) +
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
	}

	function getCookie(c_name)
	{
		if (document.cookie.length > 0) {
			c_start=document.cookie.indexOf(c_name + "=");
			if (c_start!=-1) {
				c_start=c_start + c_name.length + 1;
				c_end=document.cookie.indexOf(";",c_start);
				if (c_end==-1) c_end = document.cookie.length;
				return unescape(document.cookie.substring(c_start,c_end));
			}
		}
		return "";
	}
