function preloadimages() {
var imgdir = "images/";
box1 = new Image; box1.src = imgdir+"table_bg.gif";
box2 = new Image; box2.src = imgdir+"bg01.gif";
box3 = new Image; box3.src = imgdir+"bg02.gif";
box4 = new Image; box4.src = imgdir+"bg03.gif";
box5 = new Image; box5.src = imgdir+"bg04.gif";
box6 = new Image; box6.src = imgdir+"cn04.gif";
box7 = new Image; box7.src = imgdir+"cn15.gif";
box8 = new Image; box8.src = imgdir+"cn21.gif";
box9 = new Image; box9.src = imgdir+"cn22.gif";
box10 = new Image; box10.src = imgdir+"dot.gif";
box11 = new Image; box11.src = imgdir+"cn10.gif";
box12 = new Image; box12.src = imgdir+"bg05.gif";
box13 = new Image; box13.src = imgdir+"form_bg.gif";
box14 = new Image; box14.src = imgdir+"icon_star_gray.gif";
box15 = new Image; box15.src = imgdir+"dot_gray.gif";
box16 = new Image; box16.src = imgdir+"bg09.gif";
box17 = new Image; box17.src = imgdir+"bg10.gif";
box18 = new Image; box18.src = imgdir+"bg11.gif";
box19 = new Image; box19.src = imgdir+"bg08.gif";
box20 = new Image; box20.src = imgdir+"body_bgleft.gif";
box21 = new Image; box21.src = imgdir+"languagesbg1.gif";
box22 = new Image; box22.src = imgdir+"languagesbg.gif";
box23 = new Image; box23.src = imgdir+"body_boys.gif";
box24 = new Image; box24.src = imgdir+"body_gals.gif";
box25 = new Image; box25.src = imgdir+"body.gif";
}
function over(text)
{
window.status = text;
	return true;
}
function out()
{
	window.status = '';
	return true;
}
function confirm_action($url, $msg)
{
	var is_confirmed = confirm($msg);
	if (is_confirmed) {
		window.location = $url;
	}
}
function openPop(url, width, height, s)
{
	x = (640 - width)/2;
	y = (480 - height)/2;
	if (screen)	{
		x = (screen.availWidth - width) / 2;
		y = (screen.availHeight - height) / 2;
	}
	if (navigator.appName == "Netscape")
		height = height + 50;
	window.open(url, '', 'scrollbars=' + s + ',status=0,resizable=0,width=' + width + ',height=' + height + ',screenX=' + x + ',screenY=' + y + ',top=' + y + ',left=' + x);
}
function checkZip(str){
	var multi = new Object();
	multi = document.getElementById('multipleUpload');
	if(str.indexOf('.zip') > 0){				
		multi.disabled = '';
	} else {
		multi.checked = false;
		showExtraOptions(false);		
		multi.disabled = 'disabled';
	}
	return true;
}
function showExtraOptions(checked){
	var opt1 = new Object();
	var opt2 = new Object();
	opt1 = document.getElementById('extraOptions1');
	opt2 = document.getElementById('extraOptions2');
	if(checked){
		opt1.style.visibility = 'visible';	
		opt2.style.visibility = 'visible';	
	} else {
		opt1.style.visibility = 'hidden';
		opt2.style.visibility = 'hidden';
	}
	return true;
}
function openPop_adv(url, width, height,s,r)
{
	x = (640 - width)/2;
	y = (480 - height)/2;
	if (screen)	{
		x = (screen.availWidth - width) / 2;
		y = (screen.availHeight - height) / 2;
	}
	if (navigator.appName == "Netscape")
		height = height + 50;
	articles = window.open(url, 'articles', 'scrollbars=' + s + ',status=0,resizable=' + r + ',width=' + width + ',height=' + height + ',screenX=' + x + ',screenY=' + y + ',top=' + y + ',left=' + x);
	articles.focus();
}

function openPop_new(url, name, width, height, otherfeatures) {
	
	//openPop(url,width, height);
	
	var str = "height=" + height + ",innerHeight=" + height;
	
	str += ",width=" + width + ",innerWidth=" + width;
	
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;
		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
	}
	//alert(str);
	
	newwin = window.open(url, name, str + ',' + otherfeatures);
	
	if(parseInt(navigator.appVersion) >= 4)	{
		setTimeout('newwin.focus();',250);
	}
	
}




