ZetaProperties={};ZetaProperties.interactive_id=30;ZetaProperties.question_id=10;ZetaProperties.answer_id_votesup=10;ZetaProperties.answer_id_votesdown=11;ZetaProperties.offensive_id_votes=30;ZetaProperties.supath="/susp/";ZetaProperties.searcherpath="/buscadorsp/";ZetaProperties.publisherwebpath="/publishersp/";ZetaProperties.statspath="/stats/";ZetaProperties.domain="D_SP";ZetaProperties.destpub="P_SPORT";I18n={};I18n.es={};I18n.ca={};JsZetaUtils={};JsZetaUtils.Paths={BasePath:document.location.protocol+"//"+document.location.host+"/",LocaleFromPath:document.location.pathname.split("/")[1],BasePathLocale:document.location.protocol+"//"+document.location.host+"/"+document.location.pathname.split("/")[1]+"/",BasePathLocalePreview:document.location.protocol+"//"+document.location.host+"/"+document.location.pathname.split("/")[2]+"/"};JsZetaUtils.SuPath=ZetaProperties.supath;JsZetaUtils.StatsPath=ZetaProperties.statspath;JsZetaUtils.Domain=ZetaProperties.domain;JsZetaUtils.PublisherWebPath=ZetaProperties.publisherwebpath;JsZetaUtils.IsPreview=function(){return"/"+document.location.pathname.split("/")[1]+"/"==JsZetaUtils.PublisherWebPath;};JsZetaUtils.HasFiles={hash:function(id){var id=id.toString();var size=id.length;if(size==1){return"/"+id.charAt(size-1)+"/0/";}else{return"/"+id.charAt(size-1)+"/"+id.charAt(size-2)+"/";}}};JsZetaUtils.timestamp=function(){return new Date().getTime();};JsZetaUtils.timestampM=function(){dateT1=new Date;dayT1=dateT1.getDate();if(dayT1<10){dayT1="0"+dayT1;}monthT1=dateT1.getMonth()+1;if(monthT1<10){monthT1="0"+monthT1;}yeatT1=dateT1.getFullYear();hourT1=dateT1.getHours();if(hourT1<10){hourT1="0"+monthT1;}minutesT1=dateT1.getMinutes();if(minutesT1<10){minutesT1="0"+minutesT1;}return yeatT1+monthT1+dayT1+hourT1+minutesT1;};JsZetaUtils.getParameterUrl=function(name){var q=document.location.search;var i=q.indexOf(name+"=");if(i==-1){return 0;}var r=q.substr(i+name.length+1,q.length-i-name.length-1);i=r.indexOf("&");if(i!=-1){r=r.substr(0,i);}valor=r.replace(/\+/g," ");return valor;};JsZetaUtils.getParameterUrl2=function(url,name){var q=url;var i=q.indexOf(name+"=");if(i==-1){return 0;}var r=q.substr(i+name.length+1,q.length-i-name.length-1);i=r.indexOf("&");if(i!=-1){r=r.substr(0,i);}valor=r.replace(/\+/g," ");return valor;};JsZetaUtils.trim=function(str){return str.replace(/^\s*|\s*$/g,"");};JsZetaUtils.Show=function(elem){$(elem).show();};JsZetaUtils.Toggle=function(elem){$(elem).toggle();return $($(elem)[0]).css("display")=="none";};JsZetaUtils.Errors={showError:function(msg){alert(msg);}};JsZetaUtils.Messages={showMsg:function(msg){alert(msg);}};JsZetaUtils.Signal=function(state){var blocked=(state==undefined)?false:state;this.block=function(){blocked=true;};this.unblock=function(){blocked=false;};this.isBlocked=function(){return blocked;};};JsZetaUtils.ReplaceDOMElement=function(elemID,elemPath,elementType){$.ajax({type:"GET",url:elemPath,success:function(data){$("#"+elemID).replaceWith(data);},error:function(){}});};JsZetaUtils.getCookie=function getCookie(clave){var valCookie="";var buscar=clave+"=";if(document.cookie.length>0){pos=document.cookie.indexOf(buscar);if(pos!=-1){pos+=buscar.length;fin=document.cookie.indexOf(";",pos);if(fin==-1){fin=document.cookie.length;}valCookie=unescape(document.cookie.substring(pos,fin));}}return valCookie;};JsZetaUtils.Cookies={create:function(name,value,days){var expires;if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString();}else{expires="";}document.cookie=name+"="+value+expires+"; path=/";},read:function(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}return null;},erase:function(name){JsZetaUtils.Cookies.create(name,"",-1);},areEnabled:function(){var r=false;JsZetaUtils.Cookies.create("cookiesenabled","valcookie",1);if(JsZetaUtils.Cookies.read("cookiesenabled")!=null){r=true;JsZetaUtils.Cookies.erase("cookiesenabled");}return r;}};JsZetaUtils.Load={CfgLastVideosModule:{id:"last_videos_by_section",posX:300,posY:170,width:160,height:20,image:"/css/img/load.gif"},CfgCommentsModule:{id:"comments_body",posX:300,posY:170,width:160,height:20,image:"/css/img/load.gif"},loader:function(cfg,id){var id=(id==undefined)?"":id;var posX=$("#"+cfg.id+id).position().left+cfg.posX;var posY=$("#"+cfg.id+id).position().top+cfg.posY;this.initLoad=function(){$("#"+cfg.id+id).css("opacity","0.6");$("#"+cfg.id+id).append("<img id='loading_"+cfg.id+id+"' style='position: absolute; left: "+posX+"px; top: "+posY+"px; width: "+cfg.width+"px; height: "+cfg.height+"px;' src='"+cfg.image+"'/>");};this.endLoad=function(){$("#"+cfg.id+id).css("opacity","1");$("#loading_"+cfg.id+id).remove();};}};JsZetaUtils.Pagination={InactivePromotionsCfg:{container_id:"promo_inc_container",path:"commons/promotions/",name:"cmp-inactivepromotions",ext:".inc",elementType:"promocion"},OtherNewBySectionCfg:{container_id:"news_by_section_container",path:"noticias/listado_seccion/",name:"cmp-news-by-section-",ext:".inc",elementType:"tabs"},listLettersCfg:{container_id:"cmp_letter_list_container",path:"cartas/listado/",name:"cmp-letter-list-",ext:".inc",elementType:"tabs"},cmpLettersCfg:{container_id:"cmp_letter_container",path:"commons/letter/",name:"cmp-reader-letter-",ext:".inc",elementType:"tabs"},cmpListNewsSectionCfg:{container_id:"listnews_by_section_container",path:"noticias/listado_noticias_seccion/",name:"cmp-listnews-by-section-",ext:".inc",elementType:"tabs"},cmpListNewsTagCfg:{container_id:"listnews_by_section_container",path:"noticias/listado_noticias_tags/",name:"cmp-listnews-by-tag-",ext:".inc",elementType:"tabs"},cmpListNewsAuthorCfg:{container_id:"listnews_by_author_container",path:"noticias/listado_noticias_autores/",name:"cmp-listnews-by-author-",ext:".inc",elementType:"tabs"},cmpListSpecialInactiveCfg:{container_id:"special_inactive_container",path:"commons/special/",name:"cmp-inactive-special-list-",ext:".inc",elementType:"especial"},cmpListNewsTopViewed:{container_id:"listnews_top_container",path:"noticias/mas-leidas/",name:"cmp-listnews-topviewed-",ext:".inc",elementType:"tabs"},cmpListNewsTopSent:{container_id:"listnews_top_container",path:"noticias/mas-enviadas/",name:"cmp-listnews-topsent-",ext:".inc",elementType:"tabs"},cmpListNewsTopVoted:{container_id:"listnews_top_container",path:"noticias/mas-valoradas/",name:"cmp-listnews-topvoted-",ext:".inc",elementType:"tabs"},cmpListNewsTopCommented:{container_id:"listnews_top_container",path:"noticias/mas-comentadas/",name:"cmp-listnews-topcommented-",ext:".inc",elementType:"tabs"},cmpMinuteList:{container_id:"partidos",path:"minuto-a-minuto/listado/",name:"match-list-",ext:".inc",elementType:"multimedia"},cmpHumorByAuthorList:{container_id:"lista_vinetas",path:"humor/listhumor_by_author/",name:"cmp-listhumor-by-author-",ext:".inc",elementType:"multimedia"},UpdatePaginationInc:function(incNum,cfg,folder){var inc_path;if(folder!=""&&folder!=undefined){inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+folder+"/"+cfg.name+incNum+cfg.ext;}else{inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+incNum+cfg.ext;}JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,cfg.elementType);}};JsZetaUtils.Player={cfgDefault:{allowfullscreen:"true",allowscriptaccess:"always",wmode:"transparent",config:"/swf/data/zetasp_config.xml",autostart:"false"},createNew:function(contName,id,pData){pData.playerId=contName+id;var playerCfg=JsZetaUtils.Player.getConfig(JsZetaUtils.Player.cfgDefault,pData);var sObj="so"+pData.playerId;var srcPlayer="<div id='"+contName+"_"+id+"'></div><script type='text/javascript'>width ="+pData.width+";height ="+pData.height+";flashcontentId ='"+pData.playerId+"';var "+sObj+" = new SWFObject('/swf/CTVPlayer.swf',flashcontentId,width,height,'9');"+JsZetaUtils.Player.getVarsConfig(sObj,playerCfg)+sObj+".write('"+contName+"_"+id+"');<\/script>";return srcPlayer;},getVarsConfig:function(sObjName,data){var varsCode=""+sObjName+".addParam('allowfullscreen','true');"+sObjName+".addParam('allowscriptaccess','always');"+sObjName+".addParam('wmode','transparent');"+sObjName+".addVariable('assetID','"+data.assetID+"');"+sObjName+".addVariable('location','"+data.location+"');";return varsCode;},getConfig:function(cfgB,cfgS){var cfg=cfgB;for(prop in cfgS){cfg[prop]=cfgS[prop];}return cfg;},getSizeObj:function(layerID,defaultWidth,defaultHeight){var objSizePlayer={width:defaultWidth,height:defaultHeight};var img_width=$("#"+layerID).width();if(img_width!=null&&img_height!=""){var img_height=((img_width*9)/16)+27.3;objSizePlayer.width=img_width;objSizePlayer.height=img_height;}return objSizePlayer;}};JsZetaUtils.Galleries={ModuleThumbsCfg:{thumbs_gallerie_container_id:"thumbs_gallerie",galleries_path:"galerias",gallerie_name:"gallerie-",gallerie_image_module_path:"/components/images_module_",gallerie_image_module_ext:".inc",thumbs_container_id:"thumbs_galleries_day",module_name:"galleries_day_",module_path:"commons/galerias/galleries_day/",module_ext:".inc"},ImageGallerieCfg:{galleries_path:"galerias",gallerie_name:"gallerie-",gallerie_image_module_path:"/components/image_",gallerie_image_module_ext:".inc",picture_container_id:"picturegal",picturedata_container_id:"picturedata",actual_img_container:"actualImgGal",thumb_container:"miniatura_gal_",playTimeDelay:6000},UpdateModuleThumbs:function(moduleNum){var cfg=JsZetaUtils.Galleries.ModuleThumbsCfg;var module_path=JsZetaUtils.Paths.BasePathLocale+cfg.module_path+cfg.module_name+moduleNum+cfg.module_ext;JsZetaUtils.ReplaceDOMElement(cfg.thumbs_container_id,module_path,"gallery");},PrevImage:function(totalImages,gallerieID){var cfg=JsZetaUtils.Galleries.ImageGallerieCfg;var actualImg=$("#"+cfg.actual_img_container+gallerieID).text();var imageNum=totalImages;if(actualImg!=1){imageNum=parseInt(actualImg)-1;}var image_path="";if(JsZetaUtils.IsPreview()){image_path=JsZetaUtils.Paths.BasePathLocalePreview+cfg.galleries_path+JsZetaUtils.HasFiles.hash(gallerieID)+cfg.gallerie_name+gallerieID+cfg.gallerie_image_module_path+imageNum+cfg.gallerie_image_module_ext;}else{image_path=JsZetaUtils.Paths.BasePathLocale+cfg.galleries_path+JsZetaUtils.HasFiles.hash(gallerieID)+cfg.gallerie_name+gallerieID+cfg.gallerie_image_module_path+imageNum+cfg.gallerie_image_module_ext;}$.get(image_path,function(data){$(".miniatura").attr("class","miniatura");$("#"+cfg.thumb_container+gallerieID+"_pos_"+imageNum).attr("class","miniatura selected");$("#"+cfg.picture_container_id+gallerieID).replaceWith(data);$("#"+cfg.actual_img_container+gallerieID).text(imageNum);});},NextImage:function(totalImages,gallerieID,play){var cfg=JsZetaUtils.Galleries.ImageGallerieCfg;var actualImg=$("#"+cfg.actual_img_container+gallerieID).text();var imageNum=1;if(actualImg!=totalImages){imageNum=parseInt(actualImg)+1;}var image_path="";if(JsZetaUtils.IsPreview()){image_path=JsZetaUtils.Paths.BasePathLocalePreview+cfg.galleries_path+JsZetaUtils.HasFiles.hash(gallerieID)+cfg.gallerie_name+gallerieID+cfg.gallerie_image_module_path+imageNum+cfg.gallerie_image_module_ext;}else{image_path=JsZetaUtils.Paths.BasePathLocale+cfg.galleries_path+JsZetaUtils.HasFiles.hash(gallerieID)+cfg.gallerie_name+gallerieID+cfg.gallerie_image_module_path+imageNum+cfg.gallerie_image_module_ext;}$.get(image_path,function(data){$(".miniatura").attr("class","miniatura");$("#"+cfg.thumb_container+gallerieID+"_pos_"+imageNum).attr("class","miniatura selected");$("#"+cfg.picture_container_id+gallerieID).replaceWith(data);$("#"+cfg.actual_img_container+gallerieID).text(imageNum);});if(play!=undefined&&play){eval("JsZetaUtils.Galleries.ImagePlayerGalleries.gallerie"+gallerieID+'.timer=setTimeout("JsZetaUtils.Galleries.NextImage('+totalImages+","+gallerieID+',true)",'+cfg.playTimeDelay+")");}},ImagePlayerGalleries:{getTimer:function(gallerieID){try{return eval("JsZetaUtils.Galleries.ImagePlayerGalleries.gallerie"+gallerieID+".timer");}catch(error){}},getNumImages:function(gallerieID){try{return eval("JsZetaUtils.Galleries.ImagePlayerGalleries.gallerie"+gallerieID+".numImages");}catch(error){}}},PlayGallerie:function(totalImages,gallerieID){var cfg=JsZetaUtils.Galleries.ImageGallerieCfg;$("a#aPlay").html("Stop");$("a#aPlay").removeClass("play");$("a#aPlay").addClass("stop");$("a#aPlay").attr("href","javascript:JsZetaUtils.Galleries.StopGallerie("+totalImages+","+gallerieID+");");var numImages=JsZetaUtils.Galleries.ImagePlayerGalleries.getNumImages(gallerieID);eval("JsZetaUtils.Galleries.ImagePlayerGalleries.gallerie"+gallerieID+'.timer=setTimeout("JsZetaUtils.Galleries.NextImage('+totalImages+","+gallerieID+',true)",'+cfg.playTimeDelay+")");},StopGallerie:function(totalImages,gallerieID){var cfg=JsZetaUtils.Galleries.ImageGallerieCfg;var gallerieTimer=JsZetaUtils.Galleries.ImagePlayerGalleries.getTimer(gallerieID);$("a#aPlay").html("Play");$("a#aPlay").removeClass("stop");$("a#aPlay").addClass("play");$("a#aPlay").attr("href","javascript:JsZetaUtils.Galleries.PlayGallerie("+totalImages+","+gallerieID+");");clearTimeout(gallerieTimer);},UpdateImage:function(imageNum,gallerieID){var cfg=JsZetaUtils.Galleries.ImageGallerieCfg;var image_path="";if(JsZetaUtils.IsPreview()){image_path=JsZetaUtils.Paths.BasePathLocalePreview+cfg.galleries_path+JsZetaUtils.HasFiles.hash(gallerieID)+cfg.gallerie_name+gallerieID+cfg.gallerie_image_module_path+imageNum+cfg.gallerie_image_module_ext;}else{image_path=JsZetaUtils.Paths.BasePathLocale+cfg.galleries_path+JsZetaUtils.HasFiles.hash(gallerieID)+cfg.gallerie_name+gallerieID+cfg.gallerie_image_module_path+imageNum+cfg.gallerie_image_module_ext;}$.get(image_path,function(data){$(".miniatura").attr("class","miniatura");$("#"+cfg.thumb_container+gallerieID+"_pos_"+imageNum).attr("class","miniatura selected");$("#"+cfg.picture_container_id+gallerieID).replaceWith(data);$("#"+cfg.actual_img_container+gallerieID).text(imageNum);});},UpdateImageData:function(imageNum,gallerieID,dataImage){var cfg=JsZetaUtils.Galleries.ImageGallerieCfg;$("#"+cfg.picturedata_container_id+" span.author strong").text(dataImage.author);$("#"+cfg.picturedata_container_id+" p").text(dataImage.description);},LinkNew:function(url){document.location.href=JsZetaUtils.Paths.BasePath+url.substring(1);}};JsZetaUtils.Galleries.topview={cfg:{container_id:"topview_lomas",path:"top/galerias/leido/",name:"topviewed_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.topview_thumbs={cfg:{container_id:"topview_lomas",path:"top/galerias/leido/",name:"topviewed_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.topvoted={cfg:{container_id:"topvoted_lomas",path:"top/galerias/valorado/",name:"topvoted_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.topvoted_thumbs={cfg:{container_id:"topvoted_lomas",path:"top/galerias/valorado/",name:"topvoted_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.topsent={cfg:{container_id:"topsent_lomas",path:"top/galerias/enviado/",name:"topsent_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.topsent_thumbs={cfg:{container_id:"topsent_lomas",path:"top/galerias/enviado/",name:"topsent_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.topcommented={cfg:{container_id:"topcommented_lomas",path:"top/galerias/comentado/",name:"topcommented_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.topcommented_thumbs={cfg:{container_id:"topcommented_lomas",path:"top/galerias/comentado/",name:"topcommented_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Galleries.zloadMedia=function zloadMedia(capa,p,tipo,datos,estilo){if(tipo=="foto"){$("#"+capa).css("opacity","0.6");$("#"+capa).append("<img id='loaderIm' style='position: absolute; left: 65px; top: 95px; width: 160px; height: 20px;' src='/css/img/load.gif'/>");$("#loaderIm").remove();$("#"+capa).css("opacity","1");if(estilo=="alto"){$("#"+capa).html("<a href='"+datos.imagen_alta+"' title='"+datos.title+"' class='thickbox'><img style='height:100%' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a>");}else{$("#"+capa).html("<a href='"+datos.imagen_alta+"' title='"+datos.title+"' class='thickbox'><img style='width:100%' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a>");}if($("#"+p).length>0){$("#"+p).text(datos.title);$("#"+p).fadeIn();}tb_init("a.thickbox");}};JsZetaUtils.Galleries.zloadMedia2=function zloadMedia2(capa,p,tipo,datos,estilo,padding){if(padding==undefined){padding=0;}if(tipo=="foto"){$("#"+capa).css("opacity","0.6");$("#"+capa).append("<img id='loaderIm' style='position: absolute; left: 65px; top: 95px; width: 160px; height: 20px;' src='/css/img/load.gif'/>");$("#loaderIm").remove();$("#"+capa).css("opacity","1");if(estilo=="alto"){$("#"+capa).html("<a href='"+datos.imagen_alta+"' title='"+datos.title+"' class='thickbox'><img style='height:220px' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a>");}else{$("#"+capa).html("<a href='"+datos.imagen_alta+"' title='"+datos.title+"' class='thickbox'><img style='width:300px;padding-top:"+padding+"px' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a>");}if($("#"+p).length>0){$("#"+p).text(datos.title);$("#"+p).fadeIn();}tb_init("a.thickbox");}};JsZetaUtils.Galleries.TopView={cfg:{top_galleries_selector:"div#top_galleries",block_selector:"div.bloque",thumbs_by_block:4,blocks_by_page:2,topview_path:"commons/galleries/topview_galleries.inc",toprated_path:"commons/galleries/toprated_galleries.inc"},Next:function(){var cfg=JsZetaUtils.Galleries.TopView.cfg;var numBlocksForShow=$(cfg.top_galleries_selector+" > "+cfg.block_selector+":visible:last ~ "+cfg.block_selector).length;if(numBlocksForShow>0){var numElementsShow=numBlocksForShow<cfg.blocks_by_page?numBlocksForShow:(numBlocksForShow>cfg.blocks_by_page?cfg.blocks_by_page:numBlocksForShow);var idsToShow=new Array(numElementsShow);for(var i=0;i<numElementsShow;i++){idsToShow[i]=$(cfg.top_galleries_selector+" > "+cfg.block_selector+":visible:last ~ "+cfg.block_selector).eq(i).attr("id");}$(cfg.top_galleries_selector+" > "+cfg.block_selector+":visible").hide();for(var i=0;i<idsToShow.length;i++){$("#"+idsToShow[i]).show();}}},Prev:function(){var cfg=JsZetaUtils.Galleries.TopView.cfg;var numBlocksForShow=$(cfg.top_galleries_selector+" > "+cfg.block_selector+":visible:first").prevAll(cfg.top_galleries_selector+" > "+cfg.block_selector).length;if(numBlocksForShow>0){var numElementsShow=numBlocksForShow<cfg.blocks_by_page?numBlocksForShow:(numBlocksForShow>cfg.blocks_by_page?cfg.blocks_by_page:numBlocksForShow);var idsToShow=new Array(numElementsShow);for(var i=0;i<numElementsShow;i++){idsToShow[i]=$(cfg.top_galleries_selector+" > "+cfg.block_selector+":visible:first").prevAll(cfg.top_galleries_selector+" > "+cfg.block_selector).eq(i).attr("id");}$(cfg.top_galleries_selector+" > "+cfg.block_selector+":visible").hide();for(var i=0;i<idsToShow.length;i++){$("#"+idsToShow[i]).show();}}},ShowTopRated:function(topview_title,toprated_title){var cfg=JsZetaUtils.Galleries.TopView.cfg;var image_path=JsZetaUtils.Paths.BasePathLocale+cfg.toprated_path;$.get(image_path,function(data){$(cfg.top_galleries_selector+" > div.introgalleries ~ div").remove();$(cfg.top_galleries_selector+" > div.introgalleries").after(data);$(cfg.top_galleries_selector+" > div.introgalleries > h3 ").replaceWith("<h3><a style='border-right:1px solid #595959;margin-right:6px;padding-right:6px;border-left:none;margin-left:0px;padding-left:0px;' href='javascript:JsZetaUtils.Galleries.TopView.ShowTopView(\""+topview_title+'","'+toprated_title+"\");'>"+topview_title+"</a>"+toprated_title+"</h3>");});},ShowTopView:function(topview_title,toprated_title){var cfg=JsZetaUtils.Galleries.TopView.cfg;var image_path=JsZetaUtils.Paths.BasePathLocale+cfg.topview_path;$.get(image_path,function(data){$(cfg.top_galleries_selector+" > div.introgalleries ~ div").remove();$(cfg.top_galleries_selector+" > div.introgalleries").after(data);$(cfg.top_galleries_selector+" > div.introgalleries > h3 ").replaceWith("<h3>"+topview_title+"<a href='javascript:JsZetaUtils.Galleries.TopView.ShowTopRated(\""+topview_title+'","'+toprated_title+"\");'>"+toprated_title+"</a></h3>");});}};JsZetaUtils.Videos={ModuleThumbsCfg:{thumbs_container_id:"thumbs_videos_day",module_name:"videos_day_",module_path:"commons/videos/videos_day/",module_ext:".inc"},UpdateModuleThumbs:function(moduleNum){var cfg=JsZetaUtils.Videos.ModuleThumbsCfg;var module_path=JsZetaUtils.Paths.BasePathLocale+cfg.module_path+cfg.module_name+moduleNum+cfg.module_ext;JsZetaUtils.ReplaceDOMElement(cfg.thumbs_container_id,module_path,"video");}};JsZetaUtils.Videos.topview={cfg:{container_id:"topview_lomas",path:"top/videos/leido/",name:"topviewed_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Videos.topview_thumbs={cfg:{container_id:"topview_lomas",path:"top/videos/leido/",name:"topviewed_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Videos.topvoted={cfg:{container_id:"topvoted_lomas",path:"top/videos/valorado/",name:"topvoted_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Videos.topvoted_thumbs={cfg:{container_id:"topvoted_lomas",path:"top/videos/valorado/",name:"topvoted_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Videos.topsent={cfg:{container_id:"topsent_lomas",path:"top/videos/enviado/",name:"topsent_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Videos.topsent_thumbs={cfg:{container_id:"topsent_lomas",path:"top/videos/enviado/",name:"topsent_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Videos.topcommented={cfg:{container_id:"topcommented_lomas",path:"top/videos/comentado/",name:"topcommented_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Videos.topcommented_thumbs={cfg:{container_id:"topcommented_lomas",path:"top/videos/comentado/",name:"topcommented_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"galeria");}};JsZetaUtils.Sections={CfgGalleries:{section_container_id:"last_galleries_by_section",incs_path:"/commons/galleries/",incs_prefix:"galleries-",incs_sufix:"-page-",incs_extension:".inc",pages:0,actualPage:0,elementType:"galeria"},CfgGalleriesCalendar:{section_container_id:"last_galleries_by_section",incs_path:"/galleries/daily/",incs_prefix:"daily-galleries",incs_sufix:"-page-",incs_extension:".inc",pages:0,actualPage:0,elementType:"galeria"},CfgVideosCalendar:{section_container_id:"last_videos_by_section",incs_path:"/videos/daily/",incs_prefix:"daily-videos",incs_sufix:"-page-",incs_extension:".inc",pages:0,actualPage:0,elementType:"video"},CfgVideos:{section_container_id:"last_videos_by_section",incs_path:"/commons/videos/",incs_prefix:"videos-",incs_sufix:"-page-",incs_extension:".inc",pages:0,actualPage:0,elementType:"video"},CfgPolls:{section_container_id:"last_polls_by_section",incs_path:"/commons/encuestas/",incs_prefix:"page-",incs_sufix:"",incs_extension:".inc",pages:0,actualPage:0,elementType:"encuesta"},getIncPath:function(cfg,numPage,section,locale){return JsZetaUtils.Paths.BasePath+locale+cfg.incs_path+section+"/"+cfg.incs_prefix+section+cfg.incs_sufix+numPage+cfg.incs_extension;},getIncPathPolls:function(cfg,numPage,section,locale){return JsZetaUtils.Paths.BasePath+locale+cfg.incs_path+section+"/"+cfg.incs_prefix+cfg.incs_sufix+numPage+cfg.incs_extension;},getIncCalendarPath:function(cfg,numPage,dateFolder,locale){return JsZetaUtils.Paths.BasePath+locale+cfg.incs_path+dateFolder+"/"+cfg.incs_prefix+cfg.incs_sufix+numPage+cfg.incs_extension;},changeSection:function(cfg,section,locale){cfg.pages=0;cfg.actualPage=0;$("#"+cfg.section_container_id+" > div.introgalleries > div.nav_calendmedia > ul > li.active").removeClass("active");$("#"+cfg.section_container_id+" > div.introgalleries > div.nav_calendmedia > ul > li#"+section).addClass("active");JsZetaUtils.Sections.updateSectionPage(cfg,1,section,locale);},updateSectionPage:function(cfg,numPage,section,locale){$.get(JsZetaUtils.Sections.getIncPath(cfg,numPage,section,locale),function(data){$("#"+cfg.section_container_id+" > div.bloque").remove();$("#"+cfg.section_container_id+" div.paginador").remove();$("#"+cfg.section_container_id).append(data);});},changeSectionPage:function(cfg,locale,next){var section=$("#"+cfg.section_container_id+" > div.introgalleries > div.nav_calendmedia > ul.navigation_section > li.active").attr("id");if(cfg.actualPage!=0){if(next){if(cfg.actualPage<cfg.pages){JsZetaUtils.Sections.updateSectionPage(cfg,cfg.actualPage+1,section,locale);}}else{if(cfg.actualPage>1){JsZetaUtils.Sections.updateSectionPage(cfg,cfg.actualPage-1,section,locale);}}}},changeCalendar:function(cfg,calendarCfg,numPage,dateFolder,locale,day){cfg.pages=0;cfg.actualPage=0;$("#"+cfg.section_container_id+" > div.introgalleries > div.nav_calendmedia > ul > li.active").removeClass("active");calendarCfg.dateSet=new Date(Date.parse(calendarCfg.date));calendarCfg.dateSet.setDate(day);var tmpDate=new Date(Date.parse(calendarCfg.date));tmpDate.setDate(1);var dayOfWeekOffset=(!tmpDate.getDay()<=0?tmpDate.getDay():7)-1;$("#"+calendarCfg.id+" > table > tbody > tr > td").removeClass("hoy");$("#"+calendarCfg.id+" > table > tbody > tr > td:eq("+((day-1)+dayOfWeekOffset)+")").addClass("hoy");$.ajax({type:"GET",url:JsZetaUtils.Sections.getIncCalendarPath(cfg,numPage,dateFolder,locale),success:function(data){$("#"+cfg.section_container_id+" > div.bloque").remove();$("#"+cfg.section_container_id+" div.paginador").remove();$("#"+cfg.section_container_id).append(data);},error:function(){$("#"+cfg.section_container_id+" > div.bloque").remove();$("#"+cfg.section_container_id+" div.paginador").remove();$("#"+cfg.section_container_id).append("<div class='bloque' style='height:160px'>No hay datos para la fecha seleccionada</div>");}});},updateCalendarPage:function(cfg,numPage,dateFolder,locale){$.get(JsZetaUtils.Sections.getIncCalendarPath(cfg,numPage,dateFolder,locale),function(data){$("#"+cfg.section_container_id+" > div.bloque").remove();$("#"+cfg.section_container_id+" div.paginador").remove();$("#"+cfg.section_container_id).append(data);});},changeCalendarPage:function(cfg,calendarCfg,locale,next){var monthFolder=calendarCfg.dateSet.getMonth()+1<10?"0"+(calendarCfg.dateSet.getMonth()+1):""+(calendarCfg.dateSet.getMonth()+1);var dayFolder=calendarCfg.dateSet.getDate()<10?"0"+calendarCfg.dateSet.getDate():""+calendarCfg.dateSet.getDate();var dateFolder=dayFolder+monthFolder+calendarCfg.dateSet.getFullYear();if(cfg.actualPage!=0){if(next){if(cfg.actualPage<cfg.pages){JsZetaUtils.Sections.updateCalendarPage(cfg,cfg.actualPage+1,dateFolder,locale);}}else{if(cfg.actualPage>1){JsZetaUtils.Sections.updateCalendarPage(cfg,cfg.actualPage-1,dateFolder,locale);}}}},changeSectionPolls:function(cfg,section,locale){cfg.pages=0;cfg.actualPage=0;$("#"+cfg.section_container_id+" > div.menu_section > ul > li.active").removeClass("active");$("#"+cfg.section_container_id+" > div.menu_section > ul > li#"+section).addClass("active");JsZetaUtils.Sections.updateSectionPagePolls(cfg,1,section,locale);},updateSectionPagePolls:function(cfg,numPage,section,locale){$.get(JsZetaUtils.Sections.getIncPathPolls(cfg,numPage,section,locale),function(data){$("#"+cfg.section_container_id+" #encuestas_pages").remove();$("#"+cfg.section_container_id).append(data);});},changeSectionPollsPage:function(cfg,locale,next){var section=$("#"+cfg.section_container_id+" > div.menu_section > ul > li.active").attr("id");if(cfg.actualPage!=0){if(next){if(cfg.actualPage<cfg.pages){JsZetaUtils.Sections.updateSectionPagePolls(cfg,cfg.actualPage+1,section,locale);}}else{if(cfg.actualPage>1){JsZetaUtils.Sections.updateSectionPagePolls(cfg,cfg.actualPage-1,section,locale);}}}}};JsZetaUtils.PhotoSlider={slider:function(cfg,id){var id=(id==undefined)?"":id;var children=$("#"+cfg.picture_container_name+id).children().length;var children_hidden=(children>cfg.init_pictures)?(children-cfg.init_pictures):0;var desp_max=((children_hidden+cfg.initial_desp)/cfg.pictures_per_desp);var signal=new JsZetaUtils.Signal(false);var actual_desp=cfg.initial_desp;var desp_type=cfg.vertical?"top":"left";var firstTime=true;var animateRight=function(){if(!signal.isBlocked()){if(actual_desp<desp_max){signal.block();var old_position=$("#"+cfg.picture_container_name+id).css(desp_type);old_position=old_position=="auto"?"0":parseInt(old_position);var position=old_position-cfg.desp_horizontal;if($.browser.msie&&actual_desp==1&&firstTime&&id=="now"){firstTime=false;position=position+15;}if(cfg.vertical){animateParams={top:position};}else{animateParams={left:position};}$("#"+cfg.picture_container_name+id).animate(animateParams,cfg.animate.duration,cfg.animate.easing,signal.unblock);actual_desp++;}}};var animateLeft=function(){if(!signal.isBlocked()){if(parseInt($("#"+cfg.picture_container_name+id).css(desp_type))<0){signal.block();var old_position=$("#"+cfg.picture_container_name+id).css(desp_type);old_position=old_position=="auto"?"0":parseInt(old_position);var position=old_position+cfg.desp_horizontal;if($.browser.msie&&actual_desp==1&&id=="now"){position=position-15;}if(cfg.vertical){animateParams={top:position};}else{animateParams={left:position};}$("#"+cfg.picture_container_name+id).animate(animateParams,cfg.animate.duration,cfg.animate.easing,signal.unblock);actual_desp--;}}};$("#"+cfg.advance_right_name+id).click(animateRight);$("#"+cfg.advance_left_name+id).click(animateLeft);}};JsZetaUtils.PhotoSlider.Gals={initial_desp:1,desp_horizontal:97,init_pictures:3,pictures_per_desp:1,picture_container_name:"picture_container",advance_right_name:"advance_right",advance_left_name:"advance_left",animate:{duration:"normal",easing:"linear"},vertical:false,elementType:"galeria"};JsZetaUtils.PhotoSlider.MixGal={initial_desp:1,desp_horizontal:100,init_pictures:3,pictures_per_desp:1,picture_container_name:"thumb_container",advance_right_name:"advance_bottom",advance_left_name:"advance_top",animate:{duration:"normal",easing:"linear"},vertical:true,elementType:"galeria"};JsZetaUtils.MixGal={cfg:{mixGalContainerName:"eldiamedia",mixGalThumbsContainerName:"thumb_container",mixGalThumbContainerName:"thumbmedia",mediaContainerID:"bigone",thumbmediaClassName:"thumbmedia",mixGalVideoContainerName:"videogalmix",width:"476",height:"344"},updateMixedGalImage:function(gallerieId,mediaId,imagePath){var cfg=JsZetaUtils.MixGal.cfg;var mixGalContainer=cfg.mixGalContainerName+gallerieId;var mixGalThumbContainer=cfg.mixGalThumbContainerName+mediaId;var mixGalThumsContainer=cfg.mixGalThumbsContainerName+gallerieId;var mediaTitle=$("#"+mixGalThumsContainer+" > #"+mixGalThumbContainer+" > h3").text();if($("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > div").length>0){$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > script").remove();$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > div").remove();}if($("#"+mixGalContainer+"> div > div#"+cfg.mediaContainerID+" > a > img:last").length<1){$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID).append("<h3>"+mediaTitle+"</h3>");var img_gal=$("<a>").attr({href:"javascript://"}).append($("<img>").attr({src:imagePath,height:cfg.height,width:cfg.width}));$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > h3").after(img_gal);}else{$("#"+mixGalContainer+"> div > div#"+cfg.mediaContainerID+" > a > img:last").attr("src",imagePath);$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > h3").text(mediaTitle);}$("#"+mixGalThumsContainer+" > ."+cfg.thumbmediaClassName+" > h3").attr("class","");$("#"+mixGalThumsContainer+" > #"+mixGalThumbContainer+" > h3").attr("class","active");},updateMixedGalVideo:function(gallerieId,mediaId,pData){var cfg=JsZetaUtils.MixGal.cfg;var mixGalContainer=cfg.mixGalContainerName+gallerieId;var mixGalThumsContainer=cfg.mixGalThumbsContainerName+gallerieId;var mixGalThumbContainer=cfg.mixGalThumbContainerName+mediaId;var mixGalVideoContainer=cfg.mixGalVideoContainerName+mediaId;if($("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > div#"+mixGalVideoContainer).length>0){ctvloadVideo(mixGalVideoContainer,pData);}else{$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > div").remove();$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > h3").remove();$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID+" > a").remove();pData.width=cfg.width;pData.height=cfg.height;$("#"+mixGalContainer+" > div > div#"+cfg.mediaContainerID).append(JsZetaUtils.Player.createNew(cfg.mixGalVideoContainerName,mediaId,pData));}$("#"+mixGalThumsContainer+" > ."+cfg.thumbmediaClassName+" > h3").attr("class","");$("#"+mixGalThumsContainer+" > #"+mixGalThumbContainer+" > h3").attr("class","active");}};I18n.es.voting_vote_ok="Su voto se ha computado correctamente";I18n.es.voting_vote_ko="No se ha podido computar el voto";I18n.es.voting_vote_ko_alredy_vote=" ya se ha registrado un voto para el contenido desde esta dirección.";I18n.ca.voting_vote_ok="El seu vot s'ha computat correctament";I18n.ca.voting_vote_ko="No s'ha pogut computar el vot";I18n.ca.voting_vote_ko_alredy_vote=" ja s'ha registrat un vot per al contingut des d'aquesta direcció.";JsZetaUtils.Voting={cfg:{getVotesCommand:JsZetaUtils.SuPath+"services/interactive/votes",getVotesCommandMethod:"GET",getVotesCommentsCommand:JsZetaUtils.SuPath+"services/interactive/ranking",getVotesCommentsCommandMethod:"GET",getVotesCommentCommand:JsZetaUtils.SuPath+"commenting/getRateComment.jsp",getVotesCommentCommandMethod:"GET",addVoteCommand:JsZetaUtils.SuPath+"commands/interactive/participate",addVoteCommandMethod:"POST",interactive_id:ZetaProperties.interactive_id,question_id:ZetaProperties.question_id,votesup_id:"votesup",votesdown_id:"votesdown",votesup_comm_id:"votesupcomm",votesdown_comm_id:"votesdowncomm",answer_id_votesup:ZetaProperties.answer_id_votesup,answer_id_votesdown:ZetaProperties.answer_id_votesdown,offensive_id_votes:ZetaProperties.offensive_id_votes,alredy_vote_error_code:"ERR_INTERACTIVE_ALREADY_VOTE",exception_code_id:"exception_code",itemTypeComments:"T_SRVD_COMMENTIN"}};JsZetaUtils.Voting.getVotes=function(cfg,itemid,itemtype){$.ajax({type:cfg.getVotesCommandMethod,url:cfg.getVotesCommand,data:{interactive:cfg.interactive_id,question:cfg.question_id,itemid:itemid,itemtype:itemtype},dataType:"xml",success:function(xml){$(xml).find("answer").each(function(){var answer_id=$(this).find("id").text();var numVotes=$(this).find("votes").text();if(answer_id==cfg.answer_id_votesup){$("#"+cfg.votesup_id+itemid+" > span").text("+"+numVotes);}if(answer_id==cfg.answer_id_votesdown){$("#"+cfg.votesdown_id+itemid+" > span").text("-"+numVotes);}});},error:function(){}});};JsZetaUtils.Voting.addVote=function(cfg,itemid,itemtype,up,locale){var eventType="tabs";if(itemtype=="ASSET"){eventType="galeria";}else{if(itemtype=="ASSET_GROUP"){eventType="galeria";}else{if(itemtype=="USER_LETTER"){eventType="tabs";}else{if(itemtype=="HUMOR"){eventType="tabs";}}}}$.ajax({type:cfg.addVoteCommandMethod,url:cfg.addVoteCommand,data:{interactive:cfg.interactive_id,question:cfg.question_id,itemid:itemid,itemtype:itemtype,answer:up?cfg.answer_id_votesup:cfg.answer_id_votesdown,site:ZetaProperties.destpub},success:function(){JsZetaUtils.Messages.showMsg(I18n[locale].voting_vote_ok);JsZetaUtils.Voting.getVotes(cfg,itemid,itemtype);JsZetaUtils.RecordEvent("VOTE",locale,itemtype,itemid);},error:function(data){var errorsMsgs=new Array();errorsMsgs.push(I18n[locale].voting_vote_ko);var errorCode=$("#"+cfg.exception_code_id,data.responseText).val();if(errorCode==cfg.alredy_vote_error_code){errorsMsgs.push(I18n[locale].voting_vote_ko_alredy_vote);}JsZetaUtils.Messages.showMsg(errorsMsgs);}});};JsZetaUtils.Voting.getVotesComments=function(cfg,interactiveType,interactive){$.ajax({type:cfg.getVotesCommentsCommandMethod,url:cfg.getVotesCommentsCommand,data:{itemtype:cfg.itemTypeComments,question:cfg.question_id,interactiveType:interactiveType,interactive:interactive},dataType:"xml",success:function(xml){$(xml).find("participant").each(function(){var item_id=$(this).find("item").find("id").text();if($("#"+cfg.votesup_comm_id+item_id).length>0){$(this).find("answer").each(function(){var answer_id=$(this).find("id").text();var numVotes=$(this).find("votes").text();if(answer_id==cfg.answer_id_votesup){$("#"+cfg.votesup_comm_id+item_id+" > span").text("(+"+numVotes);}if(answer_id==cfg.answer_id_votesdown){$("#"+cfg.votesdown_comm_id+item_id+" > span").text("-"+numVotes);}});}});},error:function(){}});};JsZetaUtils.Voting.getVotesComment=function(cfg,locale,comment,interactive,up){var answer=up?cfg.answer_id_votesup:cfg.answer_id_votesdown;$.ajax({type:cfg.getVotesCommentCommandMethod,url:cfg.getVotesCommentCommand,data:{LANGUAGE:locale,comment:comment,interactive:interactive,question:cfg.question_id,answer:answer},dataType:"text/plain",success:function(text){var numVotes=$.trim(text);if(answer==cfg.answer_id_votesup){var votesUp=$("#"+cfg.votesup_comm_id+comment+" > span");if(votesUp.text()[0]=="("){votesUp.text("(+"+numVotes);}else{votesUp.text("+ "+numVotes+" ");}}if(answer==cfg.answer_id_votesdown){var votesDown=$("#"+cfg.votesdown_comm_id+comment+" > span");if(votesDown.text()[0]=="-"){votesDown.text("-"+numVotes);}else{votesDown.text(numVotes);}}},error:function(){}});};JsZetaUtils.Voting.addVoteComment=function(cfg,interactive,interactiveType,itemid,up,locale){$.ajax({type:cfg.addVoteCommandMethod,url:cfg.addVoteCommand,data:{interactive:interactive,interactiveType:interactiveType,question:cfg.question_id,itemid:itemid,itemtype:cfg.itemTypeComments,answer:up?cfg.answer_id_votesup:cfg.answer_id_votesdown,site:ZetaProperties.destpub},success:function(){JsZetaUtils.Messages.showMsg(I18n[locale].voting_vote_ok);var numVotes=0;if(up){numVotes=parseInt($("#"+cfg.votesup_comm_id+itemid+" > span").text().substring(1));numVotes++;var votesUp=$("#"+cfg.votesup_comm_id+itemid+" > span");if(votesUp.text()[0]=="("){votesUp.text("(+"+numVotes);}else{votesUp.text("+ "+numVotes+" ");}}else{numVotes=parseInt($("#"+cfg.votesdown_comm_id+itemid+" > span").text().substring(1));numVotes++;var votesDown=$("#"+cfg.votesdown_comm_id+itemid+" > span");if(votesDown.text()[0]=="-"){votesDown.text("-"+numVotes);}else{votesDown.text(numVotes);}}JsZetaUtils.RecordEvent("VOTE",locale,cfg.itemTypeComments,itemid);},error:function(data){var errorsMsgs=new Array();errorsMsgs.push(I18n[locale].voting_vote_ko);var errorCode=$("#"+cfg.exception_code_id,data.responseText).val();if(errorCode==cfg.alredy_vote_error_code){errorsMsgs.push(I18n[locale].voting_vote_ko_alredy_vote);}JsZetaUtils.Messages.showMsg(errorsMsgs);}});};JsZetaUtils.Voting.addOffensiveVoteComment=function(cfg,interactive,interactiveType,itemid,locale){$.ajax({type:cfg.addVoteCommandMethod,url:cfg.addVoteCommand,data:{interactive:interactive,interactiveType:interactiveType,question:cfg.question_id,itemid:itemid,itemtype:cfg.itemTypeComments,answer:cfg.offensive_id_votes,site:ZetaProperties.destpub},success:function(){JsZetaUtils.Messages.showMsg(I18n[locale].voting_vote_ok);JsZetaUtils.RecordEvent("VOTE",locale,cfg.itemTypeComments,itemid);},error:function(data){var errorsMsgs=new Array();errorsMsgs.push(I18n[locale].voting_vote_ko);var errorCode=$("#"+cfg.exception_code_id,data.responseText).val();if(errorCode==cfg.alredy_vote_error_code){errorsMsgs.push(I18n[locale].voting_vote_ko_alredy_vote);}JsZetaUtils.Messages.showMsg(errorsMsgs);}});};I18n.es.comentarios_campo_nombre="El campo Nombre ";I18n.es.comentarios_mail_no_valido="e-Mail no válido";I18n.es.comentarios_campo_obligatorio="es obligatorio";I18n.es.comentarios_web_ko="Dirección web no válida";I18n.es.comentarios_obligatorio="Debe escribir un comentario.";I18n.es.comentarios_send_ok="El comentario se ha enviado correctamente";I18n.es.comentarios_send_ok_minute="El comentario se ha enviado correctamente y se mostrará en unos minutos";I18n.es.comentarios_send_ko="Se ha producido un error al enviar el comentario";I18n.es.comentarios_captcha_oblig="Debe introducir el código de seguridad";I18n.es.comentarios_captcha_number="El código de seguridad debe ser numérico";I18n.es.comentarios_captcha_length="El código de seguridad debe tener 7 caracteres";I18n.es.comentarios_max_cars="El comentario no puede tener más de 500 caracteres";I18n.ca.comentarios_campo_nombre="El camp Nom ";I18n.ca.comentarios_mail_no_valido="e-Mail no vàlid";I18n.ca.comentarios_campo_obligatorio="és obligatori";I18n.ca.comentarios_web_ko="Adreça web no vàlida";I18n.ca.comentarios_obligatorio="Escriu un comentari.";I18n.ca.comentarios_send_ok="El comentari s'ha enviat correctament";I18n.ca.comentarios_send_ok_minute="El comentari s'ha enviat correctament i es mostrarà en uns minuts";I18n.ca.comentarios_send_ko="S'ha produït un error en enviar el comentari";I18n.ca.comentarios_captcha_oblig="Cal introduir el codi de seguretat";I18n.ca.comentarios_captcha_number="El codi de seguretat ha de ser numèric";I18n.ca.comentarios_captcha_length="El codi de seguretat ha de tenir 7 caràcters";I18n.ca.comentarios_max_cars="El comentari no pot tenir més de 500 caràcters";JsZetaUtils.Commenting={};JsZetaUtils.Commenting.Toggle={cfg:{imgShow:"/css/img/comunes/btn_mostrar.gif",imgHide:"/css/img/comunes/btn_ocultar.gif",imgSelector:"div#comments_head > span.showhide > input",commentsSelector:"#comments_body,#comments_footer,#comment_most_rated"},comments:function(cfg){if(JsZetaUtils.Toggle(cfg.commentsSelector)){$(cfg.imgSelector).attr("src",cfg.imgShow);}else{$(cfg.imgSelector).attr("src",cfg.imgHide);}}};JsZetaUtils.Commenting.comments={cfg:{pagesize:5,target:"/commenting/commenting-system-view.jsp",commandCountComments:JsZetaUtils.SuPath+"services/countComments",commandCountCommentsMethod:"GET",command:JsZetaUtils.SuPath+"commands/getComments",commandMethod:"GET",commandNoCache:JsZetaUtils.SuPath+"commands/getCommentsReal",commandNoCacheMethod:"GET",comments_selector_container:"#comentarios",comments_selector:"#comments_head,#comments_body,#comments_footer,#comment_most_rated",form_comments_selector:"#formcommt",login_msg_selector:"#loginMSG",num_comments_selector:"#numComents"},cfgMinute:{pagesize:5,timeReloadComments:60000,target:"/commenting/commenting-minute-minute.jsp",command:JsZetaUtils.SuPath+"commands/getComments",commandMethod:"GET",commandNoCache:JsZetaUtils.SuPath+"commands/getCommentsReal",commandNoCacheMethod:"GET",modcol_selector:"#commenting_minute",comments_selector:"#comments_head,#comments_body,#comments_footer"},cfgLast:{command:JsZetaUtils.SuPath+"commenting/lastComments.jsp",last_comments_selector:"#last_comments"},cfgMostRated:{command:JsZetaUtils.SuPath+"commenting/mostRatedComment.jsp",method:"GET",most_rated_selector:"#most_rated_comment",question_id:ZetaProperties.question_id,answer_id_votesup:ZetaProperties.answer_id_votesup,answer_id_votesdown:ZetaProperties.answer_id_votesdown},get:function(itemid,itemtype,locale,page,allowCommentVote){var cfgComments=JsZetaUtils.Commenting.comments.cfg;var cfgMR=JsZetaUtils.Commenting.comments.cfgMostRated;var params={ITEMID:itemid,ITEMTYPE:itemtype,LANGUAGE:locale,hiTarget:cfgComments.target,pagesize:cfgComments.pagesize,page:page,question:cfgMR.question_id,answeridup:cfgMR.answer_id_votesup,answeriddown:cfgMR.answer_id_votesdown,allowCommentVote:allowCommentVote};$.get(cfgComments.command,params,function(data,status){if(status=="success"){if($(cfgComments.comments_selector).length>0){$(cfgComments.comments_selector).wrapAll(data);}else{$(cfgComments.comments_selector_container).prepend(data);}}});},getNoCache:function(itemid,itemtype,locale,page,allowCommentVote){var cfgComments=JsZetaUtils.Commenting.comments.cfg;var cfgMR=JsZetaUtils.Commenting.comments.cfgMostRated;var params={ITEMID:itemid,ITEMTYPE:itemtype,LANGUAGE:locale,hiTarget:cfgComments.target,pagesize:cfgComments.pagesize,page:page,question:cfgMR.question_id,answeridup:cfgMR.answer_id_votesup,answeriddown:cfgMR.answer_id_votesdown,allowCommentVote:allowCommentVote,ts:JsZetaUtils.timestamp()};$.get(cfgComments.commandNoCache,params,function(data,status){if(status=="success"){if($(cfgComments.comments_selector).length>0){$(cfgComments.comments_selector).wrapAll(data);}else{$(cfgComments.comments_selector_container).prepend(data);}}});},getNumComments:function(itemid,itemtype,locale,numCall){var cfg=JsZetaUtils.Commenting.comments.cfg;$.ajax({type:cfg.commandCountCommentsMethod,url:cfg.commandCountComments,data:{ITEMID:itemid,ITEMTYPE:itemtype,LANGUAGE:locale},dataType:"xml",success:function(xml){var numComments=0;$(xml).find("int").each(function(){numComments=$(this).text();});while(numCall>0){if($(cfg.num_comments_selector+"_"+itemtype+"_"+itemid+"_"+locale+"_"+numCall).length>0){$(cfg.num_comments_selector+"_"+itemtype+"_"+itemid+"_"+locale+"_"+numCall).html("<!-- start remove --> ("+numComments+")<!-- end remove -->");}numCall--;}},error:function(xml){}});},getNumCommentsText:function(itemid,itemtype,locale,numCall,text){var cfg=JsZetaUtils.Commenting.comments.cfg;var elemPath=JsZetaUtils.Paths.BasePathLocale+"minuto-a-minuto"+JsZetaUtils.HasFiles.hash(itemid)+"numcomments_minute_"+itemid+".xml";$.ajax({type:cfg.commandCountCommentsMethod,url:elemPath,dataType:"xml",success:function(xml){var numComments=0;$(xml).find("int").each(function(){numComments=$(this).text();});while(numCall>0){if($(cfg.num_comments_selector+"_"+itemtype+"_"+itemid+"_"+locale+"_"+numCall).length>0){$(cfg.num_comments_selector+"_"+itemtype+"_"+itemid+"_"+locale+"_"+numCall).html("<!-- start remove -->"+text+" ("+numComments+")<!-- end remove -->");}numCall--;}},error:function(xml){}});},getNumCommentsNoCache:function(itemid,itemtype,locale,numCall){var cfg=JsZetaUtils.Commenting.comments.cfg;while(numCall>0){if($(cfg.num_comments_selector+"_"+itemtype+"_"+itemid+"_"+locale+"_"+numCall).length>0){var numComments=$(cfg.num_comments_selector+"_"+itemtype+"_"+itemid+"_"+locale+"_"+numCall).text();numComments=parseInt(numComments.substring((numComments.indexOf("(")+1),numComments.indexOf(")")));numComments=numComments+1;$(cfg.num_comments_selector+"_"+itemtype+"_"+itemid+"_"+locale+"_"+numCall).html("<!-- start remove --> ("+numComments+")<!-- end remove -->");}numCall--;}},getCommentsMinute:function(itemid,itemtype,locale,page){var cfgComments=JsZetaUtils.Commenting.comments.cfgMinute;var cfgMR=JsZetaUtils.Commenting.comments.cfgMostRated;var params={ITEMID:itemid,ITEMTYPE:itemtype,LANGUAGE:locale,hiTarget:cfgComments.target,pagesize:cfgComments.pagesize,page:page,question:cfgMR.question_id,answeridup:cfgMR.answer_id_votesup,answeriddown:cfgMR.answer_id_votesdown};$.get(cfgComments.command,params,function(data,status){if(status=="success"){if($(cfgComments.comments_selector).length>0){$(cfgComments.comments_selector).wrapAll(data);}else{$(cfgComments.modcol_selector).append(data);}}});},timerCommentsMinute:"",setCommentsMinuteTimer:function(locale,itemid){JsZetaUtils.Commenting.comments.timerCommentsMinute=setTimeout("JsZetaUtils.Commenting.comments.getCommentsMinuteInc('"+locale+"',"+itemid+")",JsZetaUtils.Commenting.comments.cfgMinute.timeReloadComments);},resetCommentsMinuteTimer:function(locale,itemid){clearTimeout(JsZetaUtils.Commenting.comments.timerCommentsMinute);JsZetaUtils.Commenting.comments.timerCommentsMinute=setTimeout("JsZetaUtils.Commenting.comments.getCommentsMinuteInc('"+locale+"',"+itemid+")",JsZetaUtils.Commenting.comments.cfgMinute.timeReloadComments);},stopCommentsMinuteTimer:function(){clearTimeout(JsZetaUtils.Commenting.comments.timerCommentsMinute);},getCommentsMinuteFirst:function(locale,itemid){JsZetaUtils.Commenting.comments.getCommentsMinuteInc(locale,itemid);},getCommentsMinuteInc:function(locale,itemid){var elemPath=JsZetaUtils.Paths.BasePathLocale+"minuto-a-minuto"+JsZetaUtils.HasFiles.hash(itemid)+"comments_minute_"+itemid+".inc";var cfgComments=JsZetaUtils.Commenting.comments.cfgMinute;$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(elemPath),success:function(data,status){if(status=="success"){if($(cfgComments.comments_selector).length>0){$(cfgComments.comments_selector).wrapAll(data);}else{$(cfgComments.modcol_selector).append(data);}}JsZetaUtils.Commenting.comments.setCommentsMinuteTimer(locale,itemid);},error:function(){JsZetaUtils.Commenting.comments.setCommentsMinuteTimer(locale,itemid);}});},getCommentsMinuteNoCache:function(itemid,itemtype,locale,page){var cfgComments=JsZetaUtils.Commenting.comments.cfgMinute;var cfgMR=JsZetaUtils.Commenting.comments.cfgMostRated;var params={ITEMID:itemid,ITEMTYPE:itemtype,LANGUAGE:locale,hiTarget:cfgComments.target,pagesize:cfgComments.pagesize,page:page,question:cfgMR.question_id,answeridup:cfgMR.answer_id_votesup,answeriddown:cfgMR.answer_id_votesdown};$.get(JsZetaUtils.urlNoCache(cfgComments.commandNoCache),params,function(data,status){if(status=="success"){if($(cfgComments.comments_selector).length>0){$(cfgComments.comments_selector).wrapAll(data);}else{$(cfgComments.modcol_selector).append(data);}}JsZetaUtils.Commenting.comments.setCommentsMinuteTimer(locale,itemid);});},getLast:function(locale,limit){var cfgComments=JsZetaUtils.Commenting.comments.cfgLast;var params={LANGUAGE:locale,LIMIT:limit};$.get(cfgComments.command,params,function(data,status){if(status=="success"){$(cfgComments.last_comments_selector).append(data);}});},getMostRated:function(locale,interactive){var cfg=JsZetaUtils.Commenting.comments.cfgMostRated;$.ajax({type:cfg.method,url:cfg.command,data:{LANGUAGE:locale,question:cfg.question_id,answeridup:cfg.answer_id_votesup,answeriddown:cfg.answer_id_votesdown,interactive:interactive},success:function(data){$(cfg.most_rated_selector).append(data);},error:function(data){}});},LoginReq:function(){var cfg=JsZetaUtils.Commenting.comments.cfg;$(cfg.form_comments_selector).hide();if(!JsZetaUtils.Cookies.areEnabled()){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getUser"),dataType:"xml",success:function(xml){$(cfg.login_msg_selector).remove();$(cfg.form_comments_selector).show();}});}else{var userEncCookie=JsZetaUtils.getCookie("userInfo");if(userEncCookie.length>2){if(userEncCookie.charAt(0)=='"'){userEncCookie=userEncCookie.substring(1,userEncCookie.length-1);}dojo.require("dojox.encoding.crypto.Blowfish");var userCookie=dojox.encoding.crypto.Blowfish.decrypt(userEncCookie,"abcdefg");var userCookieObj=eval("["+userCookie+"]");if(userCookieObj[0].active){$(cfg.login_msg_selector).remove();$(cfg.form_comments_selector).show();}}}},LoginReqMinute:function(){var cfg=JsZetaUtils.Commenting.comments.cfg;$(cfg.form_comments_selector).hide();if(!JsZetaUtils.Cookies.areEnabled()){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getUser"),dataType:"xml",success:function(xml){$(xml).find("nombre").each(function(){$("#COMMENT_NAME").val($(this).text());});$(cfg.login_msg_selector).remove();$(cfg.form_comments_selector).show();}});}else{var userEncCookie=JsZetaUtils.getCookie("userInfo");if(userEncCookie.length>2){if(userEncCookie.charAt(0)=='"'){userEncCookie=userEncCookie.substring(1,userEncCookie.length-1);}dojo.require("dojox.encoding.crypto.Blowfish");var userCookie=dojox.encoding.crypto.Blowfish.decrypt(userEncCookie,"abcdefg");var userCookieObj=eval("["+userCookie+"]");if(userCookieObj[0].active){$("#COMMENT_NAME").val(userCookieObj[0].name);$(cfg.login_msg_selector).remove();$(cfg.form_comments_selector).show();}}}},FillForm:function(){if(!JsZetaUtils.Cookies.areEnabled()){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getUser"),dataType:"xml",success:function(xml){$(xml).find("nombre").each(function(){$("#COMMENT_NAME").val($(this).text());});$(xml).find("email").each(function(){$("#COMMENT_MAIL").val($(this).text());});}});}else{var userEncCookie=JsZetaUtils.getCookie("userInfo");if(userEncCookie.length>2){if(userEncCookie.charAt(0)=='"'){userEncCookie=userEncCookie.substring(1,userEncCookie.length-1);}dojo.require("dojox.encoding.crypto.Blowfish");var userCookie=dojox.encoding.crypto.Blowfish.decrypt(userEncCookie,"abcdefg");var userCookieObj=eval("["+userCookie+"]");if(userCookieObj[0].active){$("#COMMENT_NAME").val(userCookieObj[0].name);$("#COMMENT_MAIL").val(userCookieObj[0].email);}}}}};JsZetaUtils.Commenting.form={cfg:{id:"form_comments",id_personal_data:"comments_userdates",action_captcha_autopub:JsZetaUtils.SuPath+"commands/addCommentCaptcha",action_nocaptcha_autopub:JsZetaUtils.SuPath+"commands/addComment",action_captcha_nopub:JsZetaUtils.SuPath+"commands/addCommentCaptchaNopub",method:"POST",fields_validate:[["COMMENT_CONTENTTYPE"],["COMMENT_CONTENTID"],["LANGUAGE"],["COMMENT_TEXT","commentNotEmpty"],["COMMENT_NAME","validaName"],["COMMENT_MAIL","validaMail"],["CAPTCHA_RESPONSE"]],fields_clean:["COMMENT_TEXT","CAPTCHA_RESPONSE"],validate_funcs_namespace:"JsZetaUtils.Commenting.form.validate_functions."},cfgCommentsMinute:{id:"form_comments",id_personal_data:"comments_userdates",action_captcha_autopub:JsZetaUtils.SuPath+"commands/addCommentCaptcha",action_nocaptcha_autopub:JsZetaUtils.SuPath+"commands/addComment",action_captcha_nopub:JsZetaUtils.SuPath+"commands/addCommentCaptchaNopub",method:"POST",fields_validate:[["COMMENT_CONTENTTYPE"],["COMMENT_CONTENTID"],["LANGUAGE"],["COMMENT_NAME"],["COMMENT_TEXT","commentNotEmpty"],["CAPTCHA_RESPONSE"]],fields_clean:["COMMENT_NAME","COMMENT_TEXT","CAPTCHA_RESPONSE"],validate_funcs_namespace:"JsZetaUtils.Commenting.form.validate_functions."},validate_functions:{validaName:function(field_value,locale){field_value=field_value.replace(/^\s*|\s*$/g,"");$("#COMMENT_NAME").val(field_value);if((field_value)!=""){return false;}else{return I18n[locale].comentarios_campo_nombre+I18n[locale].comentarios_campo_obligatorio;}},commentNotEmpty:function(field_value,locale){if((field_value)!=""){if(field_value.length>500){return I18n[locale].comentarios_max_cars;}return false;}else{return I18n[locale].comentarios_obligatorio;}},validaMail:function(field_value,locale){if((field_value)!=""){if(field_value.lastIndexOf(".")<=2||field_value.indexOf("@")<=0){return I18n[locale].comentarios_mail_no_valido;}}return false;},validaCaptcha:function(field_value,locale){if(field_value.length<1){return I18n[locale].comentarios_captcha_oblig;}if(!/^([0-9])*$/.test(field_value)){return I18n[locale].comentarios_captcha_number;}if(field_value.length!=7){return I18n[locale].comentarios_captcha_length;}return false;},validaWeb:function(field_value,locale){if((field_value)!=""){if((field_value.indexOf(".")==-1||field_value.indexOf("http://")!=0)&&field_value!="http://"){return I18n[locale].comentarios_web_ko;}}return false;}},send:function(locale,addCommentCommand,cfg){var cfg=(cfg==undefined)?JsZetaUtils.Commenting.form.cfg:cfg;var valid=true;var data="";for(i in cfg.fields_validate){if(valid){var field_name=cfg.fields_validate[i][0];var field_value=$("#"+field_name).val();var sep_param=(cfg.fields_validate.length==parseInt(i)+1)?"":"&";if(field_name=="COMMENT_TEXT"){field_value=field_value.replace(/%/ig,escape("%"));}if(field_name!="undefined"&&field_name!=undefined){data=data+field_name+"="+field_value+sep_param;}if(typeof cfg.fields_validate[i][1]!="undefined"){var validate_func=eval(cfg.validate_funcs_namespace+cfg.fields_validate[i][1]);var error=validate_func(field_value,locale);if(error){valid=false;alert(error);}}}}if(valid){if(addCommentCommand!="action_nocaptcha_autopub"){validate_func=eval(cfg.validate_funcs_namespace+"validaCaptcha");error=validate_func($("#CAPTCHA_RESPONSE").val(),locale);if(error){valid=false;alert(error);}}if(valid){JsZetaUtils.Commenting.form.submit(data,cfg,locale,addCommentCommand);}}return false;},submit:function(data,cfg,locale,addCommentCommand){$("#"+cfg.id+" > div.comms_section > span.btn:first > input").attr("disabled","true");$.ajax({type:cfg.method,url:eval("cfg."+addCommentCommand),data:data+"&COMMENT_SITE="+ZetaProperties.destpub,contentType:"application/x-www-form-urlencoded;charset=utf-8",success:function(){var itemid=$("#COMMENT_CONTENTID").val();var itemtype=$("#COMMENT_CONTENTTYPE").val();var locale=$("#LANGUAGE").val();JsZetaUtils.captcha.reloadCaptcha("img_captcha",ZetaProperties.supath+"captcha");if(itemtype!="EVENT"){JsZetaUtils.Commenting.comments.getNumCommentsNoCache(itemid,itemtype,locale,3);JsZetaUtils.Commenting.comments.getNoCache(itemid,itemtype,locale,1,true);alert(I18n[locale].comentarios_send_ok);}else{JsZetaUtils.Commenting.comments.getCommentsMinuteNoCache(itemid,itemtype,locale,1);alert(I18n[locale].comentarios_send_ok);}$("#"+cfg.id+" > div.comms_section > span.btn:first > input").attr("disabled","");JsZetaUtils.Commenting.form.clean();JsZetaUtils.RecordEvent("COMMENT",locale,itemtype,itemid);},error:function(){alert(I18n[locale].comentarios_send_ko);$("#"+cfg.id+" > div.comms_section > span.btn:first > input").attr("disabled","");}});},clean:function(){$("#COMMENT_TEXT").val("");$("#CAPTCHA_RESPONSE").val("");return false;},enablePersonalData:function(){var cfg=JsZetaUtils.Commenting.form.cfg;$("#COMMENT_TEXT").val("");$("#COMMENT_TEXT").attr("onclick","");JsZetaUtils.Show("#"+cfg.id_personal_data);},show:function(cont_id){JsZetaUtils.Show(cont_id);},initForm:function(){$("#COMMENT_TEXT").val("");$("#COMMENT_TEXT").attr("onclick","");}};JsZetaUtils.urlNoCache=function(url){return url+"?nocache="+JsZetaUtils.timestamp();};JsZetaUtils.urlNoCacheM=function(url){return url+"?nocache="+JsZetaUtils.timestampM();};JsZetaUtils.idSel=function(id_elem){return"#"+id_elem;};JsZetaUtils.captcha={ImageCaptcha:function(properties,elem){var url=properties.src;var id=properties.id;var elem_to_add=JsZetaUtils.idSel(elem);var img_captcha=$("<img>");for(var i in properties){if(i!="src"){img_captcha.attr(i,properties[i]);}}var f_reloadCaptcha=function(){JsZetaUtils.captcha.reloadCaptcha(id,url);};img_captcha.attr("style","cursor: pointer");img_captcha.attr("src",JsZetaUtils.urlNoCache(url));img_captcha.bind("click",f_reloadCaptcha);$(elem_to_add).append(img_captcha);},reloadCaptcha:function(id_img_captcha,captcha_src){var url_load_captcha=JsZetaUtils.urlNoCache(captcha_src);var img_captcha=JsZetaUtils.idSel(id_img_captcha);$(img_captcha).hide("slow",function(){$(img_captcha).attr("src",url_load_captcha);$(img_captcha).show("slow");});}};function zloadMediaMV(capa,tipo,datos,isBDR,estilo){if(typeof(estilo)=="undefined"){estilo="ancho";}if(typeof(isBDR)=="undefined"){isBDR=false;}if(tipo=="foto"){$("#picture_feature_"+capa).css("opacity","0.6");$("#picture_feature_"+capa).append("<img id='loaderIm' style='position: absolute; left: 65px; top: 95px; width: 160px; height: 20px;' src='/css/img/load.gif'/>");$("#loaderIm").remove();$("#picture_feature_"+capa).css("opacity","1");if(estilo=="alto"){$("#picture_feature_"+capa).html("<a href='"+datos.imagen_alta+"'title='"+datos.title+"' class='thickbox' id='imagenAmpliar_"+capa+"'><img style='height:100%' alt='"+datos.title+"' title='"+datos.title+"'src='"+datos.imagen_media+"' id='image_big_"+capa+"' class='feat'></a>");}else{$("#picture_feature_"+capa).html("<a href='"+datos.imagen_alta+"'title='"+datos.title+"' class='thickbox' id='imagenAmpliar_"+capa+"'><img style='width:100%' alt='"+datos.title+"' title='"+datos.title+"'src='"+datos.imagen_media+"' id='image_big_"+capa+"' class='feat'></a>");}tb_init("a.thickbox");}else{var img_width=JsZetaUtils.Player.getSizeObj("minividtitle_"+capa,300,220).width;var img_height=JsZetaUtils.Player.getSizeObj("minividtitle_"+capa,300,220).height;srcS="<div id='c"+tipo+"'></div><script type='text/javascript'>width = '"+img_width+"';height = '"+img_height+"';flashcontentId ='"+tipo+"';var so"+tipo+" = new SWFObject('/swf/CTVPlayer.swf',flashcontentId,width,height,'9');so"+tipo+".addParam('allowfullscreen','true');so"+tipo+".addParam('allowscriptaccess','always');so"+tipo+".addParam('wmode','transparent');so"+tipo+".addVariable('assetID','"+datos.assetID+"');so"+tipo+".addVariable('location','"+datos.location+"');so"+tipo+".write('c"+tipo+"');<\/script>";$("#picture_feature_"+capa).html(srcS);}}function zloadMedia(capa,p,tipo,datos,isBDR,estilo){if(typeof(estilo)=="undefined"){estilo="ancho";}if(typeof(isBDR)=="undefined"){isBDR=false;}if(tipo=="foto"){$("#"+capa).css("opacity","0.6");$("#"+capa).append("<img id='loaderIm' style='position: absolute; left: 65px; top: 95px; width: 160px; height: 20px;' src='/css/img/load.gif'/>");$("#loaderIm").remove();$("#"+capa).css("opacity","1");if(isBDR){if(estilo=="alto"){$("#"+capa).html("<span class='pictureL50'><a href='"+datos.imagen_alta+"' title='' class='thickbox'><img style='height:100%' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a></span><span class='pict_title'><h2 id='"+p+"'><a href='#'>"+datos.desc+"</a></h2></span>");}else{$("#"+capa).html("<span class='pictureL50'><a href='"+datos.imagen_alta+"' title='' class='thickbox'><img style='width:100%' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a></span><span class='pict_title'><h2 id='"+p+"'><a href='#'>"+datos.desc+"</a></h2></span>");}$("#"+capa+" a[class=thickbox]").attr("title",datos.atitle);}else{if(estilo=="alto"){$("#"+capa).html("<a href='"+datos.imagen_alta+"' title='' class='thickbox'><img style='height:100%' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a>");}else{$("#"+capa).html("<a href='"+datos.imagen_alta+"' title='' class='thickbox'><img style='width:100%' alt='"+datos.title+"' title='"+datos.title+"' src='"+datos.imagen_media+"' /></a>");}$("#"+capa+" a[class=thickbox]").attr("title",datos.atitle);}if($("#"+p).length>0&&!isBDR){$("#"+p).text(datos.title);$("#"+p).fadeIn();}else{if(isBDR){}else{$("#"+capa).after("<p id='"+p+"'>"+datos.title+"</p>");}}tb_init("a.thickbox");}else{if(tipo=="graph"){srcS="<div class='intro_gray2'><OBJECT codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='292' HEIGHT='191.396' id='"+datos.title+"' ALIGN=''><PARAM NAME='movie' VALUE='"+datos.graphFile+"'></PARAM><PARAM NAME='quality' VALUE='original'></PARAM><PARAM NAME='bgcolor' VALUE='0x000000'></PARAM><EMBED src='"+datos.graphFile+"' quality='original' bgcolor='#333399' WIDTH='292' HEIGHT='191.396' NAME='"+datos.title+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT></div>";if(!isBDR){$("#"+p).fadeOut();$("#"+capa).html(srcS);}else{if(isBDR){var href=datos.link!=""?datos.link:"#";if(typeof(href)=="undefined"){href="#";}$("#"+capa).html("<div class='intro_gray2'><h4>"+datos.title+"</h4></div><span class='pictureL50'>"+srcS+"</span><span class='pict_title'><h2 id='"+p+"'><a href='"+href+"'>"+datos.desc+"</a></h2></span>");}}}else{srcS="<div id='c"+tipo+"'></div><script type='text/javascript'>width = 300;height = 220;flashcontentId ='"+tipo+"';var so"+tipo+" = new SWFObject('/swf/CTVPlayer.swf',flashcontentId,width,height,'9');so"+tipo+".addParam('allowfullscreen','true');so"+tipo+".addParam('allowscriptaccess','always');so"+tipo+".addParam('wmode','transparent');so"+tipo+".addVariable('assetID','"+datos.assetID+"');so"+tipo+".addVariable('location','"+datos.location+"');so"+tipo+".write('c"+tipo+"');<\/script>";if(!isBDR){$("#"+p).fadeOut();$("#"+capa).html(srcS);}else{if(isBDR){var href=datos.link!=""?datos.link:"#";if(typeof(href)=="undefined"){href="#";}$("#"+capa).html("<div class='intro_gray2'><h4>"+datos.title+"</h4></div><span class='pictureL50'>"+srcS+"</span><span class='pict_title'><h2 id='"+p+"'><a href='"+href+"'>"+datos.desc+"</a></h2></span>");}}}}}function zloadFrontpageMedia(capa,p,tipo,datos){var img_width=$("#"+capa+" a img.main-mm").width();var img_height=((img_width*9)/16)+27.3;$("#"+capa).css("opacity","0.6");$("#"+capa).append("<img id='loaderIm' style='position: absolute; left: 65px; top: 95px; width: 160px; height: 20px;' src='/css/img/load.gif'/>");srcS="<div id='"+tipo+"'></div><script type='text/javascript'>width = '"+img_width+"';height = '"+img_height+"';flashcontentId ='p_"+tipo+"';var so"+tipo+" = new SWFObject('/swf/CTVPlayer.swf',flashcontentId,width,height,'9');so"+tipo+".addParam('allowfullscreen','true');so"+tipo+".addParam('allowscriptaccess','always');so"+tipo+".addParam('wmode','transparent');so"+tipo+".addVariable('assetID','"+datos.assetID+"');so"+tipo+".addVariable('playerId',flashcontentId);so"+tipo+".addVariable('location','"+datos.location+"');so"+tipo+".addVariable('autostart','true');so"+tipo+".write('"+tipo+"');<\/script>";$("#"+capa).html(srcS);$("#loaderIm").remove();$("#"+capa).css("opacity","1");}function getThisMovie(swf){if(navigator.appName.indexOf("Microsoft")!=-1){return window[swf];}else{return document[swf];}}function ctvloadVideo(swf,obj){getThisMovie(swf).loadFile(obj);}JsZetaUtils.Poll={};JsZetaUtils.Poll.listado={cfg:{container_id:"encuestas_pages",path:"commons/encuestas/portada/incs/",name:"cmp-poll-page",ext:".inc"},cfg_poll_day:{container_id:"encuestas_pages_pollday",path:"commons/encuestas/portada/incs/",name:"cmp-poll-day-page",ext:".inc"},updateInc:function(incNum,cfg){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+incNum+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"encuesta");},updateIncPolls:function(incNum,path,name,ext,container_id){var inc_path=JsZetaUtils.Paths.BasePathLocale+path+name+incNum+ext;JsZetaUtils.ReplaceDOMElement(container_id,inc_path,"encuesta");}};JsZetaUtils.Poll.votes={cfgPollVotes:{action:JsZetaUtils.SuPath+"commands/getPoll",method:"GET",actionCountVotes:JsZetaUtils.SuPath+"services/countPolls"},updateVotes:function(idpoll,text){if(typeof(text)=="undefined"){text="";}var cfg=JsZetaUtils.Poll.votes.cfgPollVotes;$.ajax({type:cfg.method,url:cfg.actionCountVotes,data:{POLLID:idpoll},success:function(xml){var numVotes=0;$(xml).find("int").each(function(){numVotes=$(this).text();});var numPolls=$("span[id='votes_"+idpoll+"']").length;for(var i=0;i<numPolls;i++){$($("span[id='votes_"+idpoll+"']")[i]).text(numVotes+text);}},error:function(){}});},updateVotesNoCache:function(idpoll){var votes=$("#votes_"+idpoll).text();votes=parseInt(JsZetaUtils.trim(votes));votes=votes+1;var numPolls=$("span[id='votes_"+idpoll+"']").length;for(var i=0;i<numPolls;i++){$($("span[id='votes_"+idpoll+"']")[i]).text(votes);}}};JsZetaUtils.Poll.form={cfg:{actionAdd:JsZetaUtils.SuPath+"services/addPollVote",actionAddMethod:"POST",actionResults:JsZetaUtils.SuPath+"commands/getPoll",actionResultsMethod:"GET",options:""},send:function(idpoll){var cfg=JsZetaUtils.Poll.form.cfg;var valid=true;var data="";if($("#pollbasic_"+idpoll+" input:radio:checked").val()!=null){data="POLLID="+$("#pollbasic_"+idpoll+" #POLLID_"+idpoll).val()+"&LANGUAGE="+$("#pollbasic_"+idpoll+" #LANGUAGE_"+idpoll).val()+"&POLLOPTIONID="+$("#pollbasic_"+idpoll+" input:radio:checked").val();}else{valid=false;}if(valid){JsZetaUtils.Poll.form.submit(data,cfg,idpoll,"");}return false;},sendLive:function(idpoll,locale){var cfg=JsZetaUtils.Poll.form.cfg;var valid=true;var data="";if($("#pollbasic_"+idpoll+" input:radio:checked").val()!=null){data="POLLID="+$("#pollbasic_"+idpoll+" #POLLID_"+idpoll).val()+"&LANGUAGE="+$("#pollbasic_"+idpoll+" #LANGUAGE_"+idpoll).val()+"&POLLOPTIONID="+$("#pollbasic_"+idpoll+" input:radio:checked").val();}else{valid=false;}if(valid){JsZetaUtils.Poll.form.submitLive(data,cfg,idpoll,locale);}return false;},sendNew:function(idpoll){var cfg=JsZetaUtils.Poll.form.cfg;var valid=true;var data="";var language="";if($("#pollbasic_"+idpoll+" input:radio:checked").val()!=null){language=$("#pollbasic_"+idpoll+" #LANGUAGE_"+idpoll).val();data="POLLID="+$("#pollbasic_"+idpoll+" #POLLID_"+idpoll).val()+"&LANGUAGE="+language+"&POLLOPTIONID="+$("#pollbasic_"+idpoll+" input:radio:checked").val();}else{valid=false;}if(valid){JsZetaUtils.Poll.form.submitNew(data,cfg,idpoll,language);}return false;},submit:function(data,cfg,idpoll){$.ajax({type:cfg.actionAddMethod,url:cfg.actionAdd,data:data+"&POLLSITE="+ZetaProperties.destpub,success:function(){optionVoted=JsZetaUtils.getParameterUrl2(data,"POLLOPTIONID");language=JsZetaUtils.getParameterUrl2(data,"LANGUAGE");JsZetaUtils.Poll.form.infoNoCache(idpoll,optionVoted,false,"",language);},error:function(){alert("Ya se ha registrado un voto desde esta IP.");}});},submitLive:function(data,cfg,idpoll,locale){$.ajax({type:cfg.actionAddMethod,url:cfg.actionAdd,data:data+"&POLLSITE="+ZetaProperties.destpub,success:function(){cfg.options=data;JsZetaUtils.Poll.form.infoLiveNoCache(cfg,idpoll,true,locale);},error:function(){alert("Ya se ha registrado un voto desde esta IP.");}});},submitNew:function(data,cfg,idpoll,language){$.ajax({type:cfg.actionAddMethod,url:cfg.actionAdd,data:data+"&POLLSITE="+ZetaProperties.destpub,success:function(){optionVoted=JsZetaUtils.getParameterUrl2(data,"POLLOPTIONID");JsZetaUtils.Poll.votes.updateVotesNoCache(idpoll);JsZetaUtils.Poll.form.viewInfoNewsNoCache(idpoll,language,false,optionVoted);},error:function(){alert("Ya se ha registrado un voto desde esta IP.");}});},viewInfo:function(idpoll,language,live){var cfg=JsZetaUtils.Poll.form.cfg;if(typeof(language)=="undefined"){language="es";}if(typeof(live)=="undefined"){live="";}JsZetaUtils.Poll.form.info(cfg,idpoll,true,true,"",language,live);},viewInfoLive:function(idpoll,language,live){var cfg=JsZetaUtils.Poll.form.cfg;if(typeof(live)=="undefined"){live="";}var title=false;JsZetaUtils.Poll.form.infoLive(cfg,idpoll,title,language);},viewInfoNews:function(idpoll,language,visible){var cfg=JsZetaUtils.Poll.form.cfg;detalle="";$.ajax({type:cfg.actionResultsMethod,url:cfg.actionResults,data:"POLLID="+idpoll+"&hiTarget=/poll-system-view.jsp&LANGUAGE="+language+"&visible="+visible+"&title=false&detalle="+detalle+"&pd_new=true",success:function(dat){if(detalle==""){$("#pOptions_"+idpoll).css("display","none");$("#btn_res").css("display","none");$("#btn_vote").css("display","none");}$("#"+detalle+"pollinfo_"+idpoll).html(dat);$("#"+detalle+"pollinfo_"+idpoll).css("display","block");$("#pollbasic_"+idpoll+" :radio").css("display","none");},error:function(){$("#"+detalle+"pollinfo_"+idpoll).html("<p>No ha sido posible obtener los resultados</p>");$("#"+detalle+"pollinfo_"+idpoll).fadeIn();}});},viewInfoNewsNoCache:function(idpoll,language,visible,optionVoted){var cfg=JsZetaUtils.Poll.form.cfg;detalle="";$.ajax({type:cfg.actionResultsMethod,url:cfg.actionResults,data:"POLLID="+idpoll+"&hiTarget=/poll-system-view.jsp&LANGUAGE="+language+"&visible="+visible+"&title=false&detalle="+detalle+"&pd_new=true&NOCACHE=true&OPT="+optionVoted,success:function(dat){if(detalle==""){$("#pOptions_"+idpoll).css("display","none");$("#btn_res").css("display","none");$("#btn_vote").css("display","none");}$("#"+detalle+"pollinfo_"+idpoll).html(dat);$("#"+detalle+"pollinfo_"+idpoll).css("display","block");$("#pollbasic_"+idpoll+" :radio").css("display","none");},error:function(){$("#"+detalle+"pollinfo_"+idpoll).html("<p>No ha sido posible obtener los resultados</p>");$("#"+detalle+"pollinfo_"+idpoll).fadeIn();}});},info:function(cfg,idpoll,visible,title,detalle,language,live){if(typeof(visible)=="undefined"){visible=true;}if(typeof(title)=="undefined"){title=false;}if(typeof(detalle)=="undefined"){detalle="";}if(typeof(language)=="undefined"){language="es";}if(typeof(live)=="undefined"){live="";}$.ajax({type:cfg.actionResultsMethod,url:cfg.actionResults,data:"POLLID="+idpoll+"&hiTarget=/poll-system-view.jsp&LANGUAGE="+language+"&visible="+visible+"&title="+title+"&detalle="+detalle+"&live="+live,success:function(dat){if(live==""){if(detalle==""){$("#pOptions_"+idpoll).css("display","none");$("#btn_res").css("display","none");$("#btn_vote").css("display","none");}$("#"+detalle+"pollinfo_"+idpoll).html(dat);$("#"+detalle+"pollinfo_"+idpoll).css("display","block");$("#pollbasic_"+idpoll+" :radio").css("display","none");}else{$("#viewInfo_"+idpoll).html(dat);$("#viewInfo_"+idpoll).css("display","block");}},error:function(){$("#"+detalle+"pollinfo_"+idpoll).html("<p>No ha sido posible obtener los resultados</p>");$("#"+detalle+"pollinfo_"+idpoll).fadeIn();}});},infoLive:function(cfg,idpoll,title,language){if(typeof(title)=="undefined"){title=false;}if(typeof(language)=="undefined"){language="es";}$.ajax({type:cfg.actionResultsMethod,url:cfg.actionResults,data:"POLLID="+idpoll+"&hiTarget=/poll-system-view-live.jsp&LANGUAGE="+language+"&title="+title,success:function(dat){$("#view_result_poll_"+idpoll).remove();$("#viewInfo_"+idpoll).html(dat);$("#viewInfo_"+idpoll).css("display","block");},error:function(){$("#viewInfo_"+idpoll).html("<p>No ha sido posible obtener los resultados</p>");$("#viewInfo_"+idpoll).css("display","block");}});},infoNoCache:function(idpoll,visible,title,detalle,language,live){var cfg=JsZetaUtils.Poll.form.cfg;if(typeof(visible)=="undefined"){visible=true;}if(typeof(title)=="undefined"){title=false;}if(typeof(detalle)=="undefined"){detalle="";}if(typeof(language)=="undefined"){language="es";}if(typeof(live)=="undefined"){live="";}$.ajax({type:cfg.actionResultsMethod,url:cfg.actionResults,data:"POLLID="+idpoll+"&hiTarget=/poll-system-view.jsp&LANGUAGE="+language+"&visible="+visible+"&title="+title+"&detalle="+detalle+"&live="+live+"&NOCACHE=true&OPT="+optionVoted,success:function(dat){if(live==""){if(detalle==""){$("#pOptions_"+idpoll).css("display","none");$("#btn_res").css("display","none");$("#btn_vote").css("display","none");}$("#"+detalle+"pollinfo_"+idpoll).html(dat);$("#"+detalle+"pollinfo_"+idpoll).css("display","block");$("#pollbasic_"+idpoll+" :radio").css("display","none");}else{$("#viewInfo_"+idpoll).html(dat);$("#viewInfo_"+idpoll).css("display","block");}},error:function(){$("#"+detalle+"pollinfo_"+idpoll).html("<p>No ha sido posible obtener los resultados</p>");$("#"+detalle+"pollinfo_"+idpoll).fadeIn();}});},infoLiveNoCache:function(cfg,idpoll,title,language){var idoption="";idoption=$("#pOptions_"+idpoll+" input:radio:checked").val();if(idoption==undefined||idoption==""){idoption=JsZetaUtils.getParameterUrl2(cfg.options,"POLLOPTIONID");}$.ajax({type:cfg.actionResultsMethod,url:cfg.actionResults,data:"POLLID="+idpoll+"&hiTarget=/poll-system-view-live.jsp&LANGUAGE="+language+"&title="+title+"&NOCACHE=true&OPT="+idoption,success:function(dat){$("#viewInfo_"+idpoll).remove();$("#pollinfo_"+idpoll).html(dat);},error:function(){$("#viewInfo_"+idpoll).html("<p>No ha sido posible obtener los resultados</p>");$("#viewInfo_"+idpoll).css("display","block");}});},hotVote:function(actionURL,idpoll,title,detalle,language,live){$.ajax({type:"POST",url:actionURL+"&POLLSITE="+ZetaProperties.destpub,success:function(){optionVoted=JsZetaUtils.getParameterUrl2(actionURL,"POLLOPTIONID");JsZetaUtils.Poll.form.infoNoCache(idpoll,false,title,detalle,language,live,optionVoted);},error:function(){alert("Ya se ha registrado un voto desde esta IP.");$("#"+detalle+"pollinfo_"+idpoll).fadeIn();}});},hotVoteNews:function(actionURL,idpoll,title,detalle,language,live){$.ajax({type:"POST",url:actionURL+"&POLLSITE="+ZetaProperties.destpub,success:function(){optionVoted=JsZetaUtils.getParameterUrl2(actionURL,"POLLOPTIONID");JsZetaUtils.Poll.votes.updateVotesNoCache(idpoll);JsZetaUtils.Poll.form.viewInfoNewsNoCache(idpoll,language,false,optionVoted);},error:function(){alert("Ya se ha registrado un voto desde esta IP.");$("#"+detalle+"pollinfo_"+idpoll).fadeIn();}});}};function share(identifier){var shareURL="";var URL=window.document.location.href;if(URL.charAt(URL.length-1)=="#"){URL=URL.substring(0,URL.length-1);}var titleURL=encodeURIComponent(window.document.title);if(identifier=="meneame.net"){shareURL="http://meneame.net/submit.php?url="+URL;}else{if(identifier=="del.icio.us"){shareURL="http://del.icio.us/post?title="+titleURL+"&url="+URL;}else{if(identifier=="digg.com"){shareURL="http://digg.com/submit?phase=2&url="+URL+"&title="+titleURL;}else{if(identifier=="twitter.com"){shareURL="https://twitter.com/share?original_referer="+URL;}else{if(identifier=="facebook.com"){shareURL="http://www.facebook.com/sharer.php?u="+URL;}else{if(identifier=="yahoo.es"){shareURL="http://myweb2.search.yahoo.com/myresults/bookmarklet?u="+URL+"&t="+titleURL;}else{if(identifier=="fresqui"){shareURL="http://tec.fresqui.com/post?url="+URL+"&title="+titleURL;}else{if(identifier=="technorati"){shareURL="http://www.technorati.com/search/"+URL;}else{if(identifier=="buzz"){shareURL="http://www.google.com/reader/link?url="+URL+"&title="+titleURL;}}}}}}}}}if(shareURL!=""){window.open(shareURL);}return false;}function slideTop(capa){$("dd[id^=mas]").slideUp();$("img[id^=flecha]").attr("src","/css/img/iconos/lomas_expand.gif");$("#"+capa).slideDown();$("#flecha_"+capa).attr("src","/css/img/iconos/lomas_collapse.gif");}I18n.es.sendfriend_obligatorio="Debe escribir un comentario";I18n.es.sendfriend_name_remit_obligatorio="Debe escribir el nombre del remitente";I18n.es.sendfriend_name_destin_obligatorio="Debe escribir el nombre del destinatario";I18n.es.sendfriend_mail_no_valido="e-Mail no válido";I18n.es.sendfriend_send_ok="Su mensaje se ha enviado correctamente";I18n.es.sendfriend_send_ko="No se pudo enviar el mensaje";I18n.ca.sendfriend_obligatorio="Escriu un comentari";I18n.ca.sendfriend_name_remit_obligatorio="Cal escriure el nom del remitent";I18n.ca.sendfriend_name_destin_obligatorio="Cal escriure el nom del destinatari";I18n.ca.sendfriend_mail_no_valido="e-Mail no vàlid";I18n.ca.sendfriend_send_ok="El teu missatge s'ha enviat correctament";I18n.ca.sendfriend_send_ko="No s'ha pogut enviar el missatge";JsZetaUtils.Sendfriend={cfg:{id:"sendFriendForm",action:JsZetaUtils.SuPath+"services/sendToFriend",method:"POST",fields_validate:[["name_from","validaNameFrom"],["friend_from","validaMail"],["name_to","validaNameTo"],["friend_to","validaMail"],["friend_comments","commentNotEmpty"],],fields_clean:["friend_from","friend_to","name_to","name_from","friend_comments"],validate_funcs_namespace:"JsZetaUtils.Sendfriend.validate_functions."},validate_functions:{commentNotEmpty:function(field_value,locale){if((field_value)!=""){return false;}else{return I18n[locale].sendfriend_obligatorio;}},validaNameFrom:function(field_value,locale){if((field_value)!=""){return false;}else{return I18n[locale].sendfriend_name_remit_obligatorio;}},validaNameTo:function(field_value,locale){if((field_value)!=""){return false;}else{return I18n[locale].sendfriend_name_destin_obligatorio;}},validaMail:function(field_value,locale){if(field_value.lastIndexOf(".")<=2||field_value.indexOf("@")<=0){return I18n[locale].sendfriend_mail_no_valido;}return false;}},send:function(locale,typeContent){var cfg=JsZetaUtils.Sendfriend.cfg;var valid=true;var data="";for(i in cfg.fields_validate){if(valid){var field_name=cfg.fields_validate[i][0];var field_value=$("#"+field_name).val();var sep_param=(cfg.fields_validate.length==parseInt(i)+1)?"":"&";data=data+field_name+"="+field_value+sep_param;if(typeof cfg.fields_validate[i][1]!="undefined"){var validate_func=eval(cfg.validate_funcs_namespace+cfg.fields_validate[i][1]);var error=validate_func(field_value,locale);if(error){valid=false;alert(error);}}}}if(valid){var friend_pageurl=window.parent.location.href;data=data+"&friend_pageurl="+friend_pageurl+"&friend_lang="+locale+"&friend_title="+window.parent.document.title;JsZetaUtils.Sendfriend.submit(data,cfg,locale,typeContent,JsZetaUtils.getContentIdFromUrl(friend_pageurl));}return false;},submit:function(data,cfg,locale,typeContent,contentId){$.ajax({type:cfg.method,url:cfg.action,data:data,contentType:"application/x-www-form-urlencoded;charset=utf-8",success:function(){JsZetaUtils.RecordEvent("SEND",locale,typeContent,contentId);window.parent.$("#TB_closeWindowButton").click();alert(I18n[locale].sendfriend_send_ok);},error:function(){JsZetaUtils.RecordEvent("SEND",locale,typeContent,contentId);alert(I18n[locale].sendfriend_send_ko);}});},clean:function(){var cfg=JsZetaUtils.Sendfriend.cfg;for(i in cfg.fields_clean){var field_name=cfg.fields_clean[i];$("#"+field_name).val("");}return false;}};JsZetaUtils.getContentIdFromUrl=function(url){var position=url.indexOf(".shtml")-1;var findId=false;var id="";while(!findId){caracter=url[position];if(isNaN(caracter)){findId=true;}else{id=caracter+id;}position--;}return id;};JsZetaUtils.IncrementCounter=function(type,id,lang){$.ajax({type:"POST",url:JsZetaUtils.SuPath+"services/incrementCounter",data:"type="+type+"&id="+id+"&lang="+lang});};JsZetaUtils.MinutoMinuto={};JsZetaUtils.MinutoMinuto.infrontpageList=[];JsZetaUtils.MinutoMinuto.InitTimerFronpage=function(tiempo,capa,datos,id){if($.inArray(id,JsZetaUtils.MinutoMinuto.InitTimerFronpage)<0){JsZetaUtils.MinutoMinuto.infrontpageList.push(id);JsZetaUtils.MinutoMinuto.actualizar(tiempo,capa,datos,id);}else{setTimeout("JsZetaUtils.MinutoMinuto.actualizar("+tiempo+",'"+capa+"','"+datos+"',"+id+")",tiempo);}};JsZetaUtils.MinutoMinuto.timer=function(tiempo,capa,datos,id){setTimeout("JsZetaUtils.MinutoMinuto.actualizar("+tiempo+",'"+capa+"','"+datos+"',"+id+")",tiempo);};JsZetaUtils.MinutoMinuto.actualizar=function(tiempo,capa,datos,id){if(jQuery.support.opacity){$("#"+capa).css("opacity","0.4");}$.ajax({type:"POST",url:JsZetaUtils.Paths.BasePathLocale+"minuto-a-minuto"+JsZetaUtils.HasFiles.hash(id)+datos,beforeSend:function(xhr){},success:function(data){$("#"+capa).replaceWith(data);if(jQuery.support.opacity){$("#"+capa).css("opacity","1");}JsZetaUtils.MinutoMinuto.timer(tiempo,capa,datos,id);},error:function(){if(jQuery.support.opacity){$("#"+capa).css("opacity","1");}JsZetaUtils.MinutoMinuto.timer(tiempo,capa,datos,id);}});};JsZetaUtils.MinutoMinuto.actualizarUno=function(tiempo,capa,datos,id,locale){if(jQuery.support.opacity){$("#"+capa).css("opacity","0.4");}JsZetaUtils.MinutoMinuto.UpdateTimeLineUno(id,locale,tiempo);$.ajax({type:"POST",url:JsZetaUtils.Paths.BasePathLocale+"minuto-a-minuto"+JsZetaUtils.HasFiles.hash(id)+datos,beforeSend:function(xhr){},success:function(data){$("#"+capa).replaceWith(data);if(jQuery.support.opacity){$("#"+capa).css("opacity","1");}},error:function(){if(jQuery.support.opacity){$("#"+capa).css("opacity","1");}}});};JsZetaUtils.MinutoMinuto.Data=function(id){$("div[id^=event_data_]").css("display","none");$("div[id=event_data_"+id+"]").css("display","inline");$("li[id^=event_li_]").removeClass("active");$("li[id^=event_li_"+id+"]").addClass("active");};JsZetaUtils.MinutoMinuto.UpdateTimeLine=function(id,locale,tiempo){JsZetaUtils.MinutoMinuto.UpdateTimeLineUno(id,locale);setTimeout("JsZetaUtils.MinutoMinuto.UpdateTimeLine("+id+",'"+locale+"',"+tiempo+")",tiempo);};JsZetaUtils.MinutoMinuto.UpdateTimeLineUno=function(id,locale){var so=new SWFObject("/swf/minut/timeline.swf","flashcontent",634,52,"9");so.addParam("allowScriptAccess","always");so.addVariable("url","/"+locale+"/minuto-a-minuto/data/timeline/"+id+".xml?nocache="+JsZetaUtils.timestamp());so.write("timeline");};JsZetaUtils.MinutoMinuto.Pest=function(pestname){if(!$("#pest_li_"+pestname).hasClass("active")){switch(pestname){case"minut":$("#pest_li_ali").removeClass("active");$("#pest_li_dati").removeClass("active");$("#pest_li_minut").addClass("active");$("#pest_data_ali").hide();$("#pest_data_dati").hide();$("#pest_data_minut").show();break;case"ali":$("#pest_li_minut").removeClass("active");$("#pest_li_dati").removeClass("active");$("#pest_li_ali").addClass("active");$("#pest_data_minut").hide();$("#pest_data_dati").hide();$("#pest_data_ali").show();break;case"dati":$("#pest_li_ali").removeClass("active");$("#pest_li_minut").removeClass("active");$("#pest_li_dati").addClass("active");$("#pest_data_ali").hide();$("#pest_data_minut").hide();$("#pest_data_dati").show();break;}}};JsZetaUtils.MinutoMinuto.ChangeList=function(contenedor){toLoad="FI_"+$("#s_competicion").val()+$("#s_temporada").val()+".inc";$.ajax({type:"GET",url:toLoad,beforeSend:function(xhr){},success:function(data){$("#"+contenedor).replaceWith(data);},error:function(){$("#"+contenedor).replaceWith("<div id='"+contenedor+"'>No hay partidos para los criterios indicados.</div>");}});};JsZetaUtils.MinutoMinuto.ChangeSport=function(sport,lang){$.ajax({type:"GET",url:"/"+lang+"/minuto-a-minuto/listado/combos/"+sport+"/"+$("#deporte").val()+".inc",success:function(data){$("#competicion option").remove();$("#competicion").append(data);JsZetaUtils.MinutoMinuto.ChangeCompetition(sport,lang);},error:function(){}});};JsZetaUtils.MinutoMinuto.ChangeCompetition=function(sport,lang){$.ajax({type:"GET",url:"/"+lang+"/minuto-a-minuto/listado/combos/"+sport+"/"+$("#deporte").val()+"/"+$("#competicion").val()+".inc",success:function(data){$("#temporada option").remove();$("#temporada").append(data);JsZetaUtils.MinutoMinuto.ChangeSeason(lang);},error:function(){}});};JsZetaUtils.MinutoMinuto.ChangeSeason=function(lang){$.ajax({type:"GET",url:"/"+lang+"/minuto-a-minuto/listado/"+$("#deporte").val()+"/"+$("#competicion").val()+"/"+$("#temporada").val()+"/match-list-1.inc",success:function(data){$("#partidos").replaceWith(data);},error:function(){$("#partidos").replaceWith("<div id='partidos'  class='partidos'>No hay información para los criterios indicados.</div>");}});};JsZetaUtils.News={};JsZetaUtils.News.topview={cfg:{container_id:"topview_lomas",path:"top/noticias/leido/",name:"topviewed_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.topview_thumbs={cfg:{container_id:"topview_lomas",path:"top/noticias/leido/",name:"topviewed_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.topvoted={cfg:{container_id:"topvoted_lomas",path:"top/noticias/valorado/",name:"topvoted_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.topvoted_thumbs={cfg:{container_id:"topvoted_lomas",path:"top/noticias/valorado/",name:"topvoted_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.topsent={cfg:{container_id:"topsent_lomas",path:"top/noticias/enviado/",name:"topsent_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.topsent_thumbs={cfg:{container_id:"topsent_lomas",path:"top/noticias/enviado/",name:"topsent_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.topcommented={cfg:{container_id:"topcommented_lomas",path:"top/noticias/comentado/",name:"topcommented_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.topcommented_thumbs={cfg:{container_id:"topcommented_lomas",path:"top/noticias/comentado/",name:"topcommented_thumbs_",ext:".inc"},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+cfg.name+time+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.News.BySection2={cfg:{news_by_section_selector:"news_by_section2_"},pages:{},updatePage:function(direction,numNews,section,cfg){if(numNews>1){var actualNew=JsZetaUtils.News.BySection2.pages[section];var newToShow=1;if(actualNew==null){actualNew=1;}if(direction=="prev"){if(actualNew>1){newToShow=actualNew-1;}else{newToShow=numNews;}}if(direction=="next"){if(actualNew<numNews){newToShow=actualNew+1;}else{newToShow=1;}}JsZetaUtils.News.BySection2.pages[section]=newToShow;$("#"+cfg.news_by_section_selector+section+"_"+actualNew).hide();$("#"+cfg.news_by_section_selector+section+"_"+newToShow).show();}}};JsZetaUtils.Humor={cfg:{container_id:"topHumor",path:"commons/humor/",ext:".inc"},updateInc:function(cfg,name){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+name+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"humor");},updateTop:function(id_list,container_id,inc_path){JsZetaUtils.ReplaceDOMElement(container_id,inc_path,"humor");$("#vignette_list_humor ul li").removeClass("active");$("#"+id_list).addClass("active");}};JsZetaUtils.Humor.topview={cfg:{container_id:"lista_vinetas",path:"commons/humor/",name:"topview_humor",ext:".inc"},updateInc:function(incNum,cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+time+"/"+cfg.name+incNum+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+time+"/"+cfg.name+"1"+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.Humor.topvoted={cfg:{container_id:"lista_vinetas",path:"commons/humor/",name:"topvoted_humor",ext:".inc"},updateInc:function(incNum,cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+time+"/"+cfg.name+incNum+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");},updateTime:function(cfg,time){var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+time+"/"+cfg.name+"1"+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"tabs");}};JsZetaUtils.Polls={};JsZetaUtils.Polls.topvoted={cfg:{container_id:"topvoted_polls",path:"commons/polls/",name:"topvoted_polls_",ext:".inc"},update:function(period){var cfg=JsZetaUtils.Polls.topvoted.cfg;var inc_path=JsZetaUtils.Paths.BasePathLocale+cfg.path+"/"+cfg.name+period+cfg.ext;JsZetaUtils.ReplaceDOMElement(cfg.container_id,inc_path,"encuestas");}};JsZetaUtils.RecordEvent=function(eventType,refContentLocale,refContentType,refContentId){var url=window.document.location.href;if(!JsZetaUtils.Cookies.areEnabled()){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getUser"),dataType:"xml",success:function(xml){$(xml).find("user").each(function(){var userId=$(this).attr("id");JsZetaUtils.doRecordEvent(eventType,refContentLocale,refContentType,refContentId,userId,url);});},error:function(xml){JsZetaUtils.doRecordEvent(eventType,refContentLocale,refContentType,refContentId,-1,url);}});}else{var userEncCookie=JsZetaUtils.getCookie("userInfo");if(userEncCookie.length>2){if(userEncCookie.charAt(0)=='"'){userEncCookie=userEncCookie.substring(1,userEncCookie.length-1);}dojo.require("dojox.encoding.crypto.Blowfish");var userCookie=dojox.encoding.crypto.Blowfish.decrypt(userEncCookie,"abcdefg");var userCookieObj=eval("["+userCookie+"]");var userId=userCookieObj[0].id;JsZetaUtils.doRecordEvent(eventType,refContentLocale,refContentType,refContentId,userId,url);}else{JsZetaUtils.doRecordEvent(eventType,refContentLocale,refContentType,refContentId,-1,url);}}};JsZetaUtils.doRecordEvent=function(eventType,refContentLocale,refContentType,refContentId,userId,url){var userIdParam="";if(userId!=-1){userIdParam="&userId="+userId;}$.ajax({type:"POST",url:JsZetaUtils.StatsPath+"services/recordEvent",data:"eventType="+eventType+"&refContentLocale="+refContentLocale+"&refContentType="+refContentType+"&refContentId="+refContentId+userIdParam+"&DOMAIN="+JsZetaUtils.Domain+"&url="+url});};JsZetaUtils.Searcher={flag:"false",flagHem:"false",reset:function(){if(JsZetaUtils.Searcher.flag=="false"){$("#q").val("");JsZetaUtils.Searcher.flag="true";}},resetHem:function(){if(JsZetaUtils.Searcher.flagHem=="false"){$("#q_hem").val("");JsZetaUtils.Searcher.flagHem="true";}}};var pvar={cid:"es-grupozeta",content:"0",server:"secure-uk"};var trac=null;JsZetaUtils.excuteNielsen=function(eventype){$(document).ready(function(){});};function loadTrac(){if(trac==null){trac=nol_t(pvar);trac.record().post();}}JsZetaUtils.SelectEdition=function(type,currentEd,previousEd,nextEd,day,month,year){var dayIdx;if(type=="prev"){var prevDay;var prevMonth;var prevYear;if(jQuery.inArray(day,currentEd)!=-1){for(i=jQuery.inArray(day,currentEd);i<currentEd.length;i++){if(currentEd[i]==day){dayIdx=i;i=currentEd.length+1;}}if(dayIdx==(0)){if(previousEd.length>0){prevDay=previousEd[previousEd.length-1];}else{prevDay=1;}if(month>1){prevMonth=month-1;prevYear=year;}else{prevMonth=12;prevYear=year-1;}}else{prevDay=currentEd[dayIdx-1];prevMonth=month;prevYear=year;}document.location.href=JsZetaUtils.Paths.BasePath+"es/edicion_impresa/edicion_impresa-"+prevYear+"-"+prevMonth+"-"+prevDay+".shtml";}}else{var nextDay;var nextMonth;var nextYear;if(jQuery.inArray(day,currentEd)!=-1){for(i=jQuery.inArray(day,currentEd);i<currentEd.length;i++){if(currentEd[i]==day){dayIdx=i;}}if(dayIdx==(currentEd.length-1)){if(nextEd.length>0){nextDay=nextEd[0];}else{nextDay=1;}if(month<12){nextMonth=month+1;nextYear=year;}else{nextMonth=1;nextYear=year+1;}}else{nextDay=currentEd[dayIdx+1];nextMonth=month;nextYear=year;}document.location.href=JsZetaUtils.Paths.BasePath+"es/edicion_impresa/edicion_impresa-"+nextYear+"-"+nextMonth+"-"+nextDay+".shtml";}}};JsZetaUtils.SelectEditionMonth=function(type,currentEd,previousEd,nextEd,day,month,year){var dayIdx;if(type=="prev"){var prevDay;var prevMonth;var prevYear;if(previousEd.length>0){prevDay=previousEd[0];}else{prevDay=1;}if(month>1){prevMonth=month-1;prevYear=year;}else{prevMonth=12;prevYear=year-1;}document.location.href=JsZetaUtils.Paths.BasePath+"es/edicion_impresa/edicion_impresa-"+prevYear+"-"+prevMonth+"-"+prevDay+".shtml";}else{var nextDay;var nextMonth;var nextYear;if(nextEd.length>0){nextDay=nextEd[0];}else{nextDay=1;}if(month<12){nextMonth=month+1;nextYear=year;}else{nextMonth=1;nextYear=year+1;}document.location.href=JsZetaUtils.Paths.BasePath+"es/edicion_impresa/edicion_impresa-"+nextYear+"-"+nextMonth+"-"+nextDay+".shtml";}};JsZetaUtils.PubliIds=["adv_bottom_1","adv_bottom_2","adv_frame_1","adv_frame_2","adv_middle","adv_middle_1","adv_middle_2","adv_middle_3","adv_left_1","adv_left_3","adv_position_1","adv_position_3","adv_position_4","adv_right_1","adv_right_1_news","adv_top","adv_top_right","adv_top_1","adv_top_3","adv_google","adv_bottom_left","adv_bottom_right","adv_top_left","adv_right_2"];JsZetaUtils.SocialIds=["fb_recommendations","fb_likebox","fb_activity"];JsZetaUtils.LoadPubli=function(){for(i=0;i<JsZetaUtils.PubliIds.length;i++){var publi="#"+JsZetaUtils.PubliIds[i];if($(publi+"_init").length>0){$(publi+" script").remove();$(publi+"_init").replaceWith($(publi));$(publi).css("display","block");}}};JsZetaUtils.LoadSocial=function(){for(i=0;i<JsZetaUtils.SocialIds.length;i++){var social="#"+JsZetaUtils.SocialIds[i];if($(social+"_init").length>0){$(social+" script").remove();$(social+"_init").replaceWith($(social));$(social).css("display","block");}}};$(document).ready(function(){JsZetaUtils.LoadSocial();});JsZetaUtilsExt={};JsZetaUtilsExt.Days={es:["Lunes","Martes","Miércoles","Jueves","Viernes","Sabado","Domingo"],ca:["Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte","Diumenge"]};JsZetaUtilsExt.Months={es:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","setiembre","octubre","noviembre","diciembre"],ca:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"]};JsZetaUtilsExt.Of={es:["de"],ca:["de"]};JsZetaUtilsExt.offsetHoursMenu=3;JsZetaUtilsExt.setDateMenu=function(lang){var actualDate=new Date();actualDate.setHours(actualDate.getHours()-JsZetaUtilsExt.offsetHoursMenu);var diaNumExt=actualDate.getDate();var diaMenuExt=JsZetaUtilsExt.Days[lang][actualDate.getDay()-1];var mesMenuExt=JsZetaUtilsExt.Months[lang][actualDate.getMonth()];var anioMenuExt=actualDate.getFullYear();$("#date_head_extern").append("<span>"+diaMenuExt+"</span>, "+diaNumExt+" "+JsZetaUtilsExt.Of[lang][0]+" "+mesMenuExt+" "+JsZetaUtilsExt.Of[lang][0]+" "+anioMenuExt+" ");};JsZetaUtilsExt.Searcher={flag:"false",flagHem:"false",reset:function(){if(JsZetaUtilsExt.Searcher.flag=="false"){$("#q").val("");JsZetaUtilsExt.Searcher.flag="true";}},resetHem:function(){if(JsZetaUtilsExt.Searcher.flagHem=="false"){$("#q_hem").val("");JsZetaUtilsExt.Searcher.flagHem="true";}}};JsZetaUser={};I18n.es.user_welcome="Bienvenido ";I18n.es.user_view_data="Ver datos";I18n.es.user_close_session="Cerrar sesión";I18n.ca.user_welcome="Benvingut ";I18n.ca.user_view_data="Veure dades";I18n.ca.user_close_session="Tancar sessió";JsZetaUser.SULastURL=function(){this.actual_pathname=document.location.pathname;};JsZetaUser.SULastURL.prototype.startsWith=function(s){return this.actual_pathname.indexOf(s)==0;};JsZetaUser.SULastURL.prototype.getLastURL=function(){return this.actual_pathname;};JsZetaUser.SULastURL.SUSetLastURL=function(locale){var lastURL=new JsZetaUser.SULastURL();var load_pf_login=function(){document.location.href=JsZetaUtils.SuPath+"registro/registro_login.jsp?lang="+locale+"&ts="+JsZetaUtils.timestamp();};if(!lastURL.startsWith(JsZetaUtils.SuPath)){$.get(JsZetaUtils.SuPath+"setLastUrl.jsp",{beforeLoginPathName:lastURL.getLastURL()},load_pf_login);}else{load_pf_login();}};JsZetaUser.SULastURL.SUSetLastURLMinute=function(locale){var lastURL=new JsZetaUser.SULastURL();var load_pf_login=function(){document.location.href=JsZetaUtils.SuPath+"registro/registro_login_minute.jsp?lang="+locale+"&ts="+JsZetaUtils.timestamp();};if(!lastURL.startsWith(JsZetaUtils.SuPath)){$.get(JsZetaUtils.SuPath+"setLastUrl.jsp",{beforeLoginPathName:lastURL.getLastURL()},load_pf_login);}else{load_pf_login();}};JsZetaUser.Profile={New:function(locale){document.location.href=JsZetaUtils.SuPath+"commands/addUserPart0?lang="+locale;},Edit:function(locale){document.location.href=JsZetaUtils.SuPath+"commands/modifyUserPart0?lang="+locale;},Login:function(locale){JsZetaUser.SULastURL.SUSetLastURL(locale);},LoginMinute:function(locale){JsZetaUser.SULastURL.SUSetLastURLMinute(locale);},RecPwd:function(locale){document.location.href=JsZetaUtils.SuPath+"registro/registro_rec_pwd.jsp?lang="+locale;},UserDown:function(locale){document.location.href=JsZetaUtils.SuPath+"registro/registro_baja.jsp?lang="+locale;},UserRecUser:function(locale){document.location.href=JsZetaUtils.SuPath+"registro/registro_rec_user.jsp?lang="+locale;},UserRecUserOpc:function(locale){if($("input:radio[name=RECUSEROPTIONID]:checked").val()=="recuser_si"){document.location.href=JsZetaUtils.SuPath+"registro/registro_rec_user_confirm.jsp?lang="+locale;}else{JsZetaUser.Profile.New(locale);}},GetUser:function(locale){if(!JsZetaUtils.Cookies.areEnabled()){JsZetaUser.Profile.getUserSU(locale);}else{var userEncCookie=JsZetaUtils.getCookie("userInfo");if(userEncCookie.length>2){if(userEncCookie.charAt(0)=='"'){userEncCookie=userEncCookie.substring(1,userEncCookie.length-1);}dojo.require("dojox.encoding.crypto.Blowfish");var userCookie=dojox.encoding.crypto.Blowfish.decrypt(userEncCookie,"abcdefg");var userCookieObj=eval("["+userCookie+"]");$("span#userLoggedName").text(I18n[locale].user_welcome+userCookieObj[0].name);$("span#userLoggedName").css("cursor","pointer");$("#userLogged > div.user > a > span").text(I18n[locale].user_close_session);$("#userUnlogged").remove();$("#userLogged").show();}}},getUserSU:function(locale){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getUser"),dataType:"xml",success:function(xml){$(xml).find("nombre").each(function(){$("span#userLoggedName").text(I18n[locale].user_welcome+$(this).text());$("span#userLoggedName").css("cursor","pointer");$("#userLogged > div.user > a > span").text(I18n[locale].user_close_session);$("#userUnlogged").remove();$("#userLogged").show();});}});},GetUserMinute:function(locale){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getUserMinuto"),dataType:"xml",success:function(xml){$(xml).find("nombre").each(function(){$("span#userLoggedName").text(I18n[locale].user_welcome+$(this).text());$("span#userLoggedName").css("cursor","pointer");$("#userLogged > div.user > a > span").text(I18n[locale].user_close_session);$("#userUnlogged").remove();$("#userLogged").show();});}});},Logout:function(){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/logout"),success:function(){var actual_pathname=document.location.pathname;var index_su=actual_pathname.indexOf(JsZetaUtils.SuPath);if(index_su==0){var lang=JsZetaUtils.getParameterUrl("lang");lang=lang!=0?lang:"es";document.location.href=document.location.href.substring(0,document.location.href.length-(actual_pathname.length+document.location.search.length-1))+lang+"/";}else{window.location.reload();}}});}};I18n.es.register_form_nick_oblig="El campo Usuario es obligatorio";I18n.es.register_form_name_oblig="El campo Nombre es obligatorio";I18n.es.register_form_surname_oblig="El campo Apellidos es obligatorio";I18n.es.register_form_secansw_oblig="El campo Respuesta es obligatorio";I18n.es.register_form_mail_no_valido="e-Mail no válido";I18n.es.register_form_password_length="La contraseña debe tener un mínimo de 6 caracteres y un máximo de 10";I18n.es.register_form_password_match="La contraseña no coincide";I18n.es.register_form_captcha_oblig="Debe introducir el código de seguridad";I18n.es.register_form_captcha_number="El código de seguridad debe ser numérico";I18n.es.register_form_captcha_length="El código de seguridad debe tener 7 caracteres";I18n.es.register_form_accept_cond="Debes aceptar las condiciones";I18n.es.register_form_avatar_cond="El formato de la imagen debe ser jpg, gif o png";I18n.ca.register_form_nick_oblig="El camp Usuari és obligatori";I18n.ca.register_form_name_oblig="El camp Nom és obligatori";I18n.ca.register_form_surname_oblig="El camp Cognoms és obligatori";I18n.ca.register_form_secansw_oblig="El camp Resposta és obligatori";I18n.ca.register_form_mail_no_valido="e-mail no vàlid";I18n.ca.register_form_password_length="La contrasenya ha de tenir un mínim de 6 caràcters i un màxim de 10";I18n.ca.register_form_password_match="La contrasenya no coincideix";I18n.ca.register_form_captcha_oblig="Cal introduir el codi de seguretat";I18n.ca.register_form_captcha_number="El codi de seguretat ha de ser numèric";I18n.ca.register_form_captcha_length="El codi de seguretat ha de tenir 7 caràcters";I18n.ca.register_form_accept_cond="Heu d'acceptar les condicions";I18n.ca.register_form_avatar_cond="El format de la imatge ha de ser jpg, gif o png";JsZetaUser.validators={validaCmpOblig:function(cmp){if(cmp.length<1){return false;}return true;},validaCmpNumber:function(cmp){if(!/^([0-9])*$/.test(cmp)){return false;}return true;},validaNick:function(nick,locale){if(!JsZetaUser.validators.validaCmpOblig(nick)){JsZetaUtils.Errors.showError(I18n[locale].register_form_nick_oblig);return false;}return true;},validaName:function(name,locale){if(!JsZetaUser.validators.validaCmpOblig(name)){JsZetaUtils.Errors.showError(I18n[locale].register_form_name_oblig);return false;}return true;},validaSurname:function(surname,locale){if(!JsZetaUser.validators.validaCmpOblig(surname)){JsZetaUtils.Errors.showError(I18n[locale].register_form_surname_oblig);return false;}return true;},validaMail:function(mail,locale){if(mail.lastIndexOf(".")<=2||mail.indexOf("@")<=0){JsZetaUtils.Errors.showError(I18n[locale].register_form_mail_no_valido);return false;}return true;},validaPwd:function(locale,pwd,pwd2){if(!(pwd.length>=6&&pwd.length<=10)){JsZetaUtils.Errors.showError(I18n[locale].register_form_password_length);return false;}if(arguments.length>2){if(pwd!=pwd2){JsZetaUtils.Errors.showError(I18n[locale].register_form_password_match);return false;}}return true;},validaCaptcha:function(code,locale){if(!JsZetaUser.validators.validaCmpOblig(code)){JsZetaUtils.Errors.showError(I18n[locale].register_form_captcha_oblig);return false;}if(!JsZetaUser.validators.validaCmpNumber(code)){JsZetaUtils.Errors.showError(I18n[locale].register_form_captcha_number);return false;}if(code.length!=7){JsZetaUtils.Errors.showError(I18n[locale].register_form_captcha_length);return false;}return true;},validaCond:function(cond,locale){if(!cond){JsZetaUtils.Errors.showError(I18n[locale].register_form_accept_cond);return false;}return true;},validaAvatar:function(avatar,locale){if(avatar!=""){var ext=avatar.substring(avatar.length-3).toLowerCase();if(ext!="jpg"&&ext!="gif"&&ext!="png"){JsZetaUtils.Errors.showError(I18n[locale].register_form_avatar_cond);return false;}}return true;},validaSecAnsw:function(secansw,locale){if(!JsZetaUser.validators.validaCmpOblig(secansw)){JsZetaUtils.Errors.showError(I18n[locale].register_form_secansw_oblig);return false;}return true;},registerForm1:function(locale,form){var vO=JsZetaUser.validators;var valid=vO.validaNick($("#NICK").val(),locale)&&vO.validaMail($("#EMAIL").val(),locale)&&vO.validaName($("#NOMBRE").val(),locale)&&vO.validaSurname($("#APELLIDOS").val(),locale)&&vO.validaPwd(locale,$("#PWD").val(),$("#PWD2").val())&&vO.validaAvatar($("#AVATAR").val(),locale)&&vO.validaSecAnsw($("#SECURITYANSWER").val(),locale);if(valid){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getPortalUser"),data:{MAIL:$("#EMAIL").val()},success:function(xml){$(xml).find("boolean").each(function(){var isUserOnlyEP=false;isUserOnlyEP=$(this).text()=="true";if(isUserOnlyEP){JsZetaUser.Profile.UserRecUser(locale);}else{form.submit();}});},error:function(xml){form.submit();}});}},registerForm2:function(locale,form){var vO=JsZetaUser.validators;var valid=vO.validaCaptcha($("#CAPTCHA_RESPONSE").val(),locale)&&vO.validaCond($("#CONDLEG").is(":checked"),locale);if(valid){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/validateCaptcha"),data:{CAPTCHA_RESPONSE:$("#CAPTCHA_RESPONSE").val()},success:function(){form.submit();},error:function(xml){$(xml.responseXML).find("message").each(function(){JsZetaUtils.Messages.showMsg($(this).text());});}});}},registerFormMod:function(locale,form){var vO=JsZetaUser.validators;var valid=vO.validaNick($("#NICK").val(),locale)&&vO.validaMail($("#EMAIL").val(),locale)&&vO.validaName($("#NOMBRE").val(),locale)&&vO.validaSurname($("#APELLIDOS").val(),locale)&&vO.validaPwd(locale,$("#PWD").val(),$("#PWD2").val())&&vO.validaAvatar($("#AVATAR").val(),locale)&&vO.validaSecAnsw($("#SECURITYANSWER").val(),locale);if(valid){form.submit();}},loginForm:function(locale,form){var vO=JsZetaUser.validators;var valid=vO.validaMail($("#LOGIN").val(),locale)&&vO.validaPwd(locale,$("#PWD").val());if(valid){$.ajax({type:"GET",url:JsZetaUtils.urlNoCache(JsZetaUtils.SuPath+"services/getPortalUser"),data:{MAIL:$("#LOGIN").val()},success:function(xml){$(xml).find("boolean").each(function(){var isUserOnlyEP=false;isUserOnlyEP=$(this).text()=="true";if(isUserOnlyEP){JsZetaUser.Profile.UserRecUser(locale);}else{form.submit();}});},error:function(xml){form.submit();}});}},recUserForm:function(locale,form){var vO=JsZetaUser.validators;var valid=vO.validaMail($("#LOGIN").val(),locale)&&vO.validaPwd(locale,$("#PWD").val());if(valid){form.submit();}},recPwdForm:function(locale,form){var vO=JsZetaUser.validators;var valid=vO.validaMail($("#LOGIN").val(),locale);if(valid){form.submit();}}};JsZetaUser.SpainSwitcher={switcher:function(){var countryBox=document.getElementById("reg_11");var country=countryBox.options[countryBox.selectedIndex].value;if(country=="PAIS_67"){document.getElementById("hideShowCountry").style.display="block";}else{document.getElementById("hideShowCountry").style.display="none";}}};

