function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

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];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		menu_01_on = newImage("images/menu-03-on.gif");
		menu_02_on = newImage("images/menu-04-on.gif");
		menu_03_on = newImage("images/menu-05-on.gif");
		menu_04_on = newImage("images/menu-06-on.gif");
		menu_05_on = newImage("images/menu-07-on.gif");
		menu_06_on = newImage("images/menu-08-on.gif");
		preloadFlag = true;
	}
}


function popupWin(url, width, height, title) {
	num = Math.round(Math.random() * 10000000);
    str = new String(num);

    win = window.open("",str,"toolbar=no,location=no,directories=no,"
                             +"status=no,menubar=no,scrollbars=no,resizable=no,"
                             +"copyhistory=no,width="+width+",height="+height+",left=50,top=50");
  	win.document.write ("\<HEAD\>\<TITLE\>"+title+"\<\/TITLE\>\<\/HEAD\>")
	win.document.write ("\<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0\>\<div align=center\>\<img src=\""+url+"\" border=0 \>\<\/div\>\<\/body\>")	
}

function popupPage(url, width, height, title) {
	num = Math.round(Math.random() * 10000000);
    str = new String(num);

    win = window.open(url,str,"toolbar=no,location=no,directories=no,"
                             +"status=no,menubar=no,scrollbars=no,resizable=yes,"
                             +"copyhistory=no,width="+width+",height="+height+",left=100,top=150");
}