<!--

var Menu = new Array ()
var subMenu = new Array ()
Menu[0] = new Array("New Release", "#","_self")
subMenu[0] = new Array()
subMenu[0][0] = new Array ("20 รายการที่อัพเดทล่าสุด", "movie/ver2010/newrelease.asp","frame_movie")
subMenu[0][1] = new Array ("20 รายการที่คนดูเยอะสุด", "movie/ver2010/mostview.asp","frame_movie")
Menu[1] = new Array("Zoom Movie", "#","_self")
subMenu[1] = new Array()
subMenu[1][0] = new Array ("Thai Movie", "movie/ver2010/playlist.asp?id=1","frame_movie")
subMenu[1][1] = new Array ("Asia Movie", "movie/ver2010/playlist.asp?id=2","frame_movie")
subMenu[1][2] = new Array ("Inter Movie", "movie/ver2010/playlist.asp?id=3","frame_movie")
Menu[2] = new Array("Master Movie", "#","_self")
subMenu[2] = new Array()
subMenu[2][0] = new Array ("Thai Movie", "movie/ver2010/playlist.asp?id=4","frame_movie")
subMenu[2][1] = new Array ("Asia Movie", "movie/ver2010/playlist.asp?id=5","frame_movie")
subMenu[2][2] = new Array ("Inter Movie", "movie/ver2010/playlist.asp?id=6","frame_movie")
Menu[3] = new Array("Etc.", "#","_self")
subMenu[3] = new Array()
subMenu[3][0] = new Array ("Cartoon", "movie/ver2010/playlist.asp?id=7","frame_movie")
subMenu[3][1] = new Array ("Comedy", "movie/ver2010/playlist.asp?id=8","frame_movie")
subMenu[3][2] = new Array ("Concert", "movie/ver2010/playlist.asp?id=9","frame_movie")
subMenu[3][3] = new Array ("Drama", "movie/ver2010/playlist.asp?id=10","frame_movie")
subMenu[3][4] = new Array ("Series", "movie/ver2010/playlist.asp?id=11","frame_movie")
subMenu[3][5] = new Array ("Sitcom", "movie/ver2010/playlist.asp?id=12","frame_movie")
subMenu[3][6] = new Array ("Talkshow", "movie/ver2010/playlist.asp?id=13","frame_movie")
Menu[4] = new Array("HQ (สำหรับเน็ตแรง)", "#","_self")
subMenu[4] = new Array()
subMenu[4][0] = new Array ("Cartoon HQ", "movie/ver2010/playlist.asp?id=14","frame_movie")
subMenu[4][1] = new Array ("Concert HQ", "movie/ver2010/playlist.asp?id=15","frame_movie")
subMenu[4][2] = new Array ("Drama HQ", "movie/ver2010/playlist.asp?id=16","frame_movie")
subMenu[4][3] = new Array ("Karaoke HQ", "movie/ver2010/playlist.asp?id=17","frame_movie")
subMenu[4][4] = new Array ("Movie HQ", "movie/ver2010/playlist.asp?id=18","frame_movie")
subMenu[4][5] = new Array ("Movie Super HQ", "movie/ver2010/playlist.asp?id=19","frame_movie")
subMenu[4][6] = new Array ("Sitcom HQ", "movie/ver2010/playlist.asp?id=20","frame_movie")
subMenu[4][7] = new Array ("Talkshow HQ", "movie/ver2010/playlist.asp?id=21","frame_movie")

sShadow = 1
var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;
var timer;
var obj = (isIE)?"document.all":"document.getElementById"
styleBorder=("3d".toLowerCase() == "flat")?1:0
document.writeln ('<style>');
document.writeln ('.rcMenuStatic {font-family:'+"Ms Sans Serif"+';font-size:'+"12px"+';color:'+"#FFFFFF"+';font-weight:'+"bold"+';background-color:'+"#ed1846"+'; cursor:hand; text-decoration:'+"none"+'}');
document.writeln ('.rcMenuHover {font-family:'+"Ms Sans Serif"+';font-size:'+"12px"+';color:'+"#FF0000"+';font-weight:'+"bold"+';background-color:'+"#ed1846"+'; cursor:hand; text-decoration:'+"none"+'}');
document.writeln ('.rcSubMenuStatic {font-family:'+"Ms Sans Serif"+';font-size:'+"10px"+';color:'+"#FFFFFF"+';font-weight:'+"normal"+';text-decoration:'+"none"+';background-color:'+"#83ac21"+'; cursor:hand}');
document.writeln ('.rcSubMenuHover {font-family:'+"Ms Sans Serif"+';font-size:'+"10px"+';color:'+"#FF6600"+';font-weight:'+"normal"+';text-decoration:'+"none"+';background-color:'+"#83ac21"+'; cursor:hand}');
document.writeln ('</style>');

function showMenus()
{
  if ("horizontal".toLowerCase() == "vertical"){document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+"#FFFFFF"+'">')}
  else{document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+"#FFFFFF"+'"><tr>')}  
  for (x=0; x<Menu.length; x++)
  {
    if ("horizontal".toLowerCase()=="vertical") document.writeln('<tr>')
    document.writeln ('<td onclick="tdMouseClick(\'mainLink'+x+'\')" onMouseOver="hoverMenu(); popDown('+x+', \'button'+x+'\'); " onMouseOut="clearMenu('+x+')" ')
    if ("3d".toLowerCase() == "3d"){document.writeln ('style="border-left:'+1+'px solid '+"#333333"+';border-top:'+1+'px solid '+"#333333"+';border-right:'+1+'px solid '+"#333333"+';border-bottom:'+1+'px solid '+"#333333"+';"');}        
    document.writeln (' width="130"><div id="button'+x+'"><table border="0" cellpadding="'+3+'" cellspacing="0" width="100%"><tr><td class="rcMenuStatic" id="cell'+x+'" nowrap  >');
    document.writeln ('<a id="mainLink'+x+'" href="'+Menu[x][1]+'" target="'+Menu[x][2]+'" class="rcMenuStatic">'+Menu[x][0]+'</a></td>');
    if (1 == 1&&subMenu[x].length>=1){
      document.writeln('<td class="rcMenuStatic" id="cell'+x+'a" align="right" >');
      document.writeln ('<a id="mainLink'+x+'a" href="'+Menu[x][1]+'" target="'+Menu[x][2]+'" class="rcMenuStatic">'+"<img src='http://cannot.info/lib/dw/arrow-down.gif'  width='5'  height='5' border='0'>"+'</a></td>');}
    document.writeln ('</tr></table></div></td>');    
    if ("horizontal".toLowerCase()=="vertical") document.writeln('</tr>')
  }
  if ("horizontal".toLowerCase() == "vertical"){document.writeln ('</table>');}
  else{document.writeln ('</tr></table>');}   
}  

  for (x=0; x<Menu.length; x++)
  { 
    if (subMenu[x].length > 0)
    {     
      document.writeln ('<div id="MENU'+x+'" style="visibility:hidden; position:absolute; z-index:2" >');
      document.writeln ('<table border="0" cellpadding="'+3+'" cellspacing="'+styleBorder+'" bgColor="'+"#A6A684"+'" width="110">');   
      for (y=0; y<subMenu[x].length; y++)
      {
        document.writeln ('<tr><td id="subMenu'+x+y+'" class="rcSubMenuStatic" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+')" onMouseOut="clearMenu('+x+');" onclick="tdMouseClick(\'subLink'+x+y+'\')" nowrap')
        if ("3d".toLowerCase() == "3d"){document.writeln ('style="border-left:'+1+'px solid '+"#333333"+';border-top:'+1+'px solid '+"#333333"+';border-right:'+1+'px solid '+"#333333"+';border-bottom:'+1+'px solid '+"#333333"+';"');}
        document.writeln (' ><a id="subLink'+x+y+'" href="'+subMenu[x][y][1]+'" target="'+subMenu[x][y][2]+'">'+subMenu[x][y][0]+'</a></td></tr>');
      }
      document.writeln ('</table></div>');
    }
  }
 
