﻿document.write('<style type="text/css">');
document.write('#idQuckBar .textActiveX01 {font-family: Tahoma;font-size: 12px;font-weight: normal;color: #666666;text-decoration: none;}');
document.write('#idQuckBar .textActiveX01:hover {color: #666666;text-decoration: underline;}');	
document.write('#idQuckBar .textActiveX01:link {color: #666666;}');	
document.write('#idQuckBar .textActiveX01:active {color: #666666;}');	
document.write('#idQuckBar .textActiveX01:visited {color: #666666;}');
document.write('#idQuckBar img{border:0px;display:block;}');
document.write('.imgOpacity60:hover input, .imgOpacity60:hover img, .overImgOpa60:hover{ opacity:0.6; filter:alpha(opacity=60);}');
document.write('#boxQuickBar{width:74px;height: 37px;position: absolute;overflow: hidden; margin:-15px 0 0 -80px;');
document.write('</style>');


/*document.write('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td align="left" valign="top" class="bar_repeat"><table width="100" border="0" align="left" cellpadding="0" cellspacing="0"><tr><td id="menu_parent0" align="left" valign="top"><a class="imgOpacity60" href="http://www.onenet.co.th/" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/bar_onenet.png" width="153" height="49" border="0"></a></td><td id="menu_parent1" align="left" valign="top"><a class="imgOpacity60" href="http://www.paperman.in.th/" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/icon_paperman.gif" width="203" height="49" border="0"></a></td><td id="menu_parent2" align="left" valign="top"><a class="imgOpacity60" href="http://www.dragonica.in.th/" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/bar_dragonica.png" width="164" height="49" border="0"></a></td><td id="menu_parent3" align="left" valign="top"><a class="imgOpacity60" href="http://www.eco.in.th/" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/bar_eco.png" width="164" height="49" border="0"></a></td><td align="left" valign="top">&nbsp;</td></tr></table></td></tr></table>');*/

document.write('<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td align="left" valign="top" class="bg_repeat_topmenugames"><table border="0" align="left" cellpadding="0" cellspacing="0"><tr><td id="menu_parent0" width="129" align="center" valign="top"><a href="http://www.onenet.co.th/"><img src="images/top-menu-games-one.png" width="129" height="59" border="0"></a></td><td width="20" align="center" valign="top"><img src="images/sp1.png" width="20" height="59"></td><td  id="menu_parent1" width="82" align="center" valign="top"><a href="http://www.paperman.in.th/" target="_blank" ><img src="images/top-menu-games-pmo.png" name="Image8" width="82" height="59" border="0"></a></td><td width="35" align="center" valign="top"><img src="images/sp2.png" width="35" height="59"></td><td id="menu_parent2" width="83" align="center" valign="top"><a href="http://www.dragonica.in.th/" ><img src="images/top-menu-games-dgn.png" name="Image9" width="83" height="59" border="0"></a></td><td width="22" align="center" valign="top"><img src="images/sp4.png" width="22" height="59"></td></tr></table></td></tr></table>');


//submenu0
document.write('<div style="z-index:10000" id="menu_child0">');
document.write('</div>');

//submenu1
document.write('<div id="menu_child1">');
document.write('<table width="145" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td align="center" valign="top"><img src="http://www.onenet.co.th/bar_head/images/bar_box_top.png" width="145" height="25"></td></tr><tr><td align="center" valign="top" class="box_repeat_bar"><img src="http://www.onenet.co.th/bar_head/images/PMO.png" width="128" height="29"></td></tr><tr><td align="center" valign="top" class="box_repeat_bar"><table width="145" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td height="5" align="left" valign="top"></td><td height="5" align="left" valign="top" class="TxtSky12N01"></td><td height="5" align="left" valign="top"></td></tr><!--<tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky12N01"><a href="http://www.onenet.co.th/regist_member.php?site=pmo" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/icon_regis.png" width="100" height="24" border="0"></a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td height="5" align="left" valign="top"></td><td height="5" align="left" valign="top" class="TxtSky12N01"></td><td height="5" align="left" valign="top"></td></tr>--><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky12N01"><a href="http://www.paperman.in.th/download.php" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/icon_download.png" width="100" height="24" border="0"></a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://www.paperman.in.th/new_user.php" target="_blank" class="TxtSky11N01">ผู้เล่นใหม่</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://www.paperman.in.th/datagame.php" target="_blank" class="TxtSky11N01">ข้อมูลเกม</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://board.paperman.in.th/viewforum.php?f=28" target="_blank" class="TxtSky11N01">Tournament</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://board.paperman.in.th/" target="_blank" class="TxtSky11N01">เว็บบอร์ด</a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="Txtorange12B01"><a href="http://www.paperman.in.th/"  target="_blank"   class="Txtorange12B01">เข้าสู่เว็บไซต์</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr></table></td></tr><tr><td align="center" valign="top"><img src="http://www.onenet.co.th/bar_head/images/bar_box_down.png" width="145" height="12"></td></tr></table>');
document.write('</div>');

