var myWidth = 0, myHeight = 0;

var cssmenuids=["cssmenu1"] //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=-1 //Offset of submenus from main menu. Default is 0 pixels.

function createcssmenu2(){
for (var i=0; i<cssmenuids.length; i++){
  var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
			ultags[t].style.top=ultags[t].parentNode.offsetHeight+csssubmenuoffset+"px"
    	var spanref=document.createElement("span")
			spanref.className="arrowdiv"
			spanref.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"
			ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
    	ultags[t].parentNode.onmouseover=function(){
    	this.getElementsByTagName("ul")[0].style.visibility="visible"
    	}
    	ultags[t].parentNode.onmouseout=function(){
			this.getElementsByTagName("ul")[0].style.visibility="hidden"
    }
    }
  }
}

function hidevideo(videoname)
{
  var showvideodiv=document.getElementById(videoname);
  showvideodiv.innerHTML='';
  showvideodiv.style.display = 'none';
}

function viewvideo(videoname,type)
{
  var showvideodiv=document.getElementById(videoname);
  showvideodiv.style.display = 'block';
  if (type == "Veoh")
  {
    var vheight=438; var vwidth=540;
    if (myHeight<500)
    { vheight=myHeight-150; vwidth=parseInt(vheight*540/438); }

    // <div id="v792422g86HXF9s" style="display:none;" class="showvideodiv" ></div>
    showvideodiv.innerHTML='<center><img src="http://worldofo.com/news/basis/wotv_top540.jpg"><br><embed src="http://www.veoh.com/videodetails.swf?permalinkId='+ videoname+'&id=1&videoAutoPlay=1" width="'+vwidth+'" height="'+vheight+'" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed><br><a href="javascript:void(0);" onclick="hidevideo(\''+videoname+'\')">Click to close woO-TV window</a><br></center>';
  }
  else if (type == "Revver")
  {
    var vheight=392; var vwidth=480;
    if (myHeight<500)
    { vheight=myHeight-150; vwidth=parseInt(vheight*480/392); }
    showvideodiv.innerHTML='<center><img src="http://worldofo.com/news/basis/wotv_top540.jpg"><br><embed type="application/x-shockwave-flash" src="http://flash.revver.com/player/1.0/player.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="noScale" salign="TL" bgcolor="#000000" flashvars="mediaId='+videoname+'&affiliateId=0&allowFullScreen=true&autoStart=true" allowfullscreen="true" height="'+vheight+'" width="'+vwidth+'"></embed><br><a href="javascript:void(0);" onclick="hidevideo(\''+videoname+'\')">Click to close woO-TV window</a><br></center>';
  }

}



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


if (window.addEventListener)
window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu2)



