if(!SWFObject){if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;}
var iCont=0;var iWidth1=0;var iHeight1=0;var sDiv1="";var sFile1="";var sPreview1="";var floating1=false;var fullscreen=false;var sZonas="";function getKeyWords(title){title=title.toLowerCase();title=title.replace(/[àáâä]+/g,"a");title=title.replace(/[éèêë]+/g,"e");title=title.replace(/[ìíîï]+/g,"i");title=title.replace(/[óòôö]+/g,"o");title=title.replace(/[úùûü]+/g,"u");title=title.replace(/[ç]+/g,"c");title=title.replace(/\b/g,"_");title=title.replace(/\W/g,"");var words=title.split("_");var keywords="";for(var i=0;i<words.length;i++){if(3<words[i].length)
keywords+=","+words[i];}
if(keywords!="")
keywords=keywords.substring(1);return keywords;}
function showPlayer(sPlayer,sTags,sZonas,bStretch){var fo=new SWFObject(sPlayer,"movie_player",iWidth1,iHeight1,8,"#000000");fo.addParam("allowfullscreen",fullscreen1);fo.addParam("wmode","transparent");fo.addVariable("image",sPreview1);fo.addVariable("width",iWidth1);if(typeof(bStretch)!='undefined')
fo.addVariable("overstretch",bStretch);else
fo.addVariable("overstretch","true");fo.addVariable("height",iHeight1);fo.addVariable("file",sFile1);if(floating1)
fo.addVariable("displayheight",iHeight1);fo.addVariable("sZonas",sZonas);fo.addVariable("p1U",sZonas);fo.addVariable("sTags",sTags);fo.write(sDiv1);}
function loadMethodeVideo(div,w,h,sFile,sPreview,fullscreen,floating,sPortal,sZonas,sTitle,sCategory,bStretch){iWidth1=w;iHeight1=h;sDiv1=div;sFile1=sFile;sPreview1=sPreview;floating1=floating;fullscreen1=fullscreen;sTitle=getKeyWords(sTitle);sTags="CAT"+sCategory+",POR"+sPortal+","+sTitle;showPlayer("/swf/publi/CTVMediaPlayer.swf",sTags,sZonas,bStretch);}
function loadMethodeVideo(div,w,h,sFile,sPreview,fullscreen,floating,sPortal,sZonas,sTitle,sCategory,bStretch){var opciones={categoriaPubli:sCategory,titulo:sTitle,imgPrevia:sPreview,site:sPortal};PlayerWebTV.cargaVideo(div,sFile,w,h,opciones);}
function PlayerWebTV(){this.initted=false;this.portal=null;this.mosca=null;this.rutaConfig=null;}
PlayerWebTV.MIN_ANCHO_PLAYER=180;PlayerWebTV.MIN_ALTO_PLAYER=100;PlayerWebTV.BASE_CONFIG="/swf/playerWebTV/";PlayerWebTV.VERSION_FLASH=8;PlayerWebTV.COLOR_FONDO="#000000";PlayerWebTV.IDS_PORTALES={ABC:"abc",ABC_SEVILLA:"abcdesevilla"};PlayerWebTV.COLOR_FONDO="#000000";PlayerWebTV.ieCounter=1;PlayerWebTV.INFO_PORTALES={};PlayerWebTV.INFO_PORTALES[PlayerWebTV.IDS_PORTALES.ABC]={"resizer":"abc.es","servidores":["212.81.129.25:8280","abc.es"],"dominio":"http://www.abc.es"};PlayerWebTV.INFO_PORTALES[PlayerWebTV.IDS_PORTALES.ABC_SEVILLA]={"resizer":"abc.es","servidores":["212.81.129.25:8281","abcdesevilla.es"],"dominio":"http://www.abcdesevilla.es"};PlayerWebTV.cache={};PlayerWebTV.cargaVideo=function(div,sFile,w,h,opciones){var funcion=PlayerWebTV.cargaVideo;if(arguments.length<5){var uid=this.getUID("video");document.write('<div id="'+uid+'"></div>');var args=new Array(5);args[0]=uid;for(var i=0;i<arguments.length;i++){args[i+1]=arguments[i];}
funcion.call(this,args[0],args[1],args[2],args[3],args[4]);return;}
var player=null;var config=null;if(!opciones){opciones={};}
if(opciones){config=opciones.config||opciones.site;}
if(config==this.IDS_PORTALES.ABC){var exp=/(sevilla)|(212\.81\.129\.25:8281)/gi;if(exp.test(location.host)){config=this.IDS_PORTALES.ABC_SEVILLA;}}else if(config=="abcsevilla"){config=this.IDS_PORTALES.ABC_SEVILLA;}
if(!config){player=new PlayerWebTV();}else{if(!PlayerWebTV.cache[config]){PlayerWebTV.cache[config]=new PlayerWebTV();}
player=PlayerWebTV.cache[config];}
player.showVideo(div,sFile,w,h,opciones);};PlayerWebTV.nada=function(){};PlayerWebTV.getPortal=function(opciones){var result=null;if(opciones&&opciones.site){result=opciones.site;}else{var servidor=location.host;for(var portal in this.INFO_PORTALES){var servidores=this.INFO_PORTALES[portal].servidores;for(var i=0;i<servidores.length;i++){var candidato=servidores[i];if(servidor.indexOf(candidato)!=-1){result=portal;break;}}}}
return result;};PlayerWebTV.getCleanTitle=function(title){title=title.toLowerCase();title=title.replace(/[àáâä]+/g,"a");title=title.replace(/[éèêë]+/g,"e");title=title.replace(/[ìíîï]+/g,"i");title=title.replace(/[óòôö]+/g,"o");title=title.replace(/[úùûü]+/g,"u");title=title.replace(/[ç]+/g,"c");title=title.replace(/ñ/g,"n");title=title.replace(/[^ \w]/g,"");return title;};PlayerWebTV.getKeyWords=function(title){var keywords="";if(title){title=title.toLowerCase();title=title.replace(/[àáâä]+/g,"a");title=title.replace(/[éèêë]+/g,"e");title=title.replace(/[ìíîï]+/g,"i");title=title.replace(/[óòôö]+/g,"o");title=title.replace(/[úùûü]+/g,"u");title=title.replace(/[ç]+/g,"c");title=title.replace(/[ñ]+/g,"n");title=title.replace(/\b/g,"_");title=title.replace(/\W/g,"");var words=title.split("_");var keywords="";for(var i=0;i<words.length;i++){if(3<words[i].length)
keywords+=","+words[i];}
if(keywords!=""){keywords=keywords.substring(1);}}
return keywords;}
PlayerWebTV.cleanURL=function(url){if(url){return url.replace(/[^\w- ]/,"");}else{return url;}}
PlayerWebTV.getUID=function(prefijo){var result=[new Date().getTime(),Math.ceil(Math.random()*1000)];if(prefijo){result.splice(0,0,prefijo);}
return result.join("_");}
PlayerWebTV.prototype={init:function(opciones){var rutaConfig=null;var portal=this.portal;if(!this.portal){portal=this.portal=this.getPortal(opciones);}
var config=null;if(opciones){config=opciones.config||portal;}
if(!this.rutaConfig){var rutaConfig="config-por-defecto.xml";if(config){rutaConfig="config-"+config+".xml";}
this.rutaConfig=this.getURLBase("config/"+rutaConfig);}
if(!this.mosca){this.mosca={url:"",ancho:-1,alto:-1,img:null};}
if(config){if(!this.mosca.img){this.mosca.img=new Image();var urlMosca=this.getURLBase("imagenes/"+config+"/mosca.png");this.mosca.img.src=this.mosca.url=urlMosca;var moscaImg=this.mosca.img;var _this=this;if(moscaImg.complete){_this.cargarConfigMosca(moscaImg);}else{if(!moscaImg.onload){moscaImg.onload=function(){_this.cargarConfigMosca(moscaImg);}
moscaImg.onabort=moscaImg.onerror=function(){_this.initted=true;}}}}}else{this.initted=true;}
return this.initted;},cargarConfigMosca:function(logo){this.mosca.ancho=parseInt(logo.width,10);this.mosca.alto=parseInt(logo.height,10);this.initted=true;},calculaMosca:function(ancho,alto){try{var config=this.mosca;var mosca="mosca.png";var iAncho=parseInt(ancho,10);var iAlto=parseInt(alto,10);var altoMosca=config.alto;var anchoMosca=config.ancho;if((iAncho*0.5)<anchoMosca||(iAlto*0.3)<altoMosca){mosca="mosca-small.png";}
if(iAncho<this.MIN_ANCHO_PLAYER||iAlto<this.MIN_ALTO_PLAYER){mosca="";}
if(mosca){return config.url.substring(0,config.url.lastIndexOf("/")+1)+mosca;}else{return"";}}catch(e){return"";}},setValoresGoogleAnalytics:function(fo,opciones){var categorias=this.getCategoriasGoogleAnalytics(opciones);var result=[];result.push("channel::"+categorias[0]);result.push("subChannel::"+categorias[1]);fo.addVariable("googleAnalytics",result.join(","));},getCategoriasGoogleAnalytics:function(opciones){var categoria="";var subcategoria="";var url=location.pathname;var partes=url.split("/");partes.splice(0,1);if(partes[partes.length-1]==""){partes.splice(partes.length-1,1);}
if(partes.length>0){if(/^\d{8}/.test(partes[0])){partes.splice(0,1);}}
if(partes.length>0){if(partes[partes.length-1].indexOf(".")!=-1){if(partes[partes.length-1].indexOf(".asp")!=-1){var paginaTemp=partes[partes.length-1];partes[partes.length-1]=paginaTemp.replace(/\.asp/gi,"");}else{partes.splice(partes.length-1,1);}}}
if(partes.length==0){categoria="portada";}else if(partes.length==1){categoria=this.cleanURL(partes[0]);}else{categoria=this.cleanURL(partes[0]);subcategoria=this.cleanURL(partes[1]);}
return[categoria,subcategoria];},setValoresAdvernet:function(fo,opciones){var result=[];var tags=null;if(opciones){tags=opciones.tags||this.getKeyWords(opciones.titulo)||"";}
if(tags){tags=tags.replace(/[, ]/g,"-");result.push("tags::"+tags);}
var categoria=undefined;var subcategoria=undefined;if(opciones){categoria=opciones.categoriaPubli||undefined;subcategoria=opciones.subcategoriaPubli||undefined;}
result.push("channel::"+categoria);result.push("subChannel::"+subcategoria);fo.addVariable("advernet",result.join(","));},_showVideo:function(id,video,w,h,opciones){var funcion=this._showVideo;if(arguments.length<5){var uid=this.getUID("video");document.write('<div id="'+uid+'"></div>');var args=new Array(5);args[0]=uid;for(var i=0;i<arguments.length;i++){args[i+1]=arguments[i];}
funcion.call(this,args[0],args[1],args[2],args[3],args[4]);return;}
if(!opciones){opciones={};}
if(!this.init(opciones)){var _this=this;setTimeout(function(){funcion.call(_this,id,video,w,h,opciones);},500);return;}
var idPlayer=this.getUID("movie_player");var fo=new SWFObject(this.getURLBase("FLVPlayer.swf"),idPlayer,w,h,this.VERSION_FLASH,this.COLOR_FONDO);fo.addParam("wmode","transparent");fo.addParam("swLiveConnect","true");fo.addParam("allowScriptAccess","always");if(this.rutaConfig){fo.addVariable("config",this.rutaConfig);}
fo.addVariable("file",video);fo.addVariable("width",parseInt(w,10));fo.addVariable("height",parseInt(h,10));this.setValoresGoogleAnalytics(fo,opciones);this.setValoresAdvernet(fo,opciones);if(opciones){if(!opciones.titulo){opciones.titulo="Desconocido";}
opciones.titulo=this.getCleanTitle(opciones.titulo);if(opciones.fullscreen!==false){fo.addParam("allowfullscreen","true");}
if(opciones.imgPrevia){fo.addVariable("image",this.getURLResizer(opciones.imgPrevia,w,h));}
if(opciones.autoplay){fo.addVariable("autostart","true");}
var mosca=this.calculaMosca(w,h);if(mosca){fo.addVariable("logo","image::"+mosca);}
if(opciones.ajustar===true){fo.addVariable("overstretch","overstretch");}else if(opciones.ajustar===false){fo.addVariable("overstretch","maintain");}else if(opciones.ajustar){fo.addVariable("overstretch",opciones.ajustar);}else{fo.addVariable("overstretch","maintain");}
if(opciones.titulo){fo.addVariable("title",opciones.titulo);}}else{fo.addParam("allowfullscreen","true");fo.addVariable("autostart","false");fo.addVariable("overstretch","maintain");}
if(navigator&&navigator.appName&&navigator.appName=="Microsoft Internet Explorer"){setTimeout(function(){fo.write(id);PlayerWebTV.ieCounter--;},500*PlayerWebTV.ieCounter++);}else{fo.write(id);}},showVideo:function(id,video,w,h,opciones){var funcion=this.showVideo;if(arguments.length<5){var uid=this.getUID("video");document.write('<div id="'+uid+'"></div>');var args=new Array(5);args[0]=uid;for(var i=0;i<arguments.length;i++){args[i+1]=arguments[i];}
funcion.call(this,args[0],args[1],args[2],args[3],args[4]);return;}
if(!opciones){opciones={};}
var _this=this;if(!this.init(opciones)){setTimeout(function(){funcion.call(_this,id,video,w,h,opciones);},500);return;}
var contenedor=document.getElementById(id);if(contenedor){var alto=parseInt(h,10);var ancho=parseInt(w,10);var style="width: "+w+"px;";style+="height: "+h+"px;";var tamIcono=[64,61];var styleIcono="left: "+(ancho/2-tamIcono[0]/2)+"px; top: "+(alto/2-tamIcono[1]/2)+"px;";var html='<div style="text-align: center;"><div style="margin: auto; cursor: pointer; background-color: '+this.COLOR_FONDO+'; width: '+w+'px; height: '+h+'px;">';if(opciones&&opciones.imgPrevia){var rutaImg=opciones.imgPrevia;var urlPreviaRedimensionada=this.getURLResizer(rutaImg,w,h,"play.png");html+='<img src="'+urlPreviaRedimensionada+'" alt="Pulse para ver el video" title="Pulse para ver el video" style="border-width: 0 !important; '+style+'" />';}
html+='</div></div>';contenedor.innerHTML=html;var nodo=contenedor.firstChild;opciones.autoplay=true;nodo.onclick=function(){_this._showVideo(id,video,w,h,opciones);this.onclick=_this.nada;};}},getURLBase:function(url){if(this.portal){return this.INFO_PORTALES[this.portal].dominio+this.BASE_CONFIG+url;}else{return this.BASE_CONFIG+url;}},getFullURL:function(src){if(src.indexOf("/")==0){src=location.protocol+"//"+location.host+src;}
return src;},getURLResizer:function(src,ancho,alto,marcaAgua){var result=this.getFullURL(src);if(this.portal){var medio="";var medio=this.INFO_PORTALES[this.portal].resizer;if(!medio){medio=this.portal+".es";}
if(marcaAgua){result="http://foto-cache."+medio+"/resizer/resizer.php?imagen="+result+"&nuevoancho="+ancho+"&nuevoalto="+alto+"&copyright=false&encrypt=false&marcaagua=marcasagua/"+marcaAgua+"&posmarca=C&transparencia=100";}else{result="http://foto-cache."+medio+"/resizer/resizer.php?imagen="+result+"&nuevoancho="+ancho+"&nuevoalto="+alto+"&copyright=conCopyright&encrypt=false";}}
return result;}};(function(){var prototipo=PlayerWebTV.prototype;for(var prop in PlayerWebTV){if(prop!="prototype"){prototipo[prop]=PlayerWebTV[prop];}}})();