ordval=Math.floor (Math.random()*1000000);

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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  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 dealtimesearch () {
	key = document.dealtime.searchparam.value;
	top.location.href="http://terra.dealtime.com/BannerIn/?linkin_id=1021540&path=/GSE/GseWrapCache&nFormID=0&uid=758436501&Min_price=0&Max_price=0&MANUFACTER_ID=0&SortBy=0&header=us&keyword="+ key+ "&donde=0";
}
function multimedia(url,vw,vh) {
	options = "scrollbars=no,height=470,width=475";
	if (vw == null) vw = 240;
	if (vh == null) vh = 180;
	newWindow = window.open("http://www.terra.com/multimedia/multimedia.cfm?video="+url+"&vw="+vw+"&vh="+vh,'multimedia',options);
}
function mm(url,pref) {
        options = "scrollbars=no,height=470,width=475";
        if (pref == null) pref = 0;
        newWindow = window.open("http://www.terra.com/multimedia/mm_choice.html?video="+url+"&pref="+pref,'mmedia',options);
}
function audio(audiofile) {
	options = "scrollbars=no,height=200,width=285";
	newWindow = window.open("http://www.terra.com/multimedia/audio/audio.html?audio="+audiofile,'audio',options);
}
function openTvPlayer(szQs) {
        var szUrl = new String("http://multimedia.terra.com/ot_frameset.asp");
        if (szQs != "") {
                szUrl += szQs;
        }
	window.open(szUrl, "entplayer","height=615,width=800,toolbar=0,directories=0, location=0,status=0,scrollbars=1,resize=1,menubar=0,copyhistory=1");
}

function SearchIt () {
        if (document.fast.query.value == 0) {
                alert("ERROR: Has olvidado rellenar el campo de búsqueda, que no puede dejarse en blanco");
                return false;
        }
        if (document.fast.query.length < 3) {
                alert("ERROR: La palabra de búsqueda debe tener más de 3 caracteres");
                return false;
        }
	if (document.fast.multimedia.length == null) {
                document.fast.method = "get";
                document.fast.action = "http://buscador.terra.com/default.asp";
        } else {
                for (var i=0;i<document.fast.multimedia.length;i++) {
	                if (document.fast.multimedia[i].checked) {
	                        if (document.fast.multimedia[i].value == "image") {
	                                document.fast.action = "http://www.terra.com/cgi-bin/fast/legal.pl";
	                                document.fast.catalog.value = "image";
	                                document.fast.cgi.value="mm.pl";
	                        }
	                        if (document.fast.multimedia[i].value == "audio") {
	                                document.fast.action = "http://www.terra.com/cgi-bin/fast/legal.pl";
	                                document.fast.catalog.value = "audio";
	                                document.fast.cgi.value="mm.pl";
	                        }
	                        if (document.fast.multimedia[i].value == "video") {
	                                document.fast.action = "http://www.terra.com/cgi-bin/fast/legal.pl";
	                                document.fast.catalog.value = "video";
	                                document.fast.cgi.value="mm.pl";
	                        }
	                        if (document.fast.multimedia[i].value == "cancion")  {
	                                document.fast.action = "http://www.terra.com/cgi-bin/fast/legal.pl";
	                                document.fast.cgi.value="audio.pl";
	                        }
	                        if (document.fast.multimedia[i].value == "descargas")  {
	                                document.fast.action = "http://www.terra.com/cgi-bin/fast/ftp.pl";
	                        }
	                        if (document.fast.multimedia[i].value == "letra") {
	                                document.fast.action = "http://www.terra.com/cgi-bin/fast/legal.pl";
	                                document.fast.cgi.value = "lyrics.pl";
	                        }
	                        if (document.fast.multimedia[i].value == "multimedia") {
	                                document.fast.action = "http://www.terra.com/cgi-bin/fast/legal.pl";
	                                document.fast.catalog.value = "all";
	                                document.fast.cgi.value="mm.pl";
	                        }
	                        if (document.fast.multimedia[i].value == "internet") {
	                                document.fast.method = "get";
	                                document.fast.action = "http://buscador.terra.com/default.asp";
	                        }
	                        document.fast.submit();
                        }
                }
	}
}
function GetDomain () {
var url = ""+window.location+"";
if (url.indexOf("terra.com.pr",0) != -1)
        pcountry = "pr";
else
        pcountry = "us";
}
GetDomain();								

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) { 
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() {
  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; }
}

navType = navigator.appName;
navVer = parseInt(navigator.appVersion);

isIE=false; isNS4=false; isNS6=false;

if(document.layers) isNS4=true;
if(document.all) isIE=true;
if(!document.all && document.getElementById) isNS6=true;
