var startList=function(){
if(document.all&&document.getElementById){
navRoot=document.getElementById("menuul");
if(navRoot!=null){
for(i=0;i<navRoot.childNodes.length;i++){
node=navRoot.childNodes[i];
if(node.nodeName=="LI"){
node.onmouseover=function(){
this.className+=" over";
};
node.onmouseout=function(){
this.className=this.className.replace(" over","");
};
}
}
}
navRoot=document.getElementById("lista");
if(navRoot!=null){
for(i=0;i<navRoot.childNodes.length;i++){
node=navRoot.childNodes[i];
if(node.nodeName=="LI"){
node.onmouseover=function(){
this.className+=" over";
};
node.onmouseout=function(){
this.className=this.className.replace(" over","");
};
}
}
}
}
};
window.onload=startList;
function abrirMapa(_1){
window.open(_1,"TST","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,width=400px,height=432px");
}
function abrirCorteAudio(_2){
window.open(_2,"CA","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,width=470px,height=170px");
}
function abrirCorteVideo(_3){
window.open(_3,"TV","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,width=550px,height=380px");
}
function abrirCorteVideoInternauta(_4,_5,_6){
window.open(_4,"TV","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,width="+_5+"px,height="+_6+"px");
}
function aR(_7,_8){
pixel=new Image();
parent.location.href=_7;
pixel.src="http://www.eldia.es/i/t1.gif?"+_8;
}
function installSearch(){
if((typeof window.sidebar=="object")&&(typeof window.sidebar.addSearchEngine=="function")){
window.sidebar.addSearchEngine("http://www.eldia.es/js/busquedas.src","http://www.eldia.es/i/busquedas.gif","eldia.es","Web");
}else{
if(window.external.AddSearchProvider){
window.external.AddSearchProvider("http://www.eldia.es/js/busquedas.xml");
}else{
alert("Lo sentimos. Navegador no soportado");
}
}
}
var bustcachevar=1;
var loadstatustext="<div style='color:#b2b8b9; font-size: 11px;'><img src='http://www.eldia.es/i/cargando.gif' /> cargando ...</div>";
var loadedobjects="";
var defaultcontentarray=new Object();
var bustcacheparameter="";
function ajaxpage(_9,_a,_b){
var _c=false;
if(window.XMLHttpRequest){
_c=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
try{
_c=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_c=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
}
}else{
return false;
}
}
var _d=_b.parentNode.parentNode.getElementsByTagName("li");
for(var i=0;i<_d.length;i++){
_d[i].className="";
}
_b.parentNode.className="selected";
if(_9.indexOf("#default")!=-1){
document.getElementById(_a).innerHTML=defaultcontentarray[_a];
return;
}
document.getElementById(_a).innerHTML=loadstatustext;
_c.onreadystatechange=function(){
loadpage(_c,_a);
};
if(bustcachevar){
bustcacheparameter=(_9.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime();
}
_c.open("GET",_9+bustcacheparameter,true);
_c.send(null);
}
function loadpage(_f,_10){
if(_f.readyState==4&&(_f.status==200||window.location.href.indexOf("http")==-1)){
document.getElementById(_10).innerHTML=_f.responseText;
}
}
function loadobjs(_11){
if(_11!=null&&_11!=""){
var _12=_11.split(/\s*,\s*/);
for(var i=0;i<_12.length;i++){
var _14=_12[i];
var _15="";
if(loadedobjects.indexOf(_14)==-1){
if(_14.indexOf(".js")!=-1){
_15=document.createElement("script");
_15.setAttribute("type","text/javascript");
_15.setAttribute("src",_14);
}else{
if(_14.indexOf(".css")!=-1){
_15=document.createElement("link");
_15.setAttribute("rel","stylesheet");
_15.setAttribute("type","text/css");
_15.setAttribute("href",_14);
}
}
}
if(_15!=""){
document.getElementsByTagName("head").item(0).appendChild(_15);
loadedobjects+=_14+" ";
}
}
}
}
function expandtab(_16,_17){
var _18=document.getElementById(_16).getElementsByTagName("a")[_17];
if(_18.getAttribute("rel")){
ajaxpage(_18.getAttribute("href"),_18.getAttribute("rel"),_18);
loadobjs(_18.getAttribute("rev"));
}
}
function savedefaultcontent(_19){
if(typeof defaultcontentarray[_19]=="undefined"){
defaultcontentarray[_19]=document.getElementById(_19).innerHTML;
}
}
function startajaxtabs(){
for(var i=0;i<arguments.length;i++){
var _1b=document.getElementById(arguments[i]);
var _1c=_1b.getElementsByTagName("li");
for(var x=0;x<_1c.length;x++){
var _1e=_1c[x].getElementsByTagName("a")[0];
if(_1e.getAttribute("rel")){
var _1f=_1e.getAttribute("href").replace(/^http:\/\/[^\/]+\//i,"http://"+window.location.hostname+"/");
_1e.setAttribute("href",_1f);
savedefaultcontent(_1e.getAttribute("rel"));
_1e.onclick=function(){
ajaxpage(this.getAttribute("href"),this.getAttribute("rel"),this);
loadobjs(this.getAttribute("rev"));
return false;
};
if(_1c[x].className=="selected"){
ajaxpage(_1e.getAttribute("href"),_1e.getAttribute("rel"),_1e);
loadobjs(_1e.getAttribute("rev"));
}
}
}
}
}
function Left(str,n){
if(n<=0){
return "";
}else{
if(n>String(str).length){
return str;
}else{
return String(str).substring(0,n);
}
}
}
function Right(str,n){
if(n<=0){
return "";
}else{
if(n>String(str).length){
return str;
}else{
var _24=String(str).length;
return String(str).substring(_24,_24-n);
}
}
}
function getCookieVal(_25){
var _26=document.cookie.indexOf(";",_25);
if(_26==-1){
_26=document.cookie.length;
}
return unescape(document.cookie.substring(_25,_26));
}
function GetCookie(_27){
var arg=_27+"=";
var _29=arg.length;
var _2a=document.cookie.length;
var i=0;
while(i<_2a){
var j=i+_29;
if(document.cookie.substring(i,j)==arg){
return getCookieVal(j);
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
return null;
}
}
return null;
}
function MostrarNombre(){
var _2d;
_2d=GetCookie("ELDIAuser");
var ns6=(document.getElementById&&!document.all)?true:false;
if(ns6){
if(_2d==null){
document.write("<a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>Suscriptores</a>");
}else{
if(unescape(_2d).length<15){
document.write("<span class=us><a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>"+unescape(_2d)+"</a> <a href=http://www.eldia.es/eldia/suscriptores.jsp?accion=salir class=us>(Quitar)</a></span>");
}else{
document.write("<span class=us><a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>"+Left(unescape(_2d),14)+"...</a> <a href=http://www.eldia.es/eldia/suscriptores.jsp?accion=salir class=us>(Quitar)</a></span>");
}
}
}else{
if(navigator.appName=="Netscape"){
if(_2d==null){
document.write("<a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>Suscriptores</a>");
}else{
if(unescape(_2d).length<15){
document.write("<span class=us><a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>"+unescape(_2d)+"</a> <a href=http://www.eldia.es/eldia/suscriptores.jsp?accion=salir class=us>(Quitar)</a></span>");
}else{
document.write("<span class=us><a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>"+Left(unescape(_2d),14)+"...</a> <a href=http://www.eldia.es/eldia/suscriptores.jsp?accion=salir class=us>(Quitar)</a></span>");
}
}
}else{
if(_2d==null){
document.write("<a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>Suscriptores</a>");
}else{
if(unescape(_2d).length<15){
document.write("<span class=us><a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>"+unescape(_2d)+"</a> <a href=http://www.eldia.es/eldia/suscriptores.jsp?accion=salir class=us>(Quitar)</a></span>");
}else{
document.write("<span class=us><a href=http://www.eldia.es/eldia/suscriptores.jsp class=us>"+Left(unescape(_2d),14)+"...</a> <a href=http://www.eldia.es/eldia/suscriptores.jsp?accion=salir class=us>(Quitar)</a></span>");
}
}
return;
}
}
}
function tabberObj(_2f){
var arg;
this.div=null;
this.classMain="tabber";
this.classMainLive="tabberlive";
this.classTab="tabbertab";
this.classTabDefault="tabbertabdefault";
this.classNav="tabbernav";
this.classTabHide="tabbertabhide";
this.classNavActive="tabberactive";
this.titleElements=["h2","h3","h4","h5","h6"];
this.titleElementsStripHTML=true;
this.removeTitle=true;
this.addLinkId=false;
this.linkIdFormat="<tabberid>nav<tabnumberone>";
for(arg in _2f){
this[arg]=_2f[arg];
}
this.REclassMain=new RegExp("\\b"+this.classMain+"\\b","gi");
this.REclassMainLive=new RegExp("\\b"+this.classMainLive+"\\b","gi");
this.REclassTab=new RegExp("\\b"+this.classTab+"\\b","gi");
this.REclassTabDefault=new RegExp("\\b"+this.classTabDefault+"\\b","gi");
this.REclassTabHide=new RegExp("\\b"+this.classTabHide+"\\b","gi");
this.tabs=new Array();
if(this.div){
this.init(this.div);
this.div=null;
}
}
tabberObj.prototype.init=function(e){
var _32,i,i2,t,defaultTab=0,DOM_ul,DOM_li,DOM_a,aId,headingElement;
if(!document.getElementsByTagName){
return false;
}
if(e.id){
this.id=e.id;
}
this.tabs.length=0;
_32=e.childNodes;
for(i=0;i<_32.length;i++){
if(_32[i].className&&_32[i].className.match(this.REclassTab)){
t=new Object();
t.div=_32[i];
this.tabs[this.tabs.length]=t;
if(_32[i].className.match(this.REclassTabDefault)){
defaultTab=this.tabs.length-1;
}
}
}
DOM_ul=document.createElement("ul");
DOM_ul.className=this.classNav;
for(i=0;i<this.tabs.length;i++){
t=this.tabs[i];
t.headingText=t.div.title;
if(this.removeTitle){
t.div.title="";
}
if(!t.headingText){
for(i2=0;i2<this.titleElements.length;i2++){
headingElement=t.div.getElementsByTagName(this.titleElements[i2])[0];
if(headingElement){
t.headingText=headingElement.innerHTML;
if(this.titleElementsStripHTML){
t.headingText.replace(/<br>/gi," ");
t.headingText=t.headingText.replace(/<[^>]+>/g,"");
}
break;
}
}
}
if(!t.headingText){
t.headingText=i+1;
}
DOM_li=document.createElement("li");
t.li=DOM_li;
DOM_a=document.createElement("a");
DOM_a.appendChild(document.createTextNode(t.headingText));
DOM_a.href="javascript:void(null);";
DOM_a.title=t.headingText;
DOM_a.onclick=this.navClick;
DOM_a.tabber=this;
DOM_a.tabberIndex=i;
if(this.addLinkId&&this.linkIdFormat){
aId=this.linkIdFormat;
aId=aId.replace(/<tabberid>/gi,this.id);
aId=aId.replace(/<tabnumberzero>/gi,i);
aId=aId.replace(/<tabnumberone>/gi,i+1);
aId=aId.replace(/<tabtitle>/gi,t.headingText.replace(/[^a-zA-Z0-9\-]/gi,""));
DOM_a.id=aId;
}
DOM_li.appendChild(DOM_a);
DOM_ul.appendChild(DOM_li);
}
e.insertBefore(DOM_ul,e.firstChild);
e.className=e.className.replace(this.REclassMain,this.classMainLive);
this.tabShow(defaultTab);
if(typeof this.onLoad=="function"){
this.onLoad({tabber:this});
}
return this;
};
tabberObj.prototype.navClick=function(_33){
var _34,a,self,tabberIndex,onClickArgs;
a=this;
if(!a.tabber){
return false;
}
self=a.tabber;
tabberIndex=a.tabberIndex;
a.blur();
if(typeof self.onClick=="function"){
onClickArgs={"tabber":self,"index":tabberIndex,"event":_33};
if(!_33){
onClickArgs.event=window.event;
}
_34=self.onClick(onClickArgs);
if(_34===false){
return false;
}
}
self.tabShow(tabberIndex);
return false;
};
tabberObj.prototype.tabHideAll=function(){
var i;
for(i=0;i<this.tabs.length;i++){
this.tabHide(i);
}
};
tabberObj.prototype.tabHide=function(_36){
var div;
if(!this.tabs[_36]){
return false;
}
div=this.tabs[_36].div;
if(!div.className.match(this.REclassTabHide)){
div.className+=" "+this.classTabHide;
}
this.navClearActive(_36);
return this;
};
tabberObj.prototype.tabShow=function(_38){
var div;
if(!this.tabs[_38]){
return false;
}
this.tabHideAll();
div=this.tabs[_38].div;
div.className=div.className.replace(this.REclassTabHide,"");
this.navSetActive(_38);
if(typeof this.onTabDisplay=="function"){
this.onTabDisplay({"tabber":this,"index":_38});
}
return this;
};
tabberObj.prototype.navSetActive=function(_3a){
this.tabs[_3a].li.className=this.classNavActive;
return this;
};
tabberObj.prototype.navClearActive=function(_3b){
this.tabs[_3b].li.className="";
return this;
};
function tabberAutomatic(_3c){
var _3d,divs,i;
if(!_3c){
_3c={};
}
_3d=new tabberObj(_3c);
divs=document.getElementsByTagName("div");
for(i=0;i<divs.length;i++){
if(divs[i].className&&divs[i].className.match(_3d.REclassMain)){
_3c.div=divs[i];
divs[i].tabber=new tabberObj(_3c);
}
}
return this;
}
function tabberAutomaticOnLoad(_3e){
var _3f;
if(!_3e){
_3e={};
}
_3f=window.onload;
if(typeof window.onload!="function"){
window.onload=function(){
tabberAutomatic(_3e);
};
}else{
window.onload=function(){
_3f();
tabberAutomatic(_3e);
};
}
}
if(typeof tabberOptions=="undefined"){
tabberAutomaticOnLoad();
}else{
if(!tabberOptions["manualStartup"]){
tabberAutomaticOnLoad(tabberOptions);
}
}
function LoadTV(width, height, divName)
{
    var urlVideo = 'file=rtmp://emiratv.interlake.net/live&id=emira_eldia&start=5&displayheight=138&overstretch=fit&bufferlength=1&type=rtmp&autostart=true&enablejs=false&javascriptid=single&volume=20&smoothing=false&image=http://www.eldia.es/i/tv/logo.gif&link=http://www.eldia.tv/&linkfromdisplay=true';
    var urlPlayer = '/swf/flvplayer.swf';

    var div = document.getElementById(divName);

    var embed = document.createElement('embed');
    embed.setAttribute('width',width);
    embed.setAttribute('height',height);
    embed.setAttribute('flashvars',urlVideo);
    embed.setAttribute('allowfullscreen','false');
    embed.setAttribute('quality','low');
    embed.setAttribute('name','single');
    embed.setAttribute('id','single');
    embed.setAttribute('style','');
    embed.setAttribute('src',urlPlayer);
    embed.setAttribute('type','application/x-shockwave-flash');
    
    
    div.appendChild(embed);
    
}

