function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		
		menu_01a = newImage("0rsc/menu_01a.gif");
		menu_02a = newImage("0rsc/menu_02a.gif");
		menu_03a = newImage("0rsc/menu_03a.gif");
		menu_04a = newImage("0rsc/menu_04a.gif");
		menu_05a = newImage("0rsc/menu_05a.gif");
		menu_06a = newImage("0rsc/menu_06a.gif");

		preloadFlag = true;
	}
}
function openWin(K, X, Y) {
	sed = window.open('kep.php?x='+X+'&y='+Y+'&k='+K, 'BBB', 'width='+X+',height='+Y+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
	sed.focus()
}
function openWin2(K, X, Y) {
	sed = window.open('tollak.html?x='+X+'&y='+Y+'&k='+K, 'BBB', 'width='+X+',height='+Y+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
	sed.focus()
}
function center() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement &&
			( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	self.moveTo((screen.width-myWidth)/2,(screen.height-myWidth)/2);
}