function highlightMenu(element,mainMenu,dropMenu,state)
{
  state=(state == "hover")?"rcMenuHover":"rcMenuStatic"
  if (element == "sub")
  {
    for (x=0; x < subMenu[mainMenu].length; x++)
    {
      eval(obj+'("subMenu'+mainMenu+x+'").className = "rcSubMenuStatic"')
      eval(obj+'("subLink'+mainMenu+x+'").className = "rcSubMenuStatic"')
    }   
    eval(obj+'("subMenu'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
    eval(obj+'("subLink'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
  }
  else
  {
    eval(obj+'("cell'+mainMenu+'").className = "'+state+'"')
    eval(obj+'("mainLink'+mainMenu+'").className = "'+state+'"')
    if (1 == 1&&subMenu[mainMenu].length>=1)
    {
      eval(obj+'("cell'+mainMenu+'a").className = "'+state+'"')
      eval(obj+'("mainLink'+mainMenu+'a").className = "'+state+'"')
    }
  }
}

function getOffset(obj, dim) 
{
  if(dim=="left") 
  {     
    oLeft = obj.offsetLeft;    
    while(obj.offsetParent!=null) 
    {    
      oParent = obj.offsetParent     
      oLeft += oParent.offsetLeft 
      obj = oParent 	
    }


    return oLeft
  }
  else if(dim=="top")

  {
    oTop = obj.offsetTop;
    while(obj.offsetParent!=null) 
    {
      oParent = obj.offsetParent
      oTop += oParent.offsetTop
      obj = oParent 	
    }
    return oTop
  }
  else if(dim=="width")
  {
    oWidth = obj.offsetWidth


    return oWidth
  }  
  else if(dim=="height")
  {
    oHeight = obj.offsetHeight
    return oHeight
  }    
  else
  {
    alert("Error: invalid offset dimension '" + dim + "' in getOffset()")
    return false;
  }
}

function popDown(param, id)
{
  var cellBorderOffset = (isNS6)?1:eval(1*2)
  var browserAdjustment = (isNS6)?1:0
  var menu;
  var button;

  if (id)
  {    
    getOffset(eval(obj+'(id)'),'left');
    getOffset(eval(obj+'(id)'),'top');    
    getOffset(eval(obj+'(id)'),'width');  
    getOffset(eval(obj+'(id)'),'height');
  }  
  n = 0;    
  while (n < Menu.length)
  {          
    menu = "MENU"+n
    if (param == n)
    {
      theObj = eval(obj+'(menu)');
      if (theObj)
      {
         theObj.style.visibility = "visible"

          if ("horizontal".toLowerCase()=="vertical"){
            theObj.style.left=("3d".toLowerCase()=="flat")?oLeft+oWidth+1+0:oLeft+oWidth+cellBorderOffset+0;
            theObj.style.top=("3d".toLowerCase()=="flat")?oTop-1+0:oTop+0-browserAdjustment}
          else{
            theObj.style.left=("3d".toLowerCase()=="flat")?oLeft-1+0:oLeft+0-browserAdjustment;
            theObj.style.top=("3d".toLowerCase()=="flat")?oTop+oHeight+1+0:oTop+oHeight+cellBorderOffset+0;}
        }
      
       highlightMenu('main',n,'','hover')
       if (subMenu[param].length > 0)
       {
         for (x=0; x<subMenu[param].length; x++)
         {
           eval (obj+'("subMenu'+param+x+'").className = "rcSubMenuStatic"')
           eval (obj+'("subLink'+param+x+'").className = "rcSubMenuStatic"')         
         }
       }
    }
    else 
    {          
      if (eval(obj+'(menu)'))
      {
        eval(obj+'(menu).style.visibility = "hidden"')            
      }
      highlightMenu ('main',n,'','static')


    }
    n++
  }  
}

function hoverMenu()
{
  if(timer)
  clearTimeout(timer)
}

function clearMenu(menu)
{
  setDelay = 2*1000
  delay = (subMenu[menu].length > 0)?setDelay:1
  
  timer = setTimeout("popDown("+(Menu.length + 1)+")",delay)
}

function tdMouseClick(theElement)
{
  eval(obj+'(theElement).click()')
}
//-->