
var isIE=(navigator.userAgent.indexOf('MSIE')!=-1);function $(objID)
{return document.getElementById(objID);};function $SetTargetBlankForAllHref()
{var _as=document.getElementsByTagName('a');for(var i=0;i<_as.length;i++)
{if(_as[i].target=='')
{var hrf=_as[i].href;if(hrf=='')
break;var reg=new RegExp(/javascript/ig);if(!reg.test(hrf))
_as[i].target='_blank';}}};function $CreateFlashControl(src_,width,height)
{var HTML='<object align="baseline" border="0" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" ';if(width!=0)
HTML+=' width="'+width+'"';else
HTML+=' width="200"';if(height!=0)
HTML+=' height="'+height+'"';else
HTML+=' height="150"';HTML+=' >';HTML+='<param name="_cx" value="5292" />';HTML+='<param name="_cy" value="3969" />';HTML+='<param name="FlashVars" value="5292" />';HTML+='<param name="Movie" value="'+src_+'" />';HTML+='<param name="Src" value="'+src_+'" />';HTML+='<param name="WMode" value="Transparent" />';HTML+='<param name="Play" value="-1" />';HTML+='<param name="Loop" value="-1" />';HTML+='<param name="Quality" value="High" />';HTML+='<param name="SAlign" value="" />';HTML+='<param name="Menu" value="-1" />';HTML+='<param name="Base" value="" />';HTML+='<param name="AllowScriptAccess" value="always" />';HTML+='<param name="Scale" value="ShowAll" />';HTML+='<param name="DeviceFont" value="0" />';HTML+='<param name="EmbedMovie" value="0" />';HTML+='<param name="BGColor" value="" />';HTML+='<param name="SWRemote" value="" />';HTML+='<embed src="'+src_+'"';HTML+=' wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer"';HTML+=' type="application/x-shockwave-flash"';HTML+=' name="AdObj1" quality="High"';if(width!=0)
HTML+=' width="'+width+'"';else
HTML+=' width="200"';if(height!=0)
HTML+=' height="'+height+'"';else
HTML+=' height="150"';HTML+=' >';HTML+='</object>';return HTML;};function $TabClick(this_)
{Os_Tab.$Click(this_,function(){document.getElementById('mode').value=this_.id;});};var o_Tab={$c:function(this_,function_)
{var _parentNode=this_.parentNode;var Nodes=_parentNode.childNodes;for(var i=0;i<Nodes.length;i++)
{var tab_=Nodes[i];if(tab_.nodeName.toLowerCase()!='div')
continue;if(this_==tab_)
tab_.className='curnav';else
tab_.className='';}
if(function_)
function_();}};function o_Tab1(this_,search_,url_)
{o_Tab.$c(this_,function()
{var osearch=$('otextsearch');var frm=$('o_frmSearch');var mod=$('o_SearchMode');if(search_=='video')
{frm.action='http://video.zing.vn/zv/search/do.1.html';osearch.name='sc';mod.name='ws';mod.value='vietnam';return;}
else if(search_=='movie')
frm.action='http://movie.zing.vn/Movie/Search.aspx?t=0';if(search_!='')
mod.value=search_;else
window.location=url_;osearch.name='q';});};function o_Tab2(this_,id_)
{o_Tab.$c(this_,function()
{});};function o_Tab3(this_,id_)
{o_Tab.$c(this_,function()
{var objid=$('_box_'+id_);if(objid)
{var objcontainer=objid.parentNode.childNodes;for(var i=0;i<objcontainer.length;i++)
{var tab_=objcontainer[i];if(tab_.nodeName.toLowerCase()!='div')
continue;if(objid.id==tab_.id)
tab_.style.display='block';else
tab_.style.display='none';}}});};function $(objID)
{return document.getElementById(objID);};function openWindow(src,title,width,height)
{var leftPos=(screen.availWidth-width)/2;var topPos=(screen.availHeight-height)/2;if(isIE)
{window.open(src,title,'toolbar=no'+',location=no'+',status=yes'+',menubar=no'+',scrollbars=yes'+',resizable=yes'+',width='+width+',height='+height+',top='+topPos+',left='+leftPos);return false;}
else
{window.open(src,title,'height='+height+', width='+width+', left='+leftPos+', top='+topPos+', resizable=yes, scrollbars=yes, toolbar=no, status=yes');return false;}};function voidnull(para)
{};function $RandAdvertisement(boxID,width,height,arrAd)
{var n=arrAd.length;var rand=Math.floor(Math.random()*n+1);rand=arrAd[rand%n];var innerboxID=$(boxID);switch(rand[0])
{case'adz':selectAd(rand[1],boxID);break;case'fla':innerboxID.innerHTML=$CreateFlashControl(rand[1],width,height);break;case'img':innerboxID.innerHTML='<a href="'+rand[1]+'" target="_blank"><img src="'+rand[2]+'" width="'+width+'px" height="'+height+'px" alt="" /></a>';break;case'ifr':innerboxID.innerHTML=rand[1];break;}};
