
function openWindow(url,source,percent) {
	var w = 630, h = 440; // default sizes
	if (window.screen) {
		w = window.screen.availWidth * percent / 100;
		h = window.screen.availHeight * percent / 100;
	}

	winLeft = (window.screen.availWidth-w)/2;
	winTopPre = (window.screen.availHeight-h)/2;
	winTop = (winTopPre * 60) / 100;

	window.open(''+url+'.'+source+'','windowName','width='+w+',height='+h+',left='+winLeft+',top='+winTop);
}

function popUp_open(URL,w,h,s) {
	day = new Date();
	id = day.getTime();
	var left = (screen.width-w)/2;
	var top = (screen.height-h)/2;
	window.open(URL, id, 'toolbar=0,scrollbars=' + s + ',location=0,statusbar=0,menubar=0,resizable=0,width=' + w + ',height=' + h + ',left =' + left + ',top = ' + top);
}
function popUp(URL,w,h,s) {
	var hesh = URL.substr(0,1);
	if(hesh == '#')URL = URL.substring(1);
	day = new Date();
	id = day.getTime();
	var left = (screen.width-w)/2;
	var top = (screen.height-h)/2;
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=" + s + ",location=0,statusbar=0,menubar=0,resizable=0,width=" + w + ",height=" + h + ",left =" + left + ",top = " + top + "');");
}
function getFlashMovieObject(movieName) {
	if (window.document[movieName]) {
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1) {
		if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName];
	} else {
		return document.getElementById(movieName);
	}
}