//submenu2
document.write('<div id="menu_child2">');
document.write('<table width="145" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td align="center" valign="top"><img src="http://www.onenet.co.th/bar_head/images/bar_box_top.png" width="145" height="25"></td></tr><tr><td align="center" valign="top" class="box_repeat_bar"><img src="http://www.onenet.co.th/bar_head/images/DGN.png" width="128" height="29"></td></tr><tr><td align="center" valign="top" class="box_repeat_bar"><table width="145" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td height="5" align="left" valign="top"></td><td height="5" align="left" valign="top" class="TxtSky12N01"></td><td height="5" align="left" valign="top"></td></tr><!--<tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky12N01"><a href="http://www.onenet.co.th/regist_member.php?site=dgn" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/icon_regis.png" width="100" height="24" border="0"></a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td height="5" align="left" valign="top"></td><td height="5" align="left" valign="top" class="TxtSky12N01"></td><td height="5" align="left" valign="top"></td></tr>--><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky12N01"><a href="http://www.dragonica.in.th/download_game.php" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/icon_download.png" width="100" height="24" border="0"></a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://www.dragonica.in.th/new_user_register.php" target="_blank" class="TxtSky11N01">ผู้เล่นใหม่</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://www.dragonica.in.th/data_game_story.php" target="_blank" class="TxtSky11N01">ข้อมูลเกม</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://board.dragonica.in.th/" target="_blank" class="TxtSky11N01">เว็บบอร์ด</a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="Txtorange12B01"><a href="http://www.dragonica.in.th/" target="_blank" class="Txtorange12B01">เข้าสู่เว็บไซต์</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr></table></td></tr><tr><td align="center" valign="top"><img src="http://www.onenet.co.th/bar_head/images/bar_box_down.png" width="145" height="12"></td></tr></table>');
document.write('</div>');

//submenu3
/*document.write('<div id="menu_child3">');
document.write('<table width="145" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td align="center" valign="top"><img src="http://www.onenet.co.th/bar_head/images/bar_box_top.png" width="145" height="25"></td></tr><tr><td align="center" valign="top" class="box_repeat_bar"><img src="http://www.onenet.co.th/bar_head/images/ECO.png" width="128" height="29"></td></tr><tr><td align="center" valign="top" class="box_repeat_bar"><table width="145" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td height="5" align="left" valign="top"></td><td height="5" align="left" valign="top" class="TxtSky12N01"></td><td height="5" align="left" valign="top"></td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky12N01"><a href="http://www.onenet.co.th/regist_member.php?site=eco" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/icon_regis.png" width="100" height="24" border="0"></a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td height="5" align="left" valign="top"></td><td height="5" align="left" valign="top" class="TxtSky12N01"></td><td height="5" align="left" valign="top"></td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky12N01"><a href="http://www.eco.in.th/download_game.php" target="_blank"><img src="http://www.onenet.co.th/bar_head/images/icon_download.png" width="100" height="24" border="0"></a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://www.eco.in.th/guide_checkbox.php" target="_blank" class="TxtSky11N01">ผู้เล่นใหม่</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://www.eco.in.th/information_jobs.php" target="_blank" class="TxtSky11N01">ข้อมูลเกม</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr><tr><td align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="TxtSky11N01"><a href="http://board.eco.in.th/" target="_blank" class="TxtSky11N01">เว็บบอร์ด</a></td><td align="left" valign="top">&nbsp;</td></tr><tr><td width="15" align="left" valign="top">&nbsp;</td><td align="left" valign="top" class="Txtorange12B01"><a href="http://www.eco.in.th/" target="_blank" class="Txtorange12B01">เข้าสู่เว็บไซต์</a></td><td width="15" align="left" valign="top">&nbsp;</td></tr></table></td></tr><tr><td align="center" valign="top"><img src="http://www.onenet.co.th/bar_head/images/bar_box_down.png" width="145" height="12"></td></tr></table>');
document.write('</div>');
*/

