function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}

function changeImage(imgName,imgObj) {
	//alert(imgName + ' ' + imgObj)
	if (document.images) {
		document.images[imgName].src = eval(imgObj+".src")
	}
}

function colorLink(target, color) {
	document.getElementById(target).style.color = color;
}

function openPopup(url, w, h, name, s) {
	var l = (screen.availWidth - w) / 2;
	var t = (screen.availHeight - h) / 2;
	remote = window.open(url, name, "width="+w+", height="+h+", screenX="+l+", screenY="+t+", top="+t+", left="+l+", scrollbars="+((s == 1) ? "yes" : "no")+", resizable=no");
	//remote.location.href = url;
	if (remote.opener == null) remote.opener = window;
	remote.opener.name = "opener";
}

function showLayer(layerName) {
	document.getElementById(layerName).style.display = 'block';
}

function hideLayer(layerName) {
	document.getElementById(layerName).style.display = 'none';
}