// generate one Drop-Down menu
function generateMenu(name,menu,link,x) {
	document.write("<div id=\""+ name +"\" style=\"position:absolute; left:" + x + "px; top:124px; width:100px; height:35px; z-index:1;visibility:hidden\"> ");
	document.write("<TABLE width="+ 100+" border=0 cellspacing=1 cellpadding=0 bgcolor=#FFFFFF onMouseOut=MM_showHideLayers('" + name + "','','hide') onMouseOver=MM_showHideLayers('" + name + "','','show')>");
	//document.write("");
	for (var i=0;i<menu.length ;i++ )
	{
		document.write("<TR><TD class=childTbl><a href=" + link[i] + ">"+menu[i]+"</a></TD></TR>");
	}
	document.write("</TR></TABLE></div>");
}

// resize
function resize(){
var isNS=(document.layers);
var leftside;
var frameWidth;
var frameHeight;
var menuLeft = 40;//175;

(document.body.clientWidth < 800) ? frameWidth = 800:frameWidth = document.body.clientWidth;
(document.body.clientHeight < 600) ? frameHeight = 600:frameHeight = document.body.clientHeight;

(frameWidth > 800) ? leftside=(frameWidth-800)/2:leftside=0;
//alert ("left=" + leftside);
//leftside=0;
if(isNS){
	alert ('Monozone.com ทำไว้สำหรับ IE4+ ขออภัยด้วยถ้าหากแสดงผลใน browser ของคุณไม่สวยงาม');
}else{
	document.all["onlinegame"].style.pixelLeft=220 - 102 +leftside;//632

	document.all["mobilefun"].style.pixelLeft = 340 - 102 +leftside;

	document.all["download"].style.pixelLeft = 460 -102 +leftside;

	document.all["webboard"].style.pixelLeft = 560 -102 +leftside;
	document.all["e-profile"].style.pixelLeft = 660 -102 +leftside;
document.all["winner"].style.pixelLeft = 760 -102 +leftside;

}}
window.onload=resize;
window.onresize=resize;