function at_show_aux(parent, child) {
    var p = document.getElementById(parent);
    var c = document.getElementById(child);

    var top = (c["at_position"] == "y") ? p.offsetHeight + 2 : 0;
    var left = (c["at_position"] == "x") ? p.offsetWidth + 2 : 0;

    for (; p; p = p.offsetParent) {
        top += p.offsetTop;
        left += p.offsetLeft;
    }

    c.style.position = "absolute";
    c.style.top = top + 'px';
    c.style.left = left + 'px';
    if (child == "menu_child6") {
        c.style.left = left - 8;
    }
    if (child == "menu_child7") {
        c.style.top = (top) + 'px';
        c.style.left = (left - 50) + 'px';
        c.style.height = '140px';
    }
    c.style.visibility = "visible";
}

function at_show()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  at_show_aux(p.id, c.id);
  clearTimeout(c["at_timeout"]);
}

function at_hide()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 1);
}

function at_click()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  if (c.style.visibility != "visible") at_show_aux(p.id, c.id); else c.style.visibility = "hidden";
  return false;
}

function at_attach(parent, child, showtype, position, cursor)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);
  
  p["at_parent"]     = p.id;
  c["at_parent"]     = p.id;
  p["at_child"]      = c.id;
  c["at_child"]      = c.id;
  p["at_position"]   = position;
  c["at_position"]   = position;
  p["at_position"]   = position;
  c["at_position"]   = position;
  c.style.position   = "absolute";
  c.style.visibility = "hidden";
  c.style.zIndex = "100";

  if (cursor != undefined) p.style.cursor = cursor;

  switch (showtype)
  {
    case "click":
      p.onclick     = at_click;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
    case "hover":
      p.onmouseover = at_show;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout = at_hide;
      break;
  }
}
at_attach("menu_parent0", "menu_child0", "hover", "y", "pointer");
at_attach("menu_parent1", "menu_child1", "hover", "y", "pointer");
at_attach("menu_parent2", "menu_child2", "hover", "y", "pointer");
at_attach("menu_parent3", "menu_child3", "hover", "y", "pointer");
at_attach("menu_parent4", "menu_child4", "hover", "y", "pointer");
at_attach("menu_parent5", "menu_child5", "hover", "y", "pointer");
at_attach("menu_parent6", "menu_child6", "hover", "y", "pointer");
/*at_attach("menu_parent7", "menu_child7", "click", "y", "pointer");*/
at_attach("QuickMenu", "menu_child7", "hover", "y", "pointer");

/* Quick Menu */
document.getElementById('ArrowL').onclick = slideImg;
document.getElementById('QuickMenu').onclick = slideImg;
var obj = document.getElementById('QuickMenu');
var marginLeft = parseInt(obj.style.marginLeft);
var marginLeftNum = parseInt(marginLeft);
var timeOut;
var incres;
var range;
function slideImg() {
    if (marginLeftNum == 0) {
        range = 80;
        incres = 10;
    } else {
        range = 0;
        incres = -10;
    }
    slide();
}
function slide() {
    var IsSilde = true;
    if (marginLeftNum == range) {
        IsSilde = false;
    }
    if (IsSilde) {
        marginLeftNum = marginLeftNum + (incres);
        document.getElementById('QuickMenu').style.marginLeft = marginLeftNum + "px";
        timeOut = setTimeout("slide()", 1);
    } else {
        clearTimeout(timeOut);
    }
}
