function mOvr(src,clrOver)
{
	if (!src.contains(event.fromElement))
	{
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
	}
}

function mOut(src,clrIn)
{
	if (!src.contains(event.toElement))
	{
		src.style.cursor = 'default';
		src.bgColor = clrIn;
	}
}

function mClk(src)
{
	if(event.srcElement.tagName=='TD')
	{
		src.children.tags('A')[0].click();
	}
}

function show(id)
{
	if(navigator.appName=='Microsoft Internet Explorer')
	{
		document.all[id].style.visibility = "visible";
	}
	else
	{
		document[id].visibility = "visible";
		ajuPos();
	}
}

function hide(id)
{
	if(navigator.appName=='Microsoft Internet Explorer')
	{
		document.all[id].style.visibility = "hidden";
	}
	else
	{
		document[id].visibility = "hidden";
		ajuPos();
	}
}

function ajuPos()
{
	document.L2.pageX = document.L1.pageX;
	document.L2.pageY = document.L1.pageY;
	document.L3.pageX = document.L1.pageX;
	document.L3.pageY = document.L1.pageY;
}

function popupGaleriaVideo(id,video)
{
	
	window.open('/multishow/video/galeria.asp?canal=multishow&id='+id+'&video_id='+video,'video_Multishow','width=617, height=392,resizable=0,status=0,menubar=0,scrollbars=0');
}

function Sinopse(fid, pid, eid)
{
	window.open('/multishow/sessoes/sinopse.asp?fid='+fid+'&pid='+pid+'&eid='+eid,'sinopse','toolbar=0,directories=0,menubar=0,status=0,scrollbars=0,resizable=0,maximized=0,top=60,left=100,height=300,width=402');
}

function popNoticias(URL)
{
	window.open('/multishow/sessoes/'+URL,'NoticiasGeral','width=270,height=342');
}

function MostraTVZ(ID)
{
	if (ID == 1)
	{
		if (TVZ1.style.display=="")
		{
			TVZ1.style.display="none";
		return;
		}
		else
		{
			TVZ1.style.display="";
			TVZ2.style.display="none";
			TVZ3.style.display="none";
			TVZ4.style.display="none";
			TVZ5.style.display="none";
			return;
		}
	}
	if (ID == 2)
		{
			if (TVZ2.style.display=="")
		{
			TVZ2.style.display="none";
			return;
		}
		else
		{
			TVZ1.style.display="none";
			TVZ2.style.display="";
			TVZ3.style.display="none";
			TVZ4.style.display="none";
			TVZ5.style.display="none";
			return;
		}
	}
	if (ID == 3)
	{
		if (TVZ3.style.display=="")
		{
			TVZ3.style.display="none";
			return;
		}
		else
		{
			TVZ1.style.display="none";
			TVZ2.style.display="none";
			TVZ3.style.display="";
			TVZ4.style.display="none";
			TVZ5.style.display="none";
			return;
		}
	}
	if (ID == 4)
	{
		if (TVZ4.style.display=="")
		{
			TVZ4.style.display="none";
			return;
		}
		else
		{
			TVZ1.style.display="none";
			TVZ2.style.display="none";
			TVZ3.style.display="none";
			TVZ4.style.display="";
			TVZ5.style.display="none";
			return;
		}
	}
	if (ID == 5)
	{
		if (TVZ5.style.display=="")
		{
			TVZ5.style.display="none";
			return;
		}
		else
		{
			TVZ1.style.display="none";
			TVZ2.style.display="none";
			TVZ3.style.display="none";
			TVZ4.style.display="none";
			TVZ5.style.display="";
		return;
		}
	}
}

function MostraBitseBytes(ID)
{
	if (ID == 1)
	{
		if (BitseBytes1.style.display=="")
		{
			BitseBytes1.style.display="none";
			return;
		}
			else
		{
			BitseBytes1.style.display="";
			BitseBytes2.style.display="none";
			BitseBytes3.style.display="none";
			return;
		}
	}
	if (ID == 2)
	{
		if (BitseBytes2.style.display=="")
		{
			BitseBytes2.style.display="none";
			return;
		}
			else
		{
			BitseBytes1.style.display="none";
			BitseBytes2.style.display="";
			BitseBytes3.style.display="none";
			return;
		}
	}
	if (ID == 3)
	{
		if (BitseBytes3.style.display=="")
		{
			BitseBytes3.style.display="none";
			return;
		}
			else
		{
			BitseBytes1.style.display="none";
			BitseBytes2.style.display="none";
			BitseBytes3.style.display="";
			return;
		}
	}
}
function abrePerfil(mid,id)
{
	
	window.open('/multishow/programas/pop_perfil.asp?mid='+mid+'&id='+id,'perfil_Multishow','width=402,height=300,resizable=0,status=0,menubar=0,scrollbars=0');
}

function MM_showHideLayers() { //v3.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
		obj.visibility=v; }
}

activeElement = null;

function makeActive(el){
  if (activeElement) {
	//activeElement.children(0).style.borderColor = "inactiveborder";
    //activeElement.children(1).style.backgroundColor = "inactivecaption";
    //activeElement.children(1).style.color = "inactivecaptiontext";
  }
  el.style.zIndex = (activeElement) ? (activeElement.style.zIndex+1) : 1;
  //el.children(0).style.borderColor = "inactiveborder";
  //el.children(1).style.backgroundColor = "inactivecaption";
  //el.children(1).style.color = "inactivecaptiontext";
  activeElement = el;
}

currentX = currentY = null;
whichEl = null;

function grabEl(el) {
   whichEl = el;
   makeActive(whichEl);
   event.cancelBubble = true;
   whichEl.style.pixelLeft = whichEl.offsetLeft;
   whichEl.style.pixelTop = whichEl.offsetTop;
   currentX = (event.clientX + document.body.scrollLeft);
   currentY = (event.clientY + document.body.scrollTop); 
   document.onmousemove = moveEl;
   document.onmouseup = dropEl;
   event.returnValue = false;   
}
    
function moveEl() {
   newX = (event.clientX + document.body.scrollLeft);
   newY = (event.clientY + document.body.scrollTop);
   distanceX = (newX - currentX);
   distanceY = (newY - currentY);
   currentX = newX;
   currentY = newY;
   whichEl.style.pixelLeft += distanceX;
   whichEl.style.pixelTop += distanceY;
   event.returnValue = false;
}
    
function dropEl() {
   document.onmousemove = document.onmouseup = null;
}

function MM_reloadPage(init) { 
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);




function MM_findObj(n, d) { //v4.0
	var p,i,x;	if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function abrepsiu(url) {
vPosicao_Y = ((screen.availWidth/2)-160);
vPosicao_X = ((screen.availHeight/2)-145);
janela= window.open('http://psiu.globo.com/Globo.com/GloboChat/glb_convidado_pop/'+url+'.html','poppsiu','width=292,height=292,resizable=no,status=no,menubar=no,scrollbars=no,location=0,top=' + vPosicao_X + ',left=' + vPosicao_Y);
janela.focus();
}

function abrepsiulogin() {
vPosicao_Y = ((screen.availWidth/2)-160);
vPosicao_X = ((screen.availHeight/2)-145);
janela= window.open('http://psiu.globo.com/Globo.com/GloboChat/glb_pop_auditorio/0,,22,00.html','poppsiu','width=320,height=290,resizable=no,status=no,menubar=no,scrollbars=no,location=0,top=' + vPosicao_X + ',left=' + vPosicao_Y);
janela.focus();
}
