var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.charAt(b.indexOf(".")-1))>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.charAt(aj.indexOf(".")-1))}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||(al.body==null||al.getElementsByTagName("body").length==0))return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,"?",Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();

if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac){
	sIFR.setup();
};


if(typeof sIFR=="function")(function(){var j=document;var h=j.documentElement;sIFR.removeDecoyClasses=function(){function a(b){if(b&&b.className!=null)b.className=b.className.replace(/\bsIFR-hasFlash\b/,"")}return function(){a(h);a(j.getElementsByTagName("body")[0])}}();sIFR.preferenceManager={storage:{sCookieId:"sifr",set:function(a){var b=new Date();b.setFullYear(b.getFullYear()+3);j.cookie=[this.sCookieId,"=",a,";expires=",b.toGMTString(),";path=/"].join("")},get:function(){var a=j.cookie.match(new RegExp(";?"+this.sCookieId+"=([^;]+);?"));if(a!=null&&a[1]=="false")return false;else return true},reset:function(){var a=new Date();a.setFullYear(a.getFullYear()-1);j.cookie=[this.sCookieId,"=true;expires=",a.toGMTString(),";path=/"].join("")}},disable:function(){this.storage.set(false)},enable:function(){this.storage.set(true)},test:function(){return this.storage.get()}};if(sIFR.preferenceManager.test()==false){sIFR.bIsDisabled=true;sIFR.removeDecoyClasses()}sIFR.rollback=function(){function a(b){var c,d,e,f,g,h;var l=parseSelector(b);var i=l.length-1;var m=false;while(i>=0){c=l[i];l.length--;d=c.parentNode;if(c.getAttribute("sifr")=="true"){h=0;while(h<d.childNodes.length){c=d.childNodes[h];if(c.className=="sIFR-alternate"){e=c;h++;continue}d.removeChild(c)}if(e!=null){f=e.firstChild;while(f!=null){g=f.nextSibling;d.appendChild(e.removeChild(f));f=g}d.removeChild(e)}if(!sIFR.UA.bIsXML&&sIFR.UA.bUseInnerHTMLHack)d.innerHTML+="";d.className=d.className.replace(/\bsIFR\-replaced\b/,"")};m=true;i--}return m}return function(k){named.extract(arguments,{sSelector:function(a){k=a}});if(k==null)k="";else k+=">";sIFR.removeDecoyClasses();sIFR.bHideBrowserText=false;if(a(k+"embed")==false)a(k+"object")}}()})()

function getCookie(name){var dc = document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);
if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else{begin+=2;}
var end=document.cookie.indexOf(";",begin);if(end==-1){end=dc.length;}
return unescape(dc.substring(begin+prefix.length,end)).split("\n");} 

function setCookie (name, value, expires, path) {
   var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "");
   document.cookie = curCookie;
}

usuario = getCookie("eltiempopuntocom");
//Declaro las variables
if(usuario != undefined)
{
  var loginUsuario = usuario[0];
  var nombreUsuario = usuario[1];
  var apellidosUsuario = usuario[2];
  /*Se comenta para detectar donde se utiliza esta variable y se asigna un id inexistente
  var idUsuario = usuario[3];*/
  var idUsuario = 999999999999;
  var emailUsuario = usuario[4];
  var sexoUsuario = usuario[6];
  var paisUsuario = usuario[7];
  var edadUsuario = usuario[8];
  var profesionUsuario = usuario[9];
}
else
{
  var loginUsuario = "";
  var nombreUsuario = "";
  var apellidosUsuario = "";
  var idUsuario = "";
  var emailUsuario = "";
  var sexoUsuario = "";
  var paisUsuario = "";
  var edadUsuario = "";
  var profesionUsuario = "";
}

function salirRegistro() {
   var expires = 0;
   var path = '/';
   var domain = '';
   var domain = '.eltiempo.com';
   //var curCookie = 'eltiempopuntocom' + "=" + escape('') + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "")+((domain) ? "; domain=" + domain: "");
   //document.cookie = curCookie;
   if (document.location.href.indexOf("zonadeusuario") >= 0)
       document.location = "/";
   else if(document.location.href.indexOf("registro") >= 0)
       document.location = "/";
   else if (document.location.href.indexOf('#') >= 0) // Se mira si tiene un ancla y se quita
       document.location = document.location.href.substring(0,document.location.href.indexOf('#'));
   else
       document.location = document.location;       
}

function salirRegistroSesion() {
   incluirObjeto("CERRAR_SESION",salirRegistro);
   //salirRegistro();
}

/**FUNCIONES EPLANNING**/

 

var inIframe=false;var siW=self.innerWidth;var siH=self.innerHeight;var dE=document.documentElement;var dB=document.body;

var sw=(siW?siW:(dE && dE.clientWidth)?dE.clientWidth:dB?dB.clientWidth:"");

var sh=(siH?siH:(dE && dE.clientHeight)?dE.clientWidth:dB?dB.clientHeight:"");

var wh=(sw && sh) ? (sw.toString(16) + "x" + sh.toString(16)) : "";

var eplRnd=(new String(Math.random())).substring(2,8) + (((new Date()).getTime()) & 262143);

var ua=navigator.userAgent.toLowerCase();var av=navigator.appVersion.toLowerCase();

var eplB=new Object();eplB.is_mac=(ua.indexOf("mac")!=-1);

eplB.is_win=(!eplB.is_mac && ((ua.indexOf("win")!=-1)||(ua.indexOf("16bit")!=-1)));

var ieP=av.indexOf('msie');var ffP=ua.indexOf("firefox");eplB.is_o=(ua.indexOf("opera")!=-1);

eplB.is_ie=(ieP!=-1 && eplB.is_win && !eplB.is_o);eplB.is_ff=(ffP!=-1);

if (eplB.is_ie) { eplB.minV=parseFloat(av.substring(ieP+5,av.indexOf(';',ieP)));

eplB.majV=parseInt(eplB.minV);}

if (eplB.is_ff) { if (ua.length>ffP+8) eplB.majV=parseInt(ua.substring(ffP+8));

if (ua.length>ffP+10) eplB.minV=parseInt(ua.substring(ffP+10));}

eplB.ffOk=(eplB.is_ff&&((eplB.majV>=1&&eplB.minV>=5)||(eplB.majV>=2)));

eplB.ieOk=(eplB.is_ie&&eplB.minV>=5);var eplFV=0;var nmT=navigator.mimeTypes;

var swF='application/x-shockwave-flash';var fP=(nmT && nmT[swF])?nmT[swF].enabledPlugin:0;

var fvT;if ( fP ) { var nP=navigator.plugins;var sf="Shockwave Flash";

    if (nP[sf]!=null) fvT=nP[sf].description;

} else if (ua && ua.indexOf("MSIE")>=0 && (av.indexOf("Win")!=-1)) {

    var axo;var e;try {

        axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");

     axo.AllowScriptAccess="always";fvT=axo.GetVariable("$version");

    } catch (e) {}

} if (fvT) { var fvW=fvT.split(" ");for (var i=0;i<fvW.length;++i) {

     if (isNaN(parseInt(fvW[i]))) continue;eplFV=fvW[i];}

}

function eplAD(spaceID) {
//   return;   
   if (!spaceID || spaceID=='') {
      return;
   }
   var keywords="&kw1=&kw2=&kw3=&kw4=&kw5=&kw6=&kw7=&kw8=&kw9=&kw10=&kw11=&kw12=&kw13=&kw14=&kw15";

    var adU='http://ads.us.e-planning.net/eb/3/c1e/'+spaceID+'?o=j&fv='+eplFV+'&rnd='+eplRnd+keywords;

    var iDT='<html><head><title>Ad</title><LINK rel="stylesheet" type="text/css"  href="http://www.eltiempo.com/css/produccion/publicidad.css" /></head><body id="'+spaceID+'" leftmargin="0" topmargin="0">';

    //var iDT='<html><head><title>Ad</title></head><body id="'+spaceID+'" leftmargin="0" topmargin="0">';

    iDT+='<div id="eplParentContainer' + spaceID + '"></div><scr'+'ipt type="text/javascript">var inIframe=true;</scr';

    iDT+='ipt> <scr'+'ipt type="text/javascript" src="'+adU+'"></scr';

    iDT+='ipt> <scr'+'ipt>setTimeout("document.close()", 8000);</scr'+'ipt></body></html>' 

    if(eplB.ieOk){document.write('<iframe id="'+spaceID+'" src="about:blank" width="1" height="0" frameborder="0" scrolling="no"></iframe>');

     document.frames[spaceID].document.write(iDT);

    } else if (eplB.ffOk) { document.write('<iframe id="'+spaceID+'" src="about:blank" width="1" height="0" frameborder="0" scrolling="no"></iframe>');

        var i=document.getElementById(spaceID);if (i!=null) i.contentDocument.write(iDT);

    } else { document.write('<scr'+'ipt type="text/javascript" src="'+adU+'"></scr'+'ipt>');}

}

function tabPauta(idTab)
 {
   if ($("#tabHome").hasClass("activo-tabs"))
     { 
	   $("#pautaTabs").slideUp("slow");
	   $("#tabHome").removeClass("activo-tabs");
	   $("#tabHome").addClass("no-activo");
	   
	 }
	 else{	     
	    $("#pautaTabs").slideDown("slow");
		$("#tabHome").removeClass("no-activo");
		$("#tabHome").addClass("activo-tabs");
	    
	 }
 }

function AbrirCerrarNube()
{
    if ($("#nube").hasClass("vinculo-especial"))
     { 
	   $("#palabras-nube").slideDown("slow");
	   $("#nube").removeClass("vinculo-especial");
	   $("#nube").addClass("vinculo-especial-abierto");
	 }
	 else{	     
	    $("#palabras-nube").slideUp("slow");
	    $("#nube").removeClass("vinculo-especial-abierto");
		$("#nube").addClass("vinculo-especial");
      }
}
 
var arregloMedias = new Array(10);

function generarVideoJS(video, divHTML, tipoReproduccion, ancho, alto,urlImagen) {
   
   
   if (tipoReproduccion == 'audio' && !ancho && !alto) {
        alto = 20;
        altoVideo = 20;
    }else {
        altoVideo = alto + 20;
	}
	var playlistArray;
    playlistArray = new Array();
    playlistArray[0] = "";
    playlistArray[1] = "";
    if (tipoReproduccion == 'audio')
       var s3 = new SWFObject("/reproductores/audio/mediaplayer.swf", tipoReproduccion + '_' + divHTML ,ancho,24,"7");    
    else
       var s3 = new SWFObject("/reproductores/mediaplayer.swf", tipoReproduccion + '_' + divHTML ,ancho,altoVideo,"7");
    if(tipoReproduccion == 'audio')   {
       s3.addParam("allowfullscreen","false");   
       
    }   
	s3.addParam("swLiveConnect","true");
	s3.addVariable("width",ancho);	
   	s3.addVariable("height",alto);
   	s3.addVariable("displaywidth" , ancho);
	s3.addVariable("displayheight" , alto);
	s3.addVariable("file", video);
	s3.addParam("wmode","transparent"); 
  	  
	if(tipoReproduccion == 'video'){
	  s3.addParam("allowfullscreen","true");
	  s3.addVariable("showdigits" , "total");
	  s3.addVariable("image" ,urlImagen);
	  s3.addVariable("searchbar" , "false");
	  s3.addVariable("showstop" , "false");
	  //s3.addVariable("type" , "video");
   }
	   
	s3.write(divHTML);
}

var fileRec;
var idDivRec;
var tipoRec;
var urlimgRec;

function cargarVariablesVideoJS (file_rec , reproductorVideoRel, video,url_imagen) {
    fileRec = file_rec;
    idDivRec = reproductorVideoRel;
    tipoRec = video;
    urlimgRec=url_imagen;    
}

var tituloPagina;
var seccionPrincipal;
var seccionSecundaria;

function generarPageViewVideo(swf) {
    tituloPagina = arregloMedias[swf][1];
    seccionPrincipal = arregloMedias[swf][2];
    seccionSecundaria = arregloMedias[swf][3];
    generarPageView(tituloPagina,seccionPrincipal,seccionSecundaria);
}


if(typeof sIFR == "function"){
   

// This is the preferred "named argument" syntax
	sIFR.replaceElement(named({sSelector:".seccion", sFlashSrc:"/css/produccion/lutz.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#000000", sHoverColor:"#000000", nPaddingTop:0, nPaddingBottom:0, sWmode:"transparent"}));
};


function iecompattest(){
	return(document.compatMode&&document.compatMode!="BackCompat")? document.documentElement : document.body
}

function iecompattestIframe(){
	return(parent.document.compatMode&&parent.document.compatMode!="BackCompat")? parent.document.documentElement : parent.document.body
}


function abrirLightboxIframe(windowID, borrarContenido, contenedorcampos){
	if(borrarContenido==1){
	          document.getElementById(contenedorcampos).innerHTML = divs_duplicado[windowID].innerHTML;
    }
    ponerVeloIframe();
	this.id=windowID
	barheight=parent.document.getElementById(this.id).offsetHeight
	var ns=(navigator.appName.indexOf("Netscape")!=-1)|| window.opera
	var d=parent.document
	function ml(id){
	    var d=parent.document;
		var el=d.getElementById(id);
		if(!persistclose || persistclose&&get_cookie("remainclosed")=="")
		    el.style.display="block";
		if(d.layers)
		    el.style=el;
		el.sP=function(x,y){this.style.left=x+"%";this.style.top=y+"px";}
		//el.sP=function(x,y){this.style.left="5%";this.style.top=y+"px";}
   		 //el.sP=function(x,y){this.style.left=getLeftLightboxIframe(el);this.style.top=y+"px";}
		 el.x=startX
		if(verticalpos=="fromtop")
		el.y=startY
		else{
			el.y=ns ? pageYOffset+innerHeight : iecompattest().scrollTop+iecompattest().clientHeight
			el.y-=startY}
		return el}
	window.stayTopLeft=function(){
		if(verticalpos=="fromtop"){
			var pY=ns ? parent.pageYOffset : iecompattestIframe().scrollTop
			ftlObj.y+=(pY+startY-ftlObj.y)/8}
		else{
			var pY=ns ? pageYOffset+innerHeight-barheight: iecompattestIframe().scrollTop+iecompattestIframe().clientHeight-barheight
			ftlObj.y+=(pY-startY-ftlObj.y)/8}
		ftlObj.sP(ftlObj.x,ftlObj.y)
		setTimeout("stayTopLeft()",10)}
	ftlObj=ml(this.id)
	stayTopLeft()
}
    
function pintarIframeEncuesta(id_encuesta){
  var urlencuesta='http://www.eltiempo.com/sondeos/admin/user-statistics.php?sid='+id_encuesta;
  parent.document.getElementById('iframeId').src=urlencuesta;

}



var divs_duplicado = new Array(10); 

function abrirLightbox(windowID, borrarContenido, contenedorcampos){
	if(borrarContenido==1){
	   document.getElementById(contenedorcampos).innerHTML = divs_duplicado[windowID].innerHTML;
    }
    
   	ponerVelo();
	this.id=windowID
	barheight=document.getElementById(this.id).offsetHeight
	var ns=(navigator.appName.indexOf("Netscape")!=-1)|| window.opera
	var d=document
	function ml(id){
		var el=d.getElementById(id)
		if(!persistclose || persistclose&&get_cookie("remainclosed")=="")
		el.style.display="block"
		if(d.layers)el.style=el
		el.sP=function(x,y){this.style.left=getLeftLightbox(el);this.style.top=y+"px";}
		el.x=startX
		if(verticalpos=="fromtop")
		el.y=startY
		else{
			el.y=ns ? pageYOffset+innerHeight : iecompattest().scrollTop+iecompattest().clientHeight
			el.y-=startY}
		return el}
	window.stayTopLeft=function(){
		if(verticalpos=="fromtop"){
			var pY=ns ? pageYOffset : iecompattest().scrollTop
			ftlObj.y+=(pY+startY-ftlObj.y)/8}
		else{
			var pY=ns ? pageYOffset+innerHeight-barheight: iecompattest().scrollTop+iecompattest().clientHeight-barheight
			ftlObj.y+=(pY-startY-ftlObj.y)/8}
		ftlObj.sP(ftlObj.x,ftlObj.y)
		setTimeout("stayTopLeft()",10)}
	ftlObj=ml(this.id)
	stayTopLeft()
}

function abrirLightboxcontac(windowID, borrarContenido, contenedorcampos, titulo){
	if(borrarContenido==1){	   	   	
        document.getElementById(contenedorcampos).innerHTML = divs_duplicado[windowID].innerHTML;       
    }     
   	ponerVelo();
	this.id=windowID
	
	document.getElementById("tipoContacto").innerHTML = titulo;
		
	barheight=document.getElementById(this.id).offsetHeight
	var ns=(navigator.appName.indexOf("Netscape")!=-1)|| window.opera
	var d=document
	function ml(id){
		var el=d.getElementById(id)
		if(!persistclose || persistclose&&get_cookie("remainclosed")=="")
		el.style.display="block"
		if(d.layers)el.style=el
		el.sP=function(x,y){this.style.left=x+"%";this.style.top=y+"px";}
		el.x=startX
		if(verticalpos=="fromtop")
		el.y=startY
		else{
			el.y=ns ? pageYOffset+innerHeight : iecompattest().scrollTop+iecompattest().clientHeight
			el.y-=startY}
		return el}
	window.stayTopLeft=function(){
		if(verticalpos=="fromtop"){
			var pY=ns ? pageYOffset : iecompattest().scrollTop
			ftlObj.y+=(pY+startY-ftlObj.y)/8}
		else{
			var pY=ns ? pageYOffset+innerHeight-barheight: iecompattest().scrollTop+iecompattest().clientHeight-barheight
			ftlObj.y+=(pY-startY-ftlObj.y)/8}
		ftlObj.sP(ftlObj.x,ftlObj.y)
		setTimeout("stayTopLeft()",10)}
	ftlObj=ml(this.id)
	stayTopLeft()
}

function abrirLightboxvotar(windowID, borrarContenido, contenedorcampos,otro){
	if(borrarContenido==1){	   	   	
        document.getElementById(contenedorcampos).innerHTML = divs_duplicado[windowID].innerHTML;       
    }    
  	ponerVelo();
	this.id=windowID
	if(otro==0)
	  document.getElementById("mensajevotar").innerHTML = "Sólo se permite un voto por usuario";
	else
	  document.getElementById("mensajevotar").innerHTML = "Gracias por tu Calificaci&oacute;n!!!";
		
	barheight=document.getElementById(this.id).offsetHeight
	var ns=(navigator.appName.indexOf("Netscape")!=-1)|| window.opera
	var d=document
	function ml(id){
		var el=d.getElementById(id)
		if(!persistclose || persistclose&&get_cookie("remainclosed")=="")
		el.style.display="block"
		if(d.layers)el.style=el
		el.sP=function(x,y){this.style.left=x+"%";this.style.top=y+"px";}
		el.x=startX
		if(verticalpos=="fromtop")
		el.y=startY
		else{
			el.y=ns ? pageYOffset+innerHeight : iecompattest().scrollTop+iecompattest().clientHeight
			el.y-=startY}
		return el}
	window.stayTopLeft=function(){
		if(verticalpos=="fromtop"){
			var pY=ns ? pageYOffset : iecompattest().scrollTop
			ftlObj.y+=(pY+startY-ftlObj.y)/8}
		else{
			var pY=ns ? pageYOffset+innerHeight-barheight: iecompattest().scrollTop+iecompattest().clientHeight-barheight
			ftlObj.y+=(pY-startY-ftlObj.y)/8}
		ftlObj.sP(ftlObj.x,ftlObj.y)
		setTimeout("stayTopLeft()",10)}
	ftlObj=ml(this.id)
	stayTopLeft()
}

function cerrarLightboxVotar(windowID){
    document.getElementById("mensajevotar").innerHTML = '';
    cerrarLightbox(windowID);
}

function cerrarLightbox(windowID){
	quitarVelo();
	this.id=windowID
	if(persistclose)
	document.cookie="remainclosed=1"
	document.getElementById(this.id).style.display="none"
}

function JSWindow(windowID){
	document.getElementById('vermask').className='layerlightver'
	oTable=document.createElement("table")
	oTable.cellSpacing=0
	oTable.cellPadding=0
	oTable.border=0
	var windowdiv=document.getElementById(windowID)
	var urlight=document.getElementById(windowID)
	while(windowdiv.hasChildNodes())windowdiv.removeChild(windowdiv.firstChild)
	windowdiv.appendChild(oTable)
	var oTR=oTable.insertRow(0)
	oTD=oTR.insertCell(0)
	oTD.innerHTML="<img src='"+urlight.value+"' border=0>"
}

function ponerVelo(){
   document.getElementById('vermask').className='layerlightver';
}
function ponerVeloIframe(){
  parent.velo.className='layerlightver';
}

function quitarVelo(){
   document.getElementById('vermask').className='';
}
function mostrarRecursoMultimedia(respuesta){
   var divmulti = document.getElementById("contenidoReproductor").innerHTML=respuesta;
   abrirLightbox("lightboxMultimedia",0);
}

function abrirBarra(){
    $("div#mibarra").show();
	document.getElementById("mibarra").innerHTML = '<div class="opciones-login"><div class="form2"><div class="dato dato1"><input type="checkbox" class="inputCheckbox" name="recordar" id="recordar"/><label for="recordar">Recordar mi clave en este equipo</label><a class="vinculo-especial" href="javascript:void(0)" onclick="abrirLightbox(\'lightboxOlvideClave\',1,\'contentcamposOlvide\'); return false;" >Olvidé mi clave</a></div></div><div class="clear"></div></div>';
}

function enviarOlvidoClave(idform){
   
    form =  document.getElementById(idform);
    
    //para tomar el enlace de la pagian en la que se encuentra
    var link = form.redireccion.value;
   	var correousua=form.correoUsu.value;
	
    var barra_mensaje = document.getElementById("mensaje_olvide_clave");
    barra_mensaje.innerHTML = "";
	
	if(!isEmail(correousua))
	{
		barra_mensaje.innerHTML = "Tu dirección de correo electrónico no es válida";
		return;
	}
	 document.getElementById("contentcamposOlvide").innerHTML = "<br><h2>Dénos un segundo. Estamos enviando su solicitud.</h2><br>";
     incluirObjeto("ENVIAR_OLVIDE_CLAVE",correousua, link, "contentcamposOlvide");
                
} 

function cambiarDiv(id_div){
     objDiv = document.getElementById("relacionado"+id_div);
      
     var lista = document.getElementById('info_relacionada_articulo_nuevotiempo');
     var total_lista = lista.getElementsByTagName("div");
     for (var i = 0; i < total_lista.length; i++) {
        var nombreDiv = total_lista[i].id;
        if(nombreDiv.search('mostrar_aqui')==0)
           	total_lista[i].style.display = "none";
        else
			total_lista[i].style.display = "block";
	 }
	  
	 if(objDiv)
      objDiv.style.display = "none";
    
   
}

function cambiarDivEmergencia(id_div){
     
     objDiv = document.getElementById("relacionado"+id_div);
      
     var lista = document.getElementById('listado_relacionados_nuevotiempo');
     var total_lista = lista.getElementsByTagName("div");
     for (var i = 0; i < total_lista.length; i++) {
			total_lista[i].style.display = "block";
	 }
	  
	 if(objDiv)
      objDiv.style.display = "none";
	  
}

function enviarNuevoError(idform){
   
    form =  document.getElementById(idform);
    
    //para tomar el enlace de la pagian en la que se encuentra
    var link = form.redireccion.value;
    form.nombreUsu.value=strip_tags(form.nombreUsu.value);
	form.correoUsu.value=strip_tags(form.correoUsu.value);
	form.mensajeUsu.value=strip_tags(form.mensajeUsu.value);
	
    var nombreusua=form.nombreUsu.value;
	var correousua=form.correoUsu.value;
	var mensaje=form.mensajeUsu.value; 
	
    var barra_mensaje = document.getElementById("mensaje_error_reportar_amigo");
   
	if(isEmpty(nombreusua))
	{
		barra_mensaje.innerHTML = "Por favor, escribe tu nombre";
		return;
	}
	
	if(!isEmail(correousua))
	{
		barra_mensaje.innerHTML = "Tu dirección de correo electrónico no es válida";
		return;
	}

	if(isEmpty(mensaje))
	{
		barra_mensaje.innerHTML = "Por favor, escribe tu  mensaje";
		return;
	}	
	 document.getElementById("contentcamposError").innerHTML = "<br><br><br><h1>Un momento por favor. Estamos enviando sus observaciones a nuestro equipo editorial.</h1><br><br><br>";
     incluirObjeto("ENVIAR_ERROR",nombreusua, correousua, mensaje, link, "contentcamposError");
                
} 

  
    
function isEmail (s)
{
    if (isEmpty(s)) 
      if (isEmail.arguments.length == 1) return false;
      else return (isEmail.arguments[1] == true);
      var i = 1;
      var sLength = s.length;
      while ((i < sLength) && (s.charAt(i) != "@")) i++;
      
      if ((i >= sLength) || (s.charAt(i) != "@")) return false;
      else i += 2;
      
      while ((i < sLength) && (s.charAt(i) != "."))i++;
      
      if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
      else return true;
}
    
function isEmpty(s)
{   
	return ((s == null) || (s.length == 0));
}

function modificarPaginaInicioRediseno(obj, destino)
{
   if (isExplorer())  
   {
      //window.external.AddFavorite("http://www.eltiempo.com","EL TIEMPO.COM");   
      obj.style.behavior='url(#default#homepage)'; 
      obj.setHomePage(destino);
   }
   else 
   {  
      var respuesta = "Desde Firefox, agregue eltiempo.com a sus favoritos presionando Ctrl+D"; 
      document.getElementById("contenidoPaginaRespuesta").innerHTML=respuesta;
      abrirLightbox("lightboxPaginaRespuesta",0);
      return false;
   }
} 


function validarIngreso()
{
   document.getElementById("mal").innerHTML = "";
   document.getElementById("vLogin").innerHTML = document.getElementById("vClave").innerHTML = "";
   a = true;   
   with(document.loginForm)
   {
      if (esBlanco(document.loginForm.login.value))
      {
		document.getElementById("vLogin").innerHTML = "Por favor, ingrese su nombre de usuario";
		a = false;
	  }            
      if (esBlanco(password.value))
      {		
		document.getElementById("vClave").innerHTML = "Por favor, ingrese su clave";
		a = false;
	  }
	  
	  if (a) 
	  {
	     //incluirObjeto("AJAX_VAL_CREDENCIALES",login.value,password.value.replace(/\+/g,"%2B"),'mal');
	     incluirObjeto("AJAX_VAL_CREDENCIALES_2",login.value,password.value.replace(/\+/g,"%2B"),cookiePersistente.checked,'mal');
	  }
   }
}

//para el login del cabezote
function validarIngreso2()
{
   document.getElementById("mal2").innerHTML = "";
   //document.getElementById("vLogin2").innerHTML = document.getElementById("vClave2").innerHTML = "";
   b = true;   
   with(document.loginForm2)
   {
       if (esBlanco(login2.value))
      {
		document.getElementById("mal2").innerHTML = '<div class="mensajes error"><p>Por favor, ingrese su nombre de usuario</p></div>';
		b = false;
		//return false;
	  }            
      if (esBlanco(password2.value))
      {		
		document.getElementById("mal2").innerHTML = '<div class="mensajes error"><p>Por favor, ingrese su clave</p></div>';
		b = false;
		//return false;
	  }
	  if (b == true) 
	  {
	  	 document.getElementById("mal2").innerHTML = '<div class="mensajes you-got-itAmarillo"><p>Estamos validando su información</p></div>';
	     incluirObjeto("AJAX_VAL_CREDENCIALES_2",login2.value,password2.value.replace(/\+/g,"%2B"),recordar.checked,'mal2');
	  }
   }
}
function recargarObjeto2(nombre_objeto, div_respuesta, o, pordefecto, cual)
{
   
    //Quitar el foco de la pestaña a la que le hicieron click
     //o.style.display='block';
     //o.blur(); 
     o.parentNode.style.display='block';
     o.parentNode.blur();
             
    //Quitarle el estilo a la pestaña actual
    var list = document.getElementById('NavigationMiPortafolio').getElementsByTagName("li");
    for (var i = 0; i < list.length; i++) {
		if (list[i].className == pordefecto) {
			list[i].className = "";	
		}
	}
	//clase a la pestaña del click
	//o.className = pordefecto;
    o.parentNode.className = pordefecto;
    
    incluirObjeto(nombre_objeto, cual, div_respuesta);   
} 

//Meses del a_o
var meses = new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre");
//Dias de la semana
var diasSemana = new Array("Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves","Viernes","S&aacute;bado");
//Pone al interior del div correspondiente la fecha actual
function imprimirDia(idDiv)
{
  dia = new Date();
  day = dia.getDate();
  weekDay = diasSemana[dia.getDay()];
  month = meses[dia.getMonth()];
  year = dia.getFullYear();
  
  document.getElementById(idDiv).innerHTML=weekDay+" "+day+" de "+month+" de "+year;
}

function hora_actualizada()
{
	
	var fechaActual;
	date1 = new Date();
	date2 = new Date();
	diff  = new Date();
    
	date1temp = new Date(fechaPublicacion);
	date1.setTime(date1temp.getTime());
    
	var fecha = new Date();

	fechaActual = (eval(fecha.getMonth()) + 1 ) + '/' + fecha.getDate() + '/' + fecha.getFullYear() + ' ' + fecha.getHours() + ':' + fecha.getMinutes() + ':' + fecha.getSeconds();
    date2temp = new Date(fechaActual);
	date2.setTime(date2temp.getTime());
	diff.setTime(Math.abs(date1.getTime() - date2.getTime()));
	timediff = diff.getTime();
    
	weeks = Math.floor(timediff / (1000 * 60 * 60 * 24 * 7));
	timediff -= weeks * (1000 * 60 * 60 * 24 * 7);
	weeks = Math.floor(weeks * 24 * 7);
    
	days = Math.floor(timediff / (1000 * 60 * 60 * 24));
	timediff -= days * (1000 * 60 * 60 * 24);
	days = Math.floor(days * 24);
    
	hours = Math.floor(timediff / (1000 * 60 * 60)); 
	timediff -= hours * (1000 * 60 * 60);
    
    
	mins = Math.floor(timediff / (1000 * 60)); 
	timediff -= mins * (1000 * 60);
    
	secs = Math.floor(timediff / 1000); 
	timediff -= secs * 1000;

	hours = weeks + days + hours;
	textoMinutos = ' minutos';
	if (eval(mins) == 1) {
		textoMinutos = ' minuto';
	}

	if (eval(hours)<= 0) {
		horasDiferencia =  mins +  textoMinutos; 
	}else {
		textohora = ' horas ';
		if (eval(hours) == 1) {
			textohora = ' hora ';
		}
		horasDiferencia =  hours + textohora  + mins +  textoMinutos; 
	}
	document.getElementById("fecha2").innerHTML="- actualizado hace "+horasDiferencia;
}




(function(){if(typeof jQuery!="undefined")var _jQuery=jQuery;var jQuery=window.jQuery=function(selector,context){return this instanceof jQuery?this.init(selector,context):new jQuery(selector,context);};if(typeof $!="undefined")var _$=$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(typeof selector=="string"){var m=quickExpr.exec(selector);if(m&&(m[1]||!context)){if(m[1])selector=jQuery.clean([m[1]],context);else{var tmp=document.getElementById(m[3]);if(tmp)if(tmp.id!=m[3])return jQuery().find(selector);else{this[0]=tmp;this.length=1;return this;}else
selector=[];}}else
return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.1",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}return this.each(function(index){for(var prop in obj)jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){var data=jQuery.map(this,function(a){return jQuery.find(t,a);});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?jQuery.unique(data):data);},clone:function(events){var ret=this.map(function(){return this.outerHTML?jQuery(this.outerHTML)[0]:this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index]);})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||jQuery.nodeName(t,"form"))?t:[t]));},is:function(expr){return expr?jQuery.multiFilter(expr,this).length>0:false;},hasClass:function(expr){return this.is("."+expr);},val:function(val){if(val==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,a=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){var val=jQuery.browser.msie&&!option.attributes["value"].specified?option.text:option.value;if(one)return val;a.push(val);}}return a;}else
return this[0].value.replace(/\r/g,"");}}else
return this.each(function(){if(val.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,val)>=0||jQuery.inArray(this.name,val)>=0);else if(jQuery.nodeName(this,"select")){var tmp=val.constructor==Array?val:[val];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,tmp)>=0||jQuery.inArray(this.text,tmp)>=0);});if(!tmp.length)this.selectedIndex=-1;}else
this.value=val;});},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},replaceWith:function(val){return this.after(val).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(fn){return this.pushStack(jQuery.map(this,function(elem,i){return fn.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,dir,fn){var clone=this.length>1,a;return this.each(function(){if(!a){a=jQuery.clean(args,this.ownerDocument);if(dir<0)a.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){var elem=clone?this.cloneNode(true):this;if(!evalScript(0,elem))fn.call(obj,elem);});});}};function evalScript(i,elem){var script=jQuery.nodeName(elem,"script");if(script){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}else if(elem.nodeType==1)jQuery("script",elem).each(evalScript);return script;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},a=1,al=arguments.length,deep=false;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};}if(al==1){target=this;a=0;}var prop;for(;a<al;a++)if((prop=arguments[a])!=null)for(var i in prop){if(target==prop[i])continue;if(deep&&typeof prop[i]=='object'&&target[i])jQuery.extend(target[i],prop[i]);else if(prop[i]!=undefined)target[i]=prop[i];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,win={};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){if(window.execScript)window.execScript(data);else if(jQuery.browser.safari)window.setTimeout(data,0);else
eval.call(window,data);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?win:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?win:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(obj,fn,args){if(args){if(obj.length==undefined)for(var i in obj)fn.apply(obj[i],args);else
for(var i=0,ol=obj.length;i<ol;i++)if(fn.apply(obj[i],args)===false)break;}else{if(obj.length==undefined)for(var i in obj)fn.call(obj[i],i,obj[i]);else
for(var i=0,ol=obj.length,val=obj[0];i<ol&&fn.call(val,i,val)!==false;val=obj[++i]){}}return obj;},prop:function(elem,value,type,index,prop){if(jQuery.isFunction(value))value=value.call(elem,[index]);var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(prop)?value+"px":value;},className:{add:function(elem,c){jQuery.each((c||"").split(/\s+/),function(i,cur){if(!jQuery.className.has(elem.className,cur))elem.className+=(elem.className?" ":"")+cur;});},remove:function(elem,c){elem.className=c!=undefined?jQuery.grep(elem.className.split(/\s+/),function(cur){return!jQuery.className.has(c,cur);}).join(" "):"";},has:function(t,c){return jQuery.inArray(c,(t.className||t).toString().split(/\s+/))>-1;}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position")||"static";if(parPos=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret,stack=[],swap=[];function color(a){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(a,null);return!ret||ret.getPropertyValue("color")=="";}if(prop=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(prop.match(/float/i))prop=styleFloat;if(!force&&elem.style[prop])ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/float/i))prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur&&!color(elem))ret=cur.getPropertyValue(prop);else{for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(a=0;a<stack.length;a++)if(color(stack[a])){swap[a]=stack[a].style.display;stack[a].style.display="block";}ret=prop=="display"&&swap[stack.length-1]!=null?"none":document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop)||"";for(a=0;a<swap.length;a++)if(swap[a]!=null)stack[a].style.display=swap[a];}if(prop=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var newProp=prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});ret=elem.currentStyle[prop]||elem.currentStyle[newProp];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left;var runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(a,doc){var r=[];doc=doc||document;jQuery.each(a,function(i,arg){if(!arg)return;if(arg.constructor==Number)arg=arg.toString();if(typeof arg=="string"){arg=arg.replace(/(<(\w+)[^>]*?)\/>/g,function(m,all,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)?m:all+"></"+tag+">";});var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes;else if(wrap[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]);if(/^\s/.test(arg))div.insertBefore(doc.createTextNode(arg.match(/^\s*/)[0]),div.firstChild);}arg=jQuery.makeArray(div.childNodes);}if(0===arg.length&&(!jQuery.nodeName(arg,"form")&&!jQuery.nodeName(arg,"select")))return;if(arg[0]==undefined||jQuery.nodeName(arg,"form")||arg.options)r.push(arg);else
r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return(t||"").replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(typeof a!="array")for(var i=0,al=a.length;i<al;i++)r.push(a[i]);else
r=a.slice(0);return r;},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)if(a[i]==b)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(first){var r=[],done={};try{for(var i=0,fl=first.length;i<fl;i++){var id=jQuery.data(first[i]);if(!done[id]){done[id]=true;r.push(first[i]);}}}catch(e){r=first;}return r;},grep:function(elems,fn,inv){if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++)if(!inv&&fn(elems[i],i)||inv&&!fn(elems[i],i))result.push(elems[i]);return result;},map:function(elems,fn){if(typeof fn=="string")fn=eval("false||function(a){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++){var val=fn(elems[i],i);if(val!==null&&val!=undefined){if(val.constructor!=Array)val=[val];result=result.concat(val);}}return result;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",styleFloat:jQuery.browser.msie?"styleFloat":"cssFloat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength"}});jQuery.each({parent:"a.parentNode",parents:"jQuery.dir(a,'parentNode')",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",nextAll:"jQuery.dir(a,'nextSibling')",prevAll:"jQuery.dir(a,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)",contents:"jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"},function(i,n){jQuery.fn[i]=function(a){var ret=jQuery.map(this,n);if(a&&typeof a=="string")ret=jQuery.multiFilter(a,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)jQuery(a[j])[n](this);});};});jQuery.each({removeAttr:function(key){jQuery.attr(this,key,"");this.removeAttribute(key);},addClass:function(c){jQuery.className.add(this,c);},removeClass:function(c){jQuery.className.remove(this,c);},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c);},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length){jQuery.removeData(this);this.parentNode.removeChild(this);}},empty:function(){jQuery("*",this).each(function(){jQuery.removeData(this);});while(this.firstChild)this.removeChild(this.firstChild);}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments);};});jQuery.each(["Height","Width"],function(i,name){var n=name.toLowerCase();jQuery.fn[n]=function(h){return this[0]==window?jQuery.browser.safari&&self["inner"+name]||jQuery.boxModel&&Math.max(document.documentElement["client"+name],document.body["client"+name])||document.body["client"+name]:this[0]==document?Math.max(document.body["scroll"+name],document.body["offset"+name]):h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&!context.nodeType)context=null;context=context||document;var ret=[context],done=[],last;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){var nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName.toUpperCase()))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var nodeName=m[2],merge={};m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName.toUpperCase()){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=jQuery.filter(m[3],r,true).r;else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,last=test[2]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==1){if(last==0||node.nodeIndex==last)add=true;}else if((node.nodeIndex+last)%first==0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var f=jQuery.expr[m[1]];if(typeof f!="string")f=jQuery.expr[m[1]][m[2]];f=eval("false||function(a,i){return "+f+"}");r=jQuery.grep(r,f,not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(element,type,handler,data){if(jQuery.browser.msie&&element.setInterval!=undefined)element=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var parts=type.split(".");type=parts[0];handler.type=parts[1];var events=jQuery.data(element,"events")||jQuery.data(element,"events",{});var handle=jQuery.data(element,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(element,arguments);return val;});var handlers=events[type];if(!handlers){handlers=events[type]={};if(element.addEventListener)element.addEventListener(type,handle,false);else
element.attachEvent("on"+type,handle);}handlers[handler.guid]=handler;this.global[type]=true;},guid:1,global:{},remove:function(element,type,handler){var events=jQuery.data(element,"events"),ret,index;if(typeof type=="string"){var parts=type.split(".");type=parts[0];}if(events){if(type&&type.type){handler=type.handler;type=type.type;}if(!type){for(type in events)this.remove(element,type);}else if(events[type]){if(handler)delete events[type][handler.guid];else
for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(element.removeEventListener)element.removeEventListener(type,jQuery.data(element,"handle"),false);else
element.detachEvent("on"+type,jQuery.data(element,"handle"));ret=null;delete events[type];}}for(ret in events)break;if(!ret){jQuery.removeData(element,"events");jQuery.removeData(element,"handle");}}},trigger:function(type,data,element,donative,extra){data=jQuery.makeArray(data||[]);if(!element){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{var val,ret,fn=jQuery.isFunction(element[type]||null),evt=!data[0]||!data[0].preventDefault;if(evt)data.unshift(this.fix({type:type,target:element}));data[0].type=type;if(jQuery.isFunction(jQuery.data(element,"handle")))val=jQuery.data(element,"handle").apply(element,data);if(!fn&&element["on"+type]&&element["on"+type].apply(element,data)===false)val=false;if(evt)data.shift();if(extra&&extra.apply(element,data)===false)val=false;if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(element,'a')&&type=="click")){this.triggered=true;element[type]();}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var c=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(!parts[1]||c[j].type==parts[1]){var tmp=c[j].apply(this,args);if(val!==false)val=tmp;if(tmp===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target&&event.srcElement)event.target=event.srcElement;if(jQuery.browser.safari&&event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var e=document.documentElement,b=document.body;event.pageX=event.clientX+(e&&e.scrollLeft||b.scrollLeft||0);event.pageY=event.clientY+(e&&e.scrollTop||b.scrollTop||0);}if(!event.which&&(event.charCode||event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=0==this.lastToggle?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false;});},hover:function(f,g){function handleHover(e){var p=e.relatedTarget;while(p&&p!=this)try{p=p.parentNode;}catch(e){p=this;};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e]);}return this.mouseover(handleHover).mouseout(handleHover);},ready:function(f){bindReady();if(jQuery.isReady)f.apply(document,[jQuery]);else
jQuery.readyList.push(function(){return f.apply(this,[jQuery]);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}if(jQuery.browser.mozilla||jQuery.browser.opera)document.removeEventListener("DOMContentLoaded",jQuery.ready,false);if(!window.frames.length)jQuery(window).load(function(){jQuery("#__ie_init").remove();});}}});jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o);};});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(jQuery.browser.mozilla||jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var script=document.getElementById("__ie_init");if(script)script.onreadystatechange=function(){if(this.readyState!="complete")return;jQuery.ready();};script=null;}else if(jQuery.browser.safari)jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);}jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);setTimeout(function(){self.each(callback,[res.responseText,status,res]);},13);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){var jsonp,jsre=/=(\?|%3F)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=s.data.replace(jsre,"="+jsonp);s.url=s.url.replace(jsre,"="+jsonp);s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get")s.url+=(s.url.match(/\?/)?"&":"?")+"_="+(new Date()).getTime();if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if(!s.url.indexOf("http")&&s.dataType=="script"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(!jsonp&&(s.success||s.complete)){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();return xml;function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")this.style.display="block";}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var opt=jQuery.speed(speed,easing,callback);return this[opt.queue===false?"each":"queue"](function(){opt=jQuery.extend({},opt);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(){var timers=jQuery.timers;return this.each(function(){for(var i=0;i<timers.length;i++)if(timers[i].elem==this)timers.splice(i--,1);}).dequeue();}});var queue=function(elem,type,array){if(!elem)return;var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.curCSS(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.css(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(){return self.step();}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timers.length==1){var timer=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length)clearInterval(timer);},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(){var t=(new Date()).getTime();if(t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var absolute=jQuery.css(elem,"position")=="absolute",parent=elem.parentNode,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522;if(elem.getBoundingClientRect){box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));if(msie){var border=jQuery("html").css("borderWidth");border=(border=="medium"||jQuery.boxModel&&parseInt(version)>=7)&&2||border;add(-border,-border);}}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&/^t[d|h]$/i.test(parent.tagName)||!safari2)border(offsetParent);if(safari2&&!absolute&&jQuery.css(offsetParent,"position")=="absolute")absolute=true;offsetParent=offsetParent.offsetParent;}while(parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table-row.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if(safari2&&absolute)add(-doc.body.offsetLeft,-doc.body.offsetTop);}results={top:top,left:left};}return results;function border(elem){add(jQuery.css(elem,"borderLeftWidth"),jQuery.css(elem,"borderTopWidth"));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}};})();

(function($){
	$.fn.superfish = function(o){
		var $sf = this,
			defaults = {
			hoverClass	: 'sfHover',
			pathClass	: 'overideThisToUse',
			delay		: 800,
			/*animation	: {opacity:'show'},*/
			speed		: 'normal'
		},
			over = function(){
				clearTimeout(this.sfTimer);
				clearTimeout($sf[0].sfTimer);
				$(this)
				.showSuperfishUl()
				.siblings()
				.hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this);
				if ( !$$.is('.'+o.bcClass) ) {
					this.sfTimer=setTimeout(function(){
						$$.hideSuperfishUl();
						if (!$('.'+o.hoverClass,$sf).length) { 
							over.call($currents.hideSuperfishUl());
						}
					},o.delay);
				}		
			};
		$.fn.extend({
			hideSuperfishUl : function(){
				return this
					.removeClass(o.hoverClass)
					.find('ul:visible')
						.hide()
					.end();
			},
			showSuperfishUl : function(){
				return this
					.addClass(o.hoverClass)
					.find('>ul:hidden')
						/*.animate(o.animation,o.speed)*/
						.show()
					.end();
			},
			applySuperfishHovers : function(){
				return this[($.fn.hoverIntent) ? 'hoverIntent' : 'hover'](over,out);
			}
		});
		o = $.extend({bcClass:'sfbreadcrumb'},defaults,o || {});
		var $currents = $('li:has(ul)',this).filter('.'+o.pathClass);
		if ($currents.length) {
			$currents.each(function(){
				$(this).removeClass(o.pathClass).addClass(o.hoverClass+' '+o.bcClass);
			});
		}
		var $sfHovAr=$('li:has(ul)',this)
			.applySuperfishHovers(over,out)
			.find('a').each(function(){
				var $a = $(this), $li = $a.parents('li');
				$a.focus(function(){
					over.call($li);
					return false;
				}).blur(function(){
					$li.removeClass(o.hoverClass);
				});
			})
			.end()
			.not('.'+o.bcClass)
				.hideSuperfishUl()
			.end();
		$(window).unload(function(){
			$sfHovAr.unbind('mouseover').unbind('mouseout');
		});
		return this.addClass('superfish').blur(function(){
			out.call(this);
		});
	};
})(jQuery);

var persistclose=0;
var startX=25;
var startY=25;
var verticalpos="fromtop";

/**
 * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget.
 * @requires jQuery v1.2 or above
 *
 * http://gmarwaha.com/jquery/jcarousellite/
 *
 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 1.0.1
 * Note: Requires jquery 1.2 or above from version 1.0.1
 */

(function($) {                                          // Compliant with jquery.noConflict()
$.fn.jCarouselLite = function(o) {
    o = $.extend({
        btnPrev: null,
        btnNext: null,
        btnGo: null,
        mouseWheel: false,
        auto: null,

        speed: 200,
        easing: null,

        vertical: false,
        circular: true,
        visible: 3,
        start: 0,
        scroll: 1,

        beforeStart: null,
        afterEnd: null
    }, o || {});

    return this.each(function() {                           // Returns the element collection. Chainable.

        var running = false, animCss=o.vertical?"top":"left", sizeCss=o.vertical?"height":"width";
        var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible;

        if(o.circular) {
            ul.prepend(tLi.slice(tl-v-1+1).clone())
              .append(tLi.slice(0,v).clone());
            o.start += v;
        }

        var li = $("li", ul), itemLength = li.size(), curr = o.start;
        div.css("visibility", "visible");

        li.css({"overflow": "hidden", "float" : o.vertical ? "none" : "left"});
        ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"});
        div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"});

        var liSize = o.vertical ? height(li) : width(li);   // Full li size(incl margin)-Used for animation
        var ulSize = liSize * itemLength;                   // size of full ul(total length, not just for the visible items)
        var divSize = liSize * v;                           // size of entire div(total length for just the visible items)

        li.css({width: li.width(), height: li.height()});
        ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize));

        div.css(sizeCss, divSize+"px");                     // Width of the DIV. length of visible images

        if(o.btnPrev)
            $(o.btnPrev).click(function() {
                return go(curr-o.scroll);
            });

        if(o.btnNext)
            $(o.btnNext).click(function() {
                return go(curr+o.scroll);
            });

        if(o.btnGo)
            $.each(o.btnGo, function(i, val) {
                $(val).click(function() {
                    return go(o.circular ? o.visible+i : i);
                });
            });

        if(o.mouseWheel && div.mousewheel)
            div.mousewheel(function(e, d) {
                return d>0 ? go(curr-o.scroll) : go(curr+o.scroll);
            });

        if(o.auto)
            setInterval(function() {
                go(curr+o.scroll);
                 cambiar(0);
            }, o.auto+o.speed);

        function vis() {
             return li.slice(curr).slice(0,v);
        };

        function go(to) {
            if(!running) {

                if(o.beforeStart)
                    o.beforeStart.call(this, vis());

                if(o.circular) {            // If circular we are in first or last, then goto the other end
                    if(to<=o.start-v-1) {           // If first, then goto last
                        ul.css(animCss, -((itemLength-(v*2))*liSize)+"px");
                        // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements.
                        curr = to==o.start-v-1 ? itemLength-(v*2)-1 : itemLength-(v*2)-o.scroll;
                    } else if(to>=itemLength-v+1) { // If last, then goto first
                        ul.css(animCss, -( (v) * liSize ) + "px" );
                        // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements.
                        curr = to==itemLength-v+1 ? v+1 : v+o.scroll;
                    } else curr = to;
                } else {                    // If non-circular and to points to first or last, we just return.
                    if(to<0 || to>itemLength-v) return;
                    else curr = to;
                }                           // If neither overrides it, the curr will still be "to" and we can proceed.

                running = true;

                ul.animate(
                    animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing,
                    function() {
                        if(o.afterEnd)
                            o.afterEnd.call(this, vis());
                        running = false;
                    }
                );
                // Disable buttons when the carousel reaches the last/first, and enable when not
                if(!o.circular) {
                    $(o.btnPrev + "," + o.btnNext).removeClass("disabled");
                    $( (curr-o.scroll<0 && o.btnPrev)
                        ||
                       (curr+o.scroll > itemLength-v && o.btnNext)
                        ||
                       []
                     ).addClass("disabled");
                }

            }
            return false;
        };
    });
};

function css(el, prop) {
    return parseInt($.css(el[0], prop)) || 0;
};
function width(el) {
    return  el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
};
function height(el) {
    return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
};

})(jQuery);

/***************************************************************
  Bloque de codigo slider
***************************************************************/  
var swidth=300;

//scroller's height
var sheight=80;

//scroller's speed 
var sspeed=2;
var restart=sspeed;
var rspeed=sspeed;

//scroller's pause 
var spause=10000;

//scroller's background
var sbcolor="#F9F9F9";

//-- begin: Scroller's Algorithm -->
var ii=0;
function goup(){if(sspeed!=rspeed*16){sspeed=sspeed*2;restart=sspeed;}}

function start(){
  if(document.getElementById('iens6div')){ns6div=document.getElementById('iens6div');ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[0];sizeup=ns6div.offsetHeight;ns6scroll();}
  else if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.document.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}
  else if(document.all && document.iens6div){iediv=document.iens6div;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[0];sizeup=iediv.offsetHeight;iescroll();}
}

function iescroll(){if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll()",spause);}else 
if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed+"px";setTimeout("iescroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[ii];sizeup=iediv.offsetHeight;iescroll();}}
function ns4scroll(){if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll()",spause);}else 
if(ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}}
function ns6scroll(){if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll()",spause);}else 
if(parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed+"px";setTimeout("ns6scroll()",100);}
else{if(ii==singletext.length-1)ii=0;else ii++;
ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHeight;ns6scroll();}}
//-- end Algorithm -->

function sorter(){
	$(document).ready(function() {
	$("table").tablesorter();
	$("#ajax-append").click(function() {
		 $.get("assets/ajax-content.html", function(html) {
		 	// append the "ajax'd" data to the table body
		 	$("table tbody").append(html);
			// let the plugin know that we made a update
			$("table").trigger("update");
			// set sorting column and direction, this will sort on the first and third column
			var sorting = [[2,1],[0,0]];
			// sort on the first column
			$("table").trigger("sorton",[sorting]);
		});
		return false;
	});
});
}

$(document).ready(function(){

/*	$(".small-video a").hover(function() {
		$(this).next(".tooltip div").animate({opacity: "show"}, "slow");
	}, function() {
		$(this).next(".tooltip div").animate({opacity: "hide"}, "fast");
	});
*/
    $("ul.menu1").superfish({
		hoverClass	: "sfHover", delay:0
	});
	
    archivo_buscar_validacion();
    

});


function archivo_buscar_validacion(){

	//Texto de ayuda en el formulario
            var inputQ = $('#archivo-form-buscador-q');
            var label = $('#archivo-form-buscador label[for=archivo-form-buscador-q]');
            var frm = $('#archivo-form-buscador');


            if (inputQ && label && frm){
                //Utilizar el texto de ayuda cuando el campo de búsqueda no tenga ningún valor
                if (jQuery.trim(inputQ.val()).length == 0){
                    inputQ.val(label.text());
                }
    
                //Borrar el texto de ayuda cuando se quiera buscar algo
                inputQ.focus(function(){
                    $('#archivo-form-mensaje').hide();
                    if ($(this).val() == label.text()){
                        $(this).val('');
                    }
                });
    
                //Verificar que se esté buscando un texto
                frm.submit(function(){
                    if ((jQuery.trim(inputQ.val()).length == 0) || (inputQ.val() == label.text())){
                        $('#archivo-form-mensaje').show();
                        inputQ.val('');
                        return false;
                    }
                });
            }

}

function generarVideoJSPlayer(video, divHTML, tipoReproduccion, ancho, alto,urlImagen, ubicacion) {

 if (tipoReproduccion == 'audio' && !ancho && !alto) {
        alto = 20;
        altoVideo = 20;
    }else {
        altoVideo = alto + 20;
	}
	var playlistArray;
    playlistArray = new Array();
    playlistArray[0] = "";
    playlistArray[1] = "";
    
    if (tipoReproduccion == 'audio')
       var s3 = new SWFObject("/reproductores/audio/mediaplayer.swf", tipoReproduccion + '_' + divHTML ,ancho,24,"7");    
    else
       var s3 = new SWFObject(ubicacion, tipoReproduccion + '_' + divHTML ,ancho,altoVideo,"7");
    if(tipoReproduccion == 'audio')   {
       s3.addParam("allowfullscreen","false");   
       
    }   
	s3.addParam("swLiveConnect","true");
	s3.addVariable("width",ancho);	
   	s3.addVariable("height",alto);
   	s3.addVariable("displaywidth" , ancho);
	s3.addVariable("displayheight" , alto);
	s3.addVariable("file", video);
	s3.addParam("wmode","transparent"); 
  	  
	if(tipoReproduccion == 'video'){
	  s3.addParam("allowfullscreen","true");
	  s3.addVariable("showdigits" , "total");
	  s3.addVariable("image" ,urlImagen);
	  s3.addVariable("searchbar" , "false");
	  s3.addVariable("showstop" , "false");
   }
 	   
   s3.addVariable("apl_publicidad","true");
   s3.addVariable("posx","21");
   s3.addVariable("posy" , "59");
   s3.addVariable("tamw" , 539);
   s3.addVariable("tamh" , 392);
//   s3.addVariable("apl_url" , "http://www.sony.com.co/bravia/");
   //s3.addVariable("apl_url" , "http://ads.us.e-planning.net/ei/3/c1e/5b0e72486f152e48?it=0&p=c2df2e6ed9ab6460&pb=141e84691072151b&rnd=$RANDOM");
   s3.addVariable("apl_url" , "http://ads.us.e-planning.net/ei/3/c1e/94913f71dd1c15ac?it=0&p=c2df2e6ed9ab6460&pb=141e84691072151b&rnd=$RANDOM");
   s3.write(divHTML);

}

function generarPageView(nombre_pagina,seccion,sub_seccion)
{
   s_channel = seccion?seccion:s_channel;
   s_prop1 = seccion?seccion:s_prop1;
   s_prop2 = sub_seccion?sub_seccion:s_prop2;
   s_pageName = nombre_pagina?nombre_pagina:s_pageName;
   //Registrar el page view para Certifica
   if (cert_registerHit){
       ruta = certifica_crear_ruta([s_channel, s_prop1, s_prop2,  s_pageName]);
       cert_registerHit(20837, ruta, 'cert_Pivot'); 
   }
   void(s_gs(s_account))
}

var horizontal_offset="9px";
var vertical_offset="0";
var ie=document.all;
var ns6=document.getElementById&&!document.all;
function getposOffset(what,offsettype){var totaloffset=(offsettype=="left")?what.offsetLeft:what.offsetTop;var parentEl=what.offsetParent;while(parentEl!=null){totaloffset=(offsettype=="left")?totaloffset+parentEl.offsetLeft:totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}return totaloffset;}
function clearbrowseredge(obj,whichedge){var edgeoffset=(whichedge=="rightedge")?parseInt(horizontal_offset)*-1:parseInt(vertical_offset)*-1;if(whichedge=="rightedge"){var windowedge=ie&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-30:window.pageXOffset+window.innerWidth-40;dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;if(windowedge-dropmenuobj.x<dropmenuobj.contentmeasure)edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+parseInt(horizontal_offset);}else{var windowedge=ie&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-18;dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;if(windowedge-dropmenuobj.y<dropmenuobj.contentmeasure)edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight;}return edgeoffset;}
function showhint(menucontents,obj,e,tipwidth){if((ie||ns6)&&document.getElementById("hintbox")){dropmenuobj=document.getElementById("hintbox");dropmenuobj.innerHTML=menucontents;dropmenuobj.style.left=dropmenuobj.style.top=-500;if(tipwidth!=""){dropmenuobj.widthobj=dropmenuobj.style;dropmenuobj.widthobj.width=tipwidth;}dropmenuobj.x=getposOffset(obj,"left");dropmenuobj.y=getposOffset(obj,"top");dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj,"rightedge")+obj.offsetWidth+"px";dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,"bottomedge")+"px";dropmenuobj.style.display="block";dropmenuobj.style.visibility="visible";obj.onmouseout=hidetip;}}
function hidetip(e){dropmenuobj.style.display="none";dropmenuobj.style.visibility="hidden";dropmenuobj.style.left="-500px";}
function createhintbox(){var divblock=document.createElement("div");divblock.setAttribute("id","hintbox");divblock.style.display="none";document.body.appendChild(divblock);}if(window.addEventListener)window.addEventListener("load",createhintbox,false);else if(window.attachEvent)window.attachEvent("onload",createhintbox);else if(document.getElementById)window.onload=createhintbox;


function isExplorer()
{
   if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) 
   {
       return true;
   }
   else if(navigator.appName == "Netscape") 
   {
      return false;   
   }
   else 
   {
      return false;
   }   
}

function ocultarrss(valor) {
document.getElementById(valor).style.visibility = 'hidden';
}

function mostrarOcultarRss(id)
{    
    if(document.getElementById(id).style.display=="none"){
        $(document.getElementById(id)).slideDown('slow');
    }else if(document.getElementById(id).style.display=="block"){
	   $(document.getElementById(id)).slideUp('slow');
    }
}

var fWidth;
function getLeftLightbox(divcito){
	//For old IE browsers
	if(document.all)
		fWidth = document.body.clientWidth;
	//For DOM1 browsers
	else if(document.getElementById &&!document.all)
		fWidth = innerWidth;
	else if(document.getElementById)
		fWidth = innerWidth;
	//For Opera
	else if (is.op)
		fWidth = innerWidth;
	//For old Netscape
	else if (document.layers)
		fWidth = window.innerWidth;
		
	var widthdivcito = obtenerEstilo(divcito,"width");
	return ((fWidth/2)-(widthdivcito/2))+"px";
}

function swapIt(o, nomContenido, pordefecto, navigation, contenedor) {
	o.blur(); //Esto quita el foco de la pesta?a a la que le hicieron click
	
	if (o.className == pordefecto) return false;
	var list = document.getElementById(navigation).getElementsByTagName("li");
	
	for (var i = 0; i < list.length; i++) {
	    if (list[i].className == pordefecto) {
			list[i].className = "";
		}else {
		    if (list[i].className.search(pordefecto) >= 0) {
		        list[i].className = list[i].className.replace(pordefecto , '');
            }
		}
	}	
  	o.parentNode.className = o.parentNode.className + ' ' + pordefecto;  	
	list = document.getElementById(contenedor).childNodes;
	for (var i = 0; i < list.length; i++) {
		if (list[i].tagName == "DIV") {
		   list[i].style.display = "none";
		}
	}    
	if(document.getElementById(nomContenido)){   
	   var top = document.getElementById(nomContenido);
	   top.style.display = "block";
    }
	return false;
}

function mostrarRecursoMultimediaLightbox(respuesta){
   abrirLightbox("lightboxMultimedia",0);
   var divmulti = document.getElementById("contenidoReproductor").innerHTML=respuesta;
}

function abrirVentana(url,ancho,alto){
vf=window.open(url,'FotoGrande','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,menubar=no,width='+ancho+' ,height='+alto)
}

function abrir_cerrar(id)
{
	if(document.getElementById(id).style.display=="none"){
		
		$(document.getElementById(id)).slideDown('slow');
		
		/*document.getElementById(id).style.display="block";
		var alto=document.getElementById('modulo_herr_serv').offsetHeight;
		var medio_ancho=180;
		//alert(alto);
		document.getElementById('modulo_herr_serv').style.marginTop=-alto+'px'
		document.getElementById('modulo_herr_serv').style.marginLeft=-medio_ancho+'px'
		if(id=="modulo_herr_serv"){
			document.getElementById('verMasSecc').innerHTML="Ocultar";
		}*/
	}else if(document.getElementById(id).style.display=="block"){
		$(document.getElementById(id)).hide('slow');
		/*if(id=="modulo_herr_serv"){
			document.getElementById('verMasSecc').innerHTML="Ver";
		}*/
	}
}

function obtenerEstilo(elemento,estilo){
	if(elemento.width)
	   return elemento.width;
	
	style = estilo;
	value=elemento.style.estilo;
	if (!value) {
		  if (document.defaultView && document.defaultView.getComputedStyle) {
			var css = document.defaultView.getComputedStyle(elemento, null);
			value = css ? css[style] : null;
		  } else if (elemento.currentStyle) {
			value = elemento.currentStyle[style];
		  }
	}
	if(isNaN(value))
	   return elemento.offsetWidth;
	else if(value)
		return value.replace("px","");
	else
		return 0;
}

function esBlanco(campo)
{
   if(campo.length==0||campo==null)
      return true;
}

function validarFechas(){
   with(document.buscarPorFecha) {
      var divErrores = document.getElementById("noFecha");
   
      var a=true;
      if (diaEdicAnteriores.value == "" &&  mesEdicAnteriores.value == "" && anioEdicAnteriores.value == ""){
		    divErrores.innerHTML = "<p>Ingrese por lo menos un criterio de búsqueda</p>";
			a = false;
	  }
      if (diaEdicAnteriores.value != "" && anioEdicAnteriores.value == "" &&  mesEdicAnteriores.value == ""){
		    divErrores.innerHTML = "<p>Por favor, seleccione el mes y/o el año</p>";
			a = false;
	  }

	  if (a) {
		  //submit();
		  document.location = action+"/a/"+anioEdicAnteriores.value+"/m/"+mesEdicAnteriores.value+"/d/"+diaEdicAnteriores.value;
	  }
   }
}

function cambiarPagina(menu){
if(menu.selectedIndex !=0)
window.document.location=menu[menu.selectedIndex].value
}


function getLeftLightboxIframe(divcito){
	//For old IE browsers
	if(document.all)
		fWidth = parent.document.body.clientWidth;
	//For DOM1 browsers
	else if(parent.document.getElementById &&!document.all)
		fWidth = parent.innerWidth;
	else if(parent.document.getElementById)
		fWidth = parent.innerWidth;
	//For Opera
	else if (is.op)
		fWidth = parent.innerWidth;
	//For old Netscape
	else if (parent.document.layers)
		fWidth = window.innerWidth;		
	var widthdivcito = obtenerEstiloIframe(divcito,"width");
	return ((fWidth/2)-(widthdivcito/2))+"px";
}

 
 function  cambiarBuscador(portalBuscar)
  {
    if(portalBuscar=='noticias')
    {
      document.getElementById('archivo-form-buscador').action='/archivo/buscar';
      document.getElementById('archivo-form-buscador').method='get';
      document.getElementById('archivo-form-buscador-q').name='q';
      document.getElementById('archivo-form-buscador').target='_self';
      document.getElementById('portalactual').value='eltiempo.com';
    }
    else if(portalBuscar=='empleos')
    {
      document.getElementById('archivo-form-buscador').action='http://www.elempleo.com/clientes/resultados_buscriterios.asp';      
      document.getElementById('archivo-form-buscador').method='post';
      document.getElementById('archivo-form-buscador-q').name='txtpalabras';
      document.getElementById('archivo-form-buscador').target='_blank';
      document.getElementById('portalactual').value='elempleo.com';
    }
     else if(portalBuscar=='educacion')
    {
      document.getElementById('archivo-form-buscador').action='http://www.guiaacademica.com/educacion/personas/pages/resultados.aspx';      
      document.getElementById('archivo-form-buscador').method='post';
      document.getElementById('archivo-form-buscador-q').name='txtpalabras';
      document.getElementById('archivo-form-buscador').target='_blank';
      document.getElementById('portalactual').value='guiaacademica.com';
    }
    else if(portalBuscar=='vivienda')
    {
      document.getElementById('archivo-form-buscador').action='http://www.metrocuadrado.com/servlet/co.com.m2.servlet.demanda.BuscarInmueblesSolr';
      document.getElementById('archivo-form-buscador-q').name='query';
      document.getElementById('archivo-form-buscador').target='_blank';
      document.getElementById('archivo-form-buscador').method='post';
      document.getElementById('idTipoBusqueda').value='15';
      document.getElementById('tipoBusqueda').value='hometiempo';
      document.getElementById('portalactual').value='metrocuadrado.com';
    }
    else if(portalBuscar=='automoviles')
    {
      document.getElementById('archivo-form-buscador').action='http://www.clasificar.com/servlet/co.com.motor.servlet.buscar.BuscarAvisosSolr';
      document.getElementById('archivo-form-buscador-q').name='query';
      document.getElementById('archivo-form-buscador').target='_blank';
      document.getElementById('archivo-form-buscador').method='post';
      document.getElementById('idTipoBusqueda').value='13';
      document.getElementById('tipoBusqueda').value='13';
      document.getElementById('portalactual').value='clasificar.com';
    }
    else if(portalBuscar=='videos')
    {
      document.getElementById('archivo-form-buscador').action='http://www.citytv.com.co/buscar';
      document.getElementById('archivo-form-buscador-q').name='q';
      document.getElementById('archivo-form-buscador').target='_blank';
      document.getElementById('archivo-form-buscador').method='get';
      document.getElementById('portalactual').value='citytv.com.co';
    }
    else if(portalBuscar=='empresas')
    {
      document.getElementById('archivo-form-buscador').action='http://www.portafolio.com.co/busquedas/home/resultadoBuscador.php';
      document.getElementById('archivo-form-buscador-q').name='q';
      document.getElementById('archivo-form-buscador').target='_blank';
      document.getElementById('archivo-form-buscador').method='post';
      document.getElementById('portalactual').value='portafolio.com.co';
    }    
  }
  
  $('#tipo_carro').click(function(){
			                var tipo_vehiculo = $('#id_tipovehiculo')[0];
			                tipo_vehiculo.options.length = 0;        
			                tipo_vehiculo.options.add(new Option(unescape("Escoja tipo"), ""));      
			                tipo_vehiculo.options.add(new Option(unescape("Automóviles"), "1"));
			                tipo_vehiculo.options.add(new Option(unescape("Camionetas"), "2"));
			                tipo_vehiculo.options.add(new Option(unescape("Camperos"), "3"));
			                tipo_vehiculo.options.add(new Option(unescape("Carga"), "4"));
			                tipo_vehiculo.options.add(new Option(unescape("Otros"), "10"));
			                tipo_vehiculo.options.add(new Option(unescape("Pasajeros"), "5"));	
			                tipo_vehiculo.options.add(new Option(unescape("Pickups"), "6"));	
			                tipo_vehiculo.options.add(new Option(unescape("Taxis"), "8"));	
			                tipo_vehiculo.options.add(new Option(unescape("Vans"), "9"));			               
			            });
   $('#tipo_moto').click(function(){
			                var tipo_vehiculo = $('#id_tipovehiculo')[0];
			                tipo_vehiculo.options.length = 0;              
			                tipo_vehiculo.options.add(new Option(unescape("Escoja tipo"), ""));
			                tipo_vehiculo.options.add(new Option(unescape("Carretera/chopper"), "14"));
			                tipo_vehiculo.options.add(new Option(unescape("Ciclomotos"), "11"));
			                tipo_vehiculo.options.add(new Option(unescape("Cuatrimotos"), "13"));
			                tipo_vehiculo.options.add(new Option(unescape("Deportivas"), "16"));
			                tipo_vehiculo.options.add(new Option(unescape("Enduro"), "15"));
			                tipo_vehiculo.options.add(new Option(unescape("Scooter"), "18"));
			                tipo_vehiculo.options.add(new Option(unescape("Uso Cotidiano/Trabajo"), "7"));
			               
			            });                
 
  
  function cambiarBuscadorEmpleos(portal)
  {
   if(portal=='empleos')
   {
      document.getElementById('formEmpleos').action='http://www.elempleo.com/clientes/resultados_buscriterios.asp';      
      document.getElementById('textoempleos').name='txtpalabras';
   }
   else if(portal=='metrabajo')
   {
      document.getElementById('formEmpleos').action='http://www.metrabajo.com/personas/busqueda/formulario_respuesta.aspx'; 
      document.getElementById('textoempleos').name='pal'; 
   } 
  }
  
  function taggearBuscador()
  {
    portalactual=document.getElementById('portalactual').value; 
    generarPageView('Buscador '+portalactual+' - Viajes','Viajes','');
    return true;
  }
function getUpdate(typ,pr1,pr2,swf) {
  if(typ == 'state') {
     obj = thisMovie(swf).itemData(0);
     if (!arregloMedias[swf]) {
         arregloMedias[swf] = new Array(4);
         arregloMedias[swf][0] = 0;
     }
     if (pr1 == 2) {
         arregloMedias[swf][0] = 1;
         generarPageViewVideo(swf);
     }else if (pr1 == 3) {
         arregloMedias[swf][0] = 0;
     }
  }
}


function thisMovie(swf) {
    if(navigator.appName.indexOf("Microsoft") != -1) {
        return window[swf];
    } else {
        return document[swf];
    }
}


var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function AssignPosition(d) {
if(self.pageYOffset) {
	rX = self.pageXOffset;
	rY = self.pageYOffset;
	}
else if(document.documentElement && document.documentElement.scrollTop) {
	rX = document.documentElement.scrollLeft;
	rY = document.documentElement.scrollTop;
	}
else if(document.body) {
	rX = document.body.scrollLeft;
	rY = document.body.scrollTop;
	}
if(document.all) {
	cX += rX; 
	cY += rY;
	}
}

function abrir()
{
	d=document.getElementById('menu_versiones');
	d.style.display='block';
	AssignPosition(document.getElementById('menu_versiones'));
}

function cerrar()
{

	d=document.getElementById('menu_versiones').style.display='none';	
}

function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
if(dd.style.display == "none") { dd.style.display = "block"; }
else { dd.style.display = "none"; }
}


function get_cookie(Name){
	var search=Name+"="
	var returnvalue=""
	if(parent.document.cookie.length>0){
		offset=parent.document.cookie.indexOf(search)
		if(offset !=-1){
			offset+=search.length
			end=parent.document.cookie.indexOf(";",offset)
			if(end==-1)end=parent.document.cookie.length
			returnvalue=unescape(parent.document.cookie.substring(offset,end))}}
	return returnvalue
}


function getLeftLightboxIframe(divcito){
	//For old IE browsers
	if(document.all)
		fWidth = parent.document.body.clientWidth;
	//For DOM1 browsers
	else if(parent.document.getElementById &&!document.all)
		fWidth = parent.innerWidth;
	else if(parent.document.getElementById)
		fWidth = parent.innerWidth;
	//For Opera
	else if (is.op)
		fWidth = parent.innerWidth;
	//For old Netscape
	else if (parent.document.layers)
		fWidth = window.innerWidth;		
	var widthdivcito = obtenerEstiloIframe(divcito,"width");
	return ((fWidth/2)-(widthdivcito/2))+"px";
}


function obtenerEstiloIframe(elemento,estilo){
	if(elemento.width)
	   return elemento.width;
	
	style = estilo;
	value=elemento.style.estilo;
	if (!value) {
		  if (parent.document.defaultView && parent.document.defaultView.getComputedStyle) {
			var css = parent.document.defaultView.getComputedStyle(elemento, null);
			value = css ? css[style] : null;
		  } else if (elemento.currentStyle) {
			value = elemento.currentStyle[style];
		  }
	}
	if(isNaN(value))
	   return elemento.offsetWidth;
	else if(value)
		return value.replace("px","");
	else
		return 0;
}

function enviarAmigo(idform, idRecurso){
   
    form =  document.getElementById(idform);
    
    //para tomar el enlace de la pagian en la que se encuentra
	var link = form.redireccion.value;
	form.nombreor.value=strip_tags(form.nombreor.value);
	form.mailor.value=strip_tags(form.mailor.value);
	form.nombredes.value=strip_tags(form.nombredes.value);
	form.maildes.value=strip_tags(form.maildes.value);
	form.mensaje.value=strip_tags(form.mensaje.value);
    
    var nombreorigen=form.nombreor.value;
	var mailorigen=form.mailor.value;
	var nombredestino=form.nombredes.value;
    var maildestino=form.maildes.value;
  	var mensajemail=form.mensaje.value;
	
	
	 
	if(isEmpty(nombreorigen))
	{
		alert("Por favor, escribe tu nombre");
		return;
	}
	
	if(!isEmail(mailorigen))
	{
		alert("Tu dirección de correo electrónico no es válida");
		return;
	}
    if(isEmpty(nombredestino))
	{
		alert("Por favor, escribe el nombre de tu amigo");
		return;
	}
	
	if(!isEmail(maildestino))
	{
		alert("La dirección de correo electrónico de tu amigo no es válida");
		return;
	}
	if(isEmpty(mensajemail))
	{
		alert("Por favor, escribe tu mensaje");
		return;
	}	
	 document.getElementById("contentcamposAmigo").innerHTML = "<div class='uncamporegistro'><h2>Un momento por favor. Estamos enviando la informaci&oacute;n.</h2></div>";
	 document.getElementById("hdos").innerHTML = "La informaci&oacute;n ya ha sido enviada con &eacute;xito ";
	 
     incluirObjeto("ENVIAR_AMIGO",nombreorigen,mailorigen,nombredestino,maildestino,mensajemail, link,idRecurso, "contentcamposAmigo");
                
} 
  
  function enviarInformanos(idform){
   
    form =  document.getElementById(idform);
    
    //para tomar el enlace de la pagian en la que se encuentra
    var link = document.getElementById("redireccion").value;
    
    var infonombre=form.infoNombre.value;
    var infoapellido=form.infoApellido.value;
	var infomail=form.infoMail.value;
    var infotipo=form.infoTipo.value;
    var infodirec=form.infoDirec.value;
    var infotele=form.infoTele.value;
    var infocelu=form.infoCelu.value;
    var infociudad=form.infoCiudad.value;
	var infomensaje=form.infoMensaje.value;

	if(isEmpty(infonombre))
	{
		alert("Por favor, escribe tu nombre");
		return;
	}
	if(isEmpty(infoapellido))
	{
		alert("Por favor, escribe tu apellido");
		return;
	}
	
	if(!isEmail(infomail))
	{
		alert("Tu dirección de correo electrónico no es válida");
		return;
	}
    if(isEmpty(infotipo))
	{
		alert("Por favor, elije un tipo");
		return;
	}
	
	if(isEmpty(infodirec))
	{
		alert("Por favor, escribe tu dirección");
		return;
	}
	
	if(isEmpty(infotele))
	{
		alert("Por favor, escribe tu teléfono");
		return;
	}
	if(isEmpty(infocelu))
	{
		alert("Por favor, escribe tu  celular");
		return;
	}
	
	if(isEmpty(infociudad))
	{
		alert("Por favor, escribe tu  Ciudad");
		return;
	}
	
	if(isEmpty(infomensaje))
	{
		alert("Por favor, escribe tu  mensaje");
		return;
	}	
	 document.getElementById("contentcamposInformanos").innerHTML = "<div class='uncamporegistro'><br><br><br><h1>Un momento por favor. Estamos enviando la informaci&oacute;n a nuestro equipo editorial.</h1><br><br><br></div>";
     incluirObjeto("ENVIAR_INFORMANOS",infonombre,infoapellido,infomail,infotipo,infodirec,infotele,infocelu,infociudad,infomensaje,"contentcamposInformanos");
                
} 

function enviarContacto(idform, tipoContacto){
   
    form =  document.getElementById(idform);
    
    var nombreusua=form.nombreUsu.value;
    var cedulausua = form.cedulaUsu.value;
    var telefonousua = form.telefonoUsu.value;
    var correousua=form.correoUsu.value;
	var mensaje=form.mensajeUsu.value; 
	
	if(isEmpty(nombreusua))
	{
		alert("Por favor, escribe tu nombre");
		return;
	}
	
	if(isEmpty(cedulausua))
	{
		alert("Por favor, escribe tu cédula");
		return;
	}
	
	if(isEmpty(telefonousua))
	{
		alert("Por favor, escribe tu teléfono");
		return;
	}
	
	if(!isEmail(correousua))
	{
		alert("Tu dirección de correo electrónico no es válida");
		return;
	}

	if(isEmpty(mensaje))
	{
		alert("Por favor, escribe tu  mensaje");
		return;
	}
     //tomo el tipo de contacto 	
	 var tipo = document.getElementById("tipoContacto").innerHTML;
	  	
	 document.getElementById("contentcamposcontact").innerHTML = "<br><br><br><h1>Enviando reporte, por favor espere...</h1><br><br><br>";
     incluirObjeto("ENVIAR_CONTACTO",nombreusua, cedulausua, telefonousua, correousua, mensaje,tipo,"contentcamposcontact");
                
} 
 

function eliminarFavorito(idrecurso){
	abrirLightbox('lightboxEliminarFav',0,'contenteliminarFav');
	document.getElementById("contenteliminarFav").innerHTML = "<p><center>Espere unos segundos.</center></p>";
  	incluirObjeto("ELIMINAR_FAVORITO",idrecurso,'contenteliminarFav');	

}

function agregarAlerta(){
	abrirLightbox('lightboxAgregarAl',0,'contentagregaral');
	/*document.getElementById("contenteliminarFav").innerHTML = "<p><center>Espere unos segundos.</center></p>";
  	incluirObjeto("AGREGAR_ALERTA",idrecurso,'contenteliminarFav');	*/

}

function agregarAlerta2(idform){
   
    form =  document.getElementById(idform);
    
    var alerta = form.alerta.value;
    var estado = form.estado;
    var estado2 = form.estado.value;
	
	if(isEmpty(alerta))
	{
		alert("Por favor escriba su alerta");
		return;
	}
	
	if (estado.options[estado.selectedIndex].value == "")
	{
		alert("Por favor, elija un estado para su alerta");
		return;
	}
	  	
	 document.getElementById("contentagregaral").innerHTML = "<br><br><br><h1>Agregando alerta, por favor espere...</h1><br><br><br>";
     incluirObjeto("AGREGAR_ALERTA",alerta, estado2, "contentagregaral");
                
}

function editarAlerta(alerta,estado){
	abrirLightbox('lightboxModificarAl',0,'contentmodificaral');
	/*document.getElementById("contenteliminarFav").innerHTML = "<p><center>Espere unos segundos.</center></p>";*/
  	incluirObjeto("MODIFICAR_ALERTA",alerta,estado,'contentmodificaral');	

}

function editarAlerta2(idformal){
   
    form =  document.getElementById(idformal);
    
    var alerta = form.alerta.value;
    var estado = form.estado;
    var palabra_anterior = form.palabra_anterior.value;
    var estado2 = form.estado.value;
	
	if(isEmpty(alerta))
	{
		alert("Por favor escriba su alerta");
		return;
	}
	
	if (estado.options[estado.selectedIndex].value == "")
	{
		alert("Por favor, elija un estado para su alerta");
		return;
	}
	  	
	 document.getElementById("contentmodificaral").innerHTML = "<br><br><br><h1>Modificando alerta, por favor espere...</h1><br><br><br>";
     incluirObjeto("MODIFICAR_ALERTA2",alerta, estado2, palabra_anterior, "contentmodificaral");
                
}

function eliminarAlerta(palabra){
	abrirLightbox('lightboxEliminarAl',0,'contenteliminarAl');
	document.getElementById("contenteliminarAl").innerHTML = "<p><center>Espere unos segundos.</center></p>";
  	incluirObjeto("ELIMINAR_ALERTA",palabra,'contenteliminarAl');	

} 


var escribiSobre = "";
var divActivo = "";

function mostrarNuevoRecursoMultimedia(respuesta){
  document.getElementById("info_visible").innerHTML=respuesta;
  if (fileRec && idDivRec && tipoRec ) {
      if (fileRec != '' && idDivRec != '' && tipoRec != '') {
          generarVideoJS(fileRec , idDivRec, tipoRec, 400, 320,urlimgRec);
          fileRec = '';
          idDivRec = '';
          tipoRec = '';
          urlimgRec='';
     }
  }
}

function mostrarNuevoRecursoMultimediaPequeno(respuesta){
  document.getElementById("info_visible").innerHTML=respuesta;
  if (fileRec && idDivRec && tipoRec ) {      
      if (fileRec != '' && idDivRec != '' && tipoRec != '') {
          generarVideoJS(fileRec , idDivRec, tipoRec, 210, 180,urlimgRec);
          fileRec = '';
          idDivRec = '';
          tipoRec = '';
          urlimgRec='';
     }
  }
}

function mostrarNuevoRecursoAudio(respuesta){
  
  var objDiv = document.getElementById("mostrar_aqui"+divActivo);
  objDiv.style.display = "block";
  objDiv.innerHTML=respuesta;
  
  if (fileRec && idDivRec && tipoRec) {
      if (fileRec != '' && idDivRec != '' && tipoRec != '') {
          generarVideoJS(fileRec , idDivRec, tipoRec, 200, 120);
          fileRec = '';
          idDivRec = '';
          tipoRec = '';
     }
  }
 
}

function enviarMyNotaAmigo(idform, idRecurso){
   
    form =  document.getElementById(idform);
    
    //para tomar el enlace de la pagian en la que se encuentra
    //var link = document.getElementById("redireccion").value;
    var link = form.redireccion.value;
    var nombreorigen=form.nombreor.value;
	var mailorigen=form.mailor.value;
	var nombredestino=form.nombredes.value;
    var maildestino=form.maildes.value;
  	var mensajemail=form.mensaje.value;
	 
	var barra_mensaje = document.getElementById("mensaje_error_enviar_amigo");
	if(isEmpty(nombreorigen))
	{
		//alert("Por favor, escribe tu nombre");
        barra_mensaje.innerHTML = "Por favor, escribe tu nombre";
		return;
	}
	
	if(!isEmail(mailorigen))
	{
		barra_mensaje.innerHTML = "Tu dirección de correo electrónico no es válida";
		return;
	}
    if(isEmpty(nombredestino))
	{
		barra_mensaje.innerHTML = "Por favor, escribe el nombre de tu amigo";
		return;
	}
	
	if(!isEmail(maildestino))
	{
		barra_mensaje.innerHTML = "La dirección de correo electrónico de tu amigo no es válida";
		return;
	}
	if(isEmpty(mensajemail))
	{
		barra_mensaje.innerHTML = "Por favor, escribe tu mensaje";
		return;
	}	
	 document.getElementById("contentcamposAmigo").innerHTML = "<div class='uncamporegistro'><br><br><br><h1>Espere un segundo por favor. Estamos enviando la informaci&oacute;n.</h1><br><br><br></div>";
     incluirObjeto("MOSTRAR_GRACIAS_AMIGO",nombreorigen,mailorigen,nombredestino,maildestino,mensajemail, link,idRecurso, "contentcamposAmigo");
                
  } 
  
  function cambiarFuente(iddiv, accion){
    
    var estilo;
    divcito = document.getElementById(iddiv);
    elementsp=divcito.getElementsByTagName('p'); 
    claseActual = elementsp[0].className;
    switch (accion) {         
        case 'aumenta2':
          estilo = 'masmas';
 
        break;
        case 'aumenta1':
          estilo = 'mas';
            
        break;
        default:
            estilo = '';
    }
    for(i=0;i<elementsp.length;i++){
        if(elementsp[i].id!="noaumenta"){
            elementsp[i].className = estilo;
        }
    }
  }
  
function calificarComment(votarVetar, idcomentario,consecutivo,tienePermiso,idUsuario){  
  if(loginUsuario!=''){     
     incluirObjeto("REESCRIBIR_VOTACION",idcomentario,votarVetar,idUsuario,consecutivo,"caja_voto"+idcomentario);
  }   
  else
  {
      abrirLightbox('lightboxIngresar',0,'contenidoCamposIngresar');
  }
}

function ocultarVerComentario(idcomentario){
	//Este es el cuerpo del comentario
	var contenido2=document.getElementById(idcomentario);
	
	//Este es el div que tiene el link de "ocultar comentario" o "abrir comentario"
	var divLink=document.getElementById("ocultarabrir"+idcomentario);
	
	if(contenido2.style.display=="block"){
		divLink.innerHTML="[ver comentario oculto]";
		//oculto el comentario
		contenido2.style.display="none";
	}
	else{
		//muestro el comentario
		contenido2.style.display="block";
		divLink.innerHTML="[ocultar comentario]";
	}
	
}

function cambiarPag(posicion, limite, pag)
{   
   //document.foro.action = "";
   document.foro.posicion.value=(posicion-1)*1;
   document.foro.hasta.value=(limite*1);
   document.foro.pagActual.value=pag;
   document.foro.target ="_top";
   document.foro.submit();
}

function comentarcomentario(idcom){
     cambiarIdParaComentar(idcom);
     var url = location.href;
  	 url = url.replace("#comentarNota","");
  	 location.href = url+"#comentarNota";
}

function cambiarIdParaComentar(id_padre) {
     if(document.formComm != null)
        document.formComm.id_padre.value = id_padre;
}
function comentar()
  {
  document.formComm.comentario.value=strip_tags(document.formComm.comentario.value);
    if(isWhitespace(document.formComm.comentario.value))
	{
		alert("Por favor, escriba su comentario");
		return;
	}
	if(document.formComm.comentario.value.length > 1000)
	{
	  alert("El comentario tiene m&aacute;s caracteres que los permitidos. Por favor ed&iacute;telo");
	  return;
	}
	
	input = document.formComm.inputcaptcha.value;
	suaz = document.formComm.suazzz.value;	
	var urltmp = document.location.href;	
	abrirLightbox('lightboxComentario',0,'respuestacomentario');	
    document.getElementById("respuestacomentario").innerHTML = "<div id='mensajecomentar'><br><br><br><h3>Su comentario se est&aacute; enviando<br>por favor espere...</h3><br><br><br></div>";
    incluirObjeto("MOSTRAR_GRACIAS_COMENTAR", document.formComm.comentario.value,
	document.formComm.id_padre.value,document.formComm.id_recurso.value, document.formComm.url.value, 
	document.generales.redireccionamiento.value, suaz,  input, "respuestacomentario");
	document.getElementById('vermask').className='layerlightver';    
  }
  

  function isWhitespace (s)
  {
    var i;
    var whitespace = " \t\n\r";    
    if (isEmpty(s)) return true;
    for (i = 0; i < s.length; i++)
    {   
      var c = s.charAt(i);
      // si el caracter en que estoy no aparece en whitespace,
      // entonces retornar falso
      if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
  }  
  function cambiar_texto(texto)
{
        //Objeto etiqueta al cual se le vca a cambiar el texto
        var obj=document.getElementById('_califica');
        
        //Remueve todos los nodos del objeto
        while(obj.hasChildNodes()) obj.removeChild(obj.firstChild);

		//Crea el nodo de texto 
		obj_texto=document.createTextNode(texto);												
        
        //Se a?ade el nodo de texto al objeto etiqueta
        obj.appendChild(obj_texto);
}

function cargarDatosPageView(divReproductor ,titulo, seccionPrincipal, seccionHija) {
    if (!arregloMedias[divReproductor]) {
        arregloMedias[divReproductor] = new Array(4);
    }
    arregloMedias[divReproductor][0] = 0;
    arregloMedias[divReproductor][1] = titulo;
    arregloMedias[divReproductor][2] = seccionPrincipal;
    arregloMedias[divReproductor][3] = seccionHija;        
}

function facebook_click(){
	u=location.href;
	t=document.title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}

function validarYoPublico(){
   var divErrores = document.getElementById("mensajeYoPublico");
   
   var a=true;
   
   with(document.forma) {
		titulo.value=strip_tags(titulo.value);
		descripcion.value=strip_tags(descripcion.value);
		lugar.value=strip_tags(lugar.value);
		etiquetas.value=strip_tags(etiquetas.value);
		        
        //Según sea imagen o video se vaidan los campos
        var activoRadio='imagen';
        /*for(var i = 0; i < tipoArchivo.length; i++) {
		  if(tipoArchivo[i].checked) {
			 activoRadio = radioObj[i].value;
		  }
	    }*/
        if(activoRadio!='video'){
           if (archivo.value == ""){
              divErrores.style.display = "block";
			  divErrores.innerHTML = "<p>Por favor, seleccione el archivo</p>";
			  a = false;
		   }
	    }else{
	       if (enlaceyoutube.value == "" || enlaceyoutube.value == "http://www.youtube.com/watch?v= SuCodigo"){
              divErrores.style.display = "block";
			  divErrores.innerHTML = "<p>Por favor, ingrese la dirección youtube de su video</p>";
			  a = false;
		   }else{
		      if (enlaceyoutube.value.search("www.youtube.com/watch")==-1){
                 divErrores.style.display = "block";
			     divErrores.innerHTML = "<p>Por favor, verifique la dirección youtube de su video</p>";
			     a = false;
		      }
		   }
	    }
        //Fin según sea imagen o video se vaLidan los campos
        
		if (titulo.value == ""){
     		divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Por favor, ingrese el titulo</p>";
			a = false;
		}
		if (descripcion.value == ""){
     		divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Por favor, ingrese la descripción</p>";
			a = false;
		}
		if (lugar.value == ""){
 		    divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Por favor, ingrese el lugar</p>";
			a = false;
		}
		if (categoria.value == ""){
			divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Por favor, ingrese la categoria</p>";
			a = false;
		}
		if (etiquetas.value == ""){
		    divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Por favor, ingrese las etiquetas</p>";
			a = false;
		}
		if (!termCond.checked){
		   
		    divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Para enviar contenido usted debe aceptar las condiciones del servicio </p>";
			a = false;
		}	
		if (menu1.value == "" || menu1.value == "0"){
		    divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Por favor, seleccione la licencia Creative Commons</p>";
			a = false;
		}
				
		if (a) {
           abrirLightbox("lightboxCargandoYp",0);
	       submit();
		}else{
		    if (document.location.hash != ""){
               document.location = document.location;
            }else
		       document.location = document.location+"#cabeza";
		}
   }
}


function enviarComentaristaDestacado(){
    
    var divErrores = document.getElementById("algoEstaMal");
 
    var nombre=document.formenviarerror.nombre.value;
    var apellido=document.formenviarerror.apellido.value;
	var correo=document.formenviarerror.email.value;
	var ciudad=document.formenviarerror.ciudad.value;    
	var pais=document.formenviarerror.pais.value;    
	var ocupacion=document.formenviarerror.ocupacion.value;    
	var cedula=document.formenviarerror.cedula.value;    
	var fijo=document.formenviarerror.fijo.value;    
	var oficina=document.formenviarerror.oficina.value;    
	var celular=document.formenviarerror.celular.value;    
	if(isEmpty(nombre))
	{
		divErrores.innerHTML = "Por favor, escriba su nombre";
		return;
	}
    if(isEmpty(apellido))
	{
		divErrores.innerHTML = "Por favor, escriba sus apellidos";
		return;
	}
    if(isEmpty(cedula))
	{
		divErrores.innerHTML = "Por favor, escriba su número de cédula";
		return;
	}
				
	if(!isEmail(correo))
	{
		divErrores.innerHTML = "Su dirección de correo electrónico no es válida";
		return;
	}

	if(isEmpty(ciudad))
	{
		divErrores.innerHTML = "Por favor, escriba la ciudad";
		return;
	}
    if(isEmpty(pais))
	{
		divErrores.innerHTML = "Por favor, escriba el país";
		return;
	}
    if(isEmpty(ocupacion))
	{
		divErrores.innerHTML = "Por favor, escriba su ocupación";
		return;
	}				
	    if(isEmpty(fijo) && isEmpty(celular) && isEmpty(oficina))
	{
		divErrores.innerHTML = "Por favor, escriba algún teléfono de contacto";
		return;
	}

	try{
	   var navegador = getversion();
	}catch(err){
	   navegador = "imposible determinar";  
	}
	try{
	   var os = getOS();
	}catch(err){
		os = "imposible determinar";
	}
	//para tomar la direccion de la pagina desde donde fue enviado
	var dirpagina = document.location.href;   
    document.getElementById("contentortografia").innerHTML = "<br><br><br><h3>Enviando solicitud, por favor espere...</h3><br><br><br>";    
    incluirObjeto("MOSTRAR_GRACIAS_INSCRIBE","comentarios@eltiempo.com.co",correo,nombre,apellido,ciudad,pais,fijo,navegador, os, dirpagina,cedula,ocupacion,oficina,celular,"contentortografia");        
    
}

function desplegarAyudaOpinion(){
   var divC = document.getElementById('ajaxcomolector').innerHTML;
   if(divC==''){
   	incluirObjeto('AYUDA_LECTORES','activo','ajaxcomolector');
   	$('#ajaxcomolector').addClass('ajaxLector');
   }else{ 
   	divC = incluirObjeto('AYUDA_LECTORES','inactivo','ajaxcomolector');
   	$('#ajaxcomolector').removeClass('ajaxLector');
   }
   
}function openNewWindow(URLtoOpen,windowName,windowFeatures){
newWindow=window.open(URLtoOpen,windowName,windowFeatures)}

function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'")
if(restore)selObj.selectedIndex=0}


function MM_abrirPagina(menu){
window.open(menu[menu.selectedIndex].value)}

function abrirPopUp(url){
WindowObjectReference=window.open(url,'popupeltiempo','width=1024,height=800,menubar=no,location=no,resizable=no,scrollbars=no,status=no')}


function swapItEnlace(o, nomContenido, pordefecto, navigation, contenedor) {
	o.blur(); //Esto quita el foco de la pesta?a a la que le hicieron click
	var list = document.getElementById(navigation).getElementsByTagName("a");
	for (var i = 0; i < list.length; i++) {
		if (list[i].className == pordefecto) {
			list[i].className = "";	
		}
	}	
  	o.className = pordefecto;
   	list = document.getElementById(contenedor).childNodes;
	for (var i = 0; i < list.length; i++) {
		if (list[i].tagName == "DIV") list[i].style.display = "none";
	}
	var top = document.getElementById(nomContenido);
	if(top!==null)
	{
    	top.style.display = "block";
    }
	return false;
}

if(typeof addEvent!='function'){
var addEvent=function(o,t,f,l){
var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;
if(o[d]&&!l)return o[d](t,f,false);
if(!o._evts)o._evts={};
if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};
o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');
if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})}if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}}function cancelEvent(e,c){e.returnValue=false;if(e.preventDefault)e.preventDefault();if(c){e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()}};

function SuperNote(myName,config){var defaults={myName:myName,allowNesting:false,cssProp:'visibility',cssVis:'inherit',cssHid:'hidden',IESelectBoxFix:true,showDelay:0,hideDelay:0.015,animInSpeed:0.5,animOutSpeed:0.5,animations:[],mouseX:0,mouseY:0,notes:{},rootElm:null,onshow:null,onhide:null};
for(var p in defaults)this[p]=(typeof config[p]=='undefined')?defaults[p]:config[p];var obj=this;addEvent(document,'mouseover',function(evt){obj.mouseHandler(evt,1)});addEvent(document,'click',function(evt){obj.mouseHandler(evt,2)});addEvent(document,'mousemove',function(evt){obj.mouseTrack(evt)});addEvent(document,'mouseout',function(evt){obj.mouseHandler(evt,0)});this.instance=SuperNote.instances.length;
SuperNote.instances[this.instance]=this}SuperNote.instances=[];
SuperNote.prototype.bTypes={};
SuperNote.prototype.pTypes={};
SuperNote.prototype.pTypes.mouseoffset=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){note.ref.style.left=checkWinX(mouseX,note)+'px';note.ref.style.top=checkWinY(mouseY,note)+'px'}}};
SuperNote.prototype.pTypes.mousetrack=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){var posString='with('+myName+'){var note=notes["'+noteID+'"];note.ref.style.left=checkWinX(mouseX,note)+"px";note.ref.style.top=checkWinY(mouseY,note)+"px"}';eval(posString);obj.IEFrameFix(noteID,1);if(!note.trackTimer)note.trackTimer=setInterval(posString,50)}else if(!nextVis&&!nextAnim){clearInterval(note.trackTimer);note.trackTimer=null}}};
SuperNote.prototype.pTypes.triggeroffset=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){var x=0,y=0,elm=note.trigRef;while(elm){x+=elm.offsetLeft;y+=elm.offsetTop;elm=elm.offsetParent}note.ref.style.left=checkWinX(x,note)+'px';note.ref.style.top=checkWinY(y,note)+'px'}}};
SuperNote.prototype.bTypes.pinned=function(obj,noteID,nextVis){with(obj){return(!nextVis)?false:true}};
SuperNote.prototype.docBody=function(){return document[(document.compatMode&&document.compatMode.indexOf('CSS')>-1)?'documentElement':'body']};SuperNote.prototype.getWinW=function(){return this.docBody().clientWidth||window.innerWidth||0};SuperNote.prototype.getWinH=function(){return this.docBody().clientHeight||window.innerHeight||0};
SuperNote.prototype.getScrX=function(){return this.docBody().scrollLeft||window.scrollX||0};
SuperNote.prototype.getScrY=function(){return this.docBody().scrollTop||window.scrollY||0};
SuperNote.prototype.checkWinX=function(newX,note){with(this){return Math.max(getScrX(),Math.min(newX,getScrX()+getWinW()-note.ref.offsetWidth-8))}};
SuperNote.prototype.checkWinY=function(newY,note){with(this){return Math.max(getScrY(),Math.min(newY,getScrY()+getWinH()-note.ref.offsetHeight-8))}};
SuperNote.prototype.mouseTrack=function(evt){with(this){mouseX=evt.pageX||evt.clientX+getScrX()||0;mouseY=evt.pageY||evt.clientY+getScrY()||0}};
SuperNote.prototype.mouseHandler=function(evt,show){with(this){if(!document.documentElement)return true;var srcElm=evt.target||evt.srcElement,trigRE=new RegExp(myName+'-(hover|click)-([a-z0-9]+)','i'),targRE=new RegExp(myName+'-(note)-([a-z0-9]+)','i'),trigFind=1,foundNotes={};if(srcElm.nodeType!=1)srcElm=srcElm.parentNode;var elm=srcElm;while(elm&&elm!=rootElm){if(targRE.test(elm.id)||(trigFind&&trigRE.test(elm.className))){if(!allowNesting)trigFind=0;var click=RegExp.$1=='click'?1:0,noteID=RegExp.$2,ref=document.getElementById(myName+'-note-'+noteID),trigRef=trigRE.test(elm.className)?elm:null;if(ref){if(!notes[noteID]){notes[noteID]={click:click,ref:ref,trigRef:null,visible:0,animating:0,timer:null};ref._sn_obj=this;ref._sn_id=noteID}var note=notes[noteID];if(!note.click||(trigRef!=srcElm))foundNotes[noteID]=true;if(!note.click||(show==2)){if(trigRef)notes[noteID].trigRef=notes[noteID].ref._sn_trig=elm;display(noteID,show);if(note.click&&(srcElm==trigRef))cancelEvent(evt)}}}if(elm._sn_trig){trigFind=1;elm=elm._sn_trig}else{elm=elm.parentNode}}if(show==2)for(var n in notes){if(notes[n].click&&notes[n].visible&&!foundNotes[n])display(n,0)}}};
SuperNote.prototype.display=function(noteID,show){with(this){with(notes[noteID]){clearTimeout(timer);if(!animating||(show?!visible:visible)){var tmt=animating?1:(show?showDelay||1:hideDelay||1);timer=setTimeout('SuperNote.instances['+instance+'].setVis("'+noteID+'",'+show+',false)',tmt)}}}};
SuperNote.prototype.checkType=function(noteID,nextVis,nextAnim){with(this){var note=notes[noteID],bType,pType;if((/snp-([a-z]+)/).test(note.ref.className))pType=RegExp.$1;if((/snb-([a-z]+)/).test(note.ref.className))bType=RegExp.$1;if(nextAnim&&bType&&bTypes[bType]&&(bTypes[bType](this,noteID,nextVis)==false))return false;if(pType&&pTypes[pType])pTypes[pType](this,noteID,nextVis,nextAnim);return true}};
SuperNote.prototype.setVis=function(noteID,show,now){with(this){var note=notes[noteID];if(note&&checkType(noteID,show,1)||now){note.visible=show;note.animating=1;animate(noteID,show,now)}}};
SuperNote.prototype.animate=function(noteID,show,now){with(this){var note=notes[noteID];if(!note.animTimer)note.animTimer=0;if(!note.animC)note.animC=0;with(note){clearTimeout(animTimer);var speed=(animations.length&&!now)?(show?animInSpeed:animOutSpeed):1;if(show&&!animC){if(onshow)this.onshow(noteID);IEFrameFix(noteID,1);ref.style[cssProp]=cssVis}animC=Math.max(0,Math.min(1,animC+speed*(show?1:-1)));if(document.getElementById&&speed<1)for(var a=0;a<animations.length;a++)animations[a](ref,animC);if(!show&&!animC){if(onhide)this.onhide(noteID);IEFrameFix(noteID,0);ref.style[cssProp]=cssHid}if(animC!=parseInt(animC)){animTimer=setTimeout(myName+'.animate("'+noteID+'",'+show+')',50)}else{checkType(noteID,animC?1:0,0);note.animating=0}}}};
SuperNote.prototype.IEFrameFix=function(noteID,show){with(this){if(!window.createPopup||!IESelectBoxFix)return;var note=notes[noteID],ifr=note.iframe;if(!ifr){ifr=notes[noteID].iframe=document.createElement('iframe');ifr.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';ifr.style.position='absolute';ifr.style.borderWidth='0';note.ref.parentNode.insertBefore(ifr,note.ref.parentNode.firstChild)}if(show){ifr.style.left=note.ref.offsetLeft+'px';ifr.style.top=note.ref.offsetTop+'px';ifr.style.width=note.ref.offsetWidth+'px';ifr.style.height=note.ref.offsetHeight+'px';ifr.style.visibility='inherit'}else{ifr.style.visibility='hidden'}}};

var supernote = new SuperNote('supernote', {});
function animFade(ref, counter)
{
 //counter = Math.min(counter, 0.9); // Uncomment to make notes translucent.
 var f = ref.filters, done = (counter == 1);
 if (f)
 {
  if (!done && ref.style.filter.indexOf("alpha") == -1)
   ref.style.filter += ' alpha(opacity=' + (counter * 9500) + ')';
  else if (f.length && f.alpha) with (f.alpha)
  {
   if (done) enabled = false;
   else { opacity = (counter * 9500); enabled=true }
  }
 }
 else ref.style.opacity = ref.style.MozOpacity = counter*0.999;
};
supernote.animations[supernote.animations.length] = animFade;
addEvent(document, 'click', function(evt)
{
 var elm = evt.target || evt.srcElement, closeBtn, note;

 while (elm)
 {
  if ((/note-close/).test(elm.className)) closeBtn = elm;
  if ((/snb-pinned/).test(elm.className)) { note = elm; break }
  elm = elm.parentNode;
 }

 if (closeBtn && note)
 {
  var noteData = note.id.match(/([a-z_\-0-9]+)-note-([a-z_\-0-9]+)/i);
  for (var i = 0; i < SuperNote.instances.length; i++)
   if (SuperNote.instances[i].myName == noteData[1])
   {
    setTimeout('SuperNote.instances[' + i + '].setVis("' + noteData[2] +
     '", false, true)', 100);
	cancelEvent(evt);
   }
 }
});
addEvent(supernote, 'show', function(noteID)
{ 
 // Do cool stuff here!
 
});
addEvent(supernote, 'hide', function(noteID)
{
 // Do cool stuff here!
});

var captcha_cargado = 0;
function cargar_captcha()
{
     if ( captcha_cargado == 0)
     {
        incluirObjeto('CAPTCHA','captcha');
        captcha_cargado = 1;
     }
}

function refrescarcaptcha(){

   
   var imgcptch = document.getElementById("cptch").src;   
   
   var newimg = document.createElement("img");
   var ranNum= Math.round(Math.random()*(9999));
   newimg.setAttribute("src",imgcptch+"&"+ranNum);
   
   
   newimg.setAttribute("id","cptch");
   newimg.setAttribute("title","cptch");
   newimg.setAttribute("alt","cptch");
   newimg.setAttribute("width","210");
   newimg.setAttribute("height","58");
   
   newimg.width = document.getElementById("cptch").width;
   newimg.height = document.getElementById("cptch").height;   

   newimg.onload=function(){
        document.getElementById("cptch").parentNode.replaceChild(newimg,document.getElementById("cptch")) ;
   }
}
function cargar_captcha_prueba(){
   var a = 4;
  // alert (a);
}var startX=25
var startY=0
var verticalpos="fromtop"
function closebar(windowID){
this.id=windowID
//alert(windowID);
document.getElementById("topbar"+this.id).style.display="none"}

  function enviarerrorfunc()
  {    
    var nombreusua=document.formenviarerror.nombreusu.value;
	var correousua=document.formenviarerror.correousu.value;
	var comentusua=document.formenviarerror.comentusu.value;    

	if(isEmpty(nombreusua))
	{
		alert("Por favor, escriba su nombre");
		return;
	}
	
	if(!isEmail(correousua))
	{
		alert("Su dirección de correo electrónico no es válida");
		return;
	}

	if(isEmpty(comentusua))
	{
		alert("Por favor, escriba el nombre del destinatario");
		return;
	}
	
	try{
	   var navegador = getversion();
	}catch(err){
	   navegador = "imposible determinar";  
	}
	try{
	   var os = getOS();
	}catch(err){
		os = "imposible determinar";
	}
	//para tomar la direccion de la pagina desde donde fue enviado
	var dirpagina = document.location.href;
    closebar(1);
   	
    incluirObjeto("MOSTRAR_GRACIAS_ENVIERROR","juaram@eltiempo.com.co, gomlui@eltiempo.com.co, yolgom@eltiempo.com.co , jaidue@eltiempo.com.co , cambaq@eltiempo.com.co , carres@eltiempo.com.co ,  sofgom@eltiempo.com.co, redaccionnuevosmedios@gmail.com,paucar@eltiempo.com.co,renrin@eltiempo.com.co",correousua,nombreusua,comentusua,navegador, os, dirpagina,"mensajebox");
    
    staticbar2(2);
    
    document.formenviarerror.reset();
  }  
  
//Esta funcion nos retorna el nombre del browser y la version
function getversion(){
  return navigator.appName+" - "+parseInt(navigator.appVersion);
}
//Para ver el sistema operativo
function getOS(){
  var str = navigator.userAgent.toString();
  array = str.split("; ");
  var OS = array[2];
  return OS;
}

function enviarInfo(){
 
    var nombre=document.formenviarerror.nombre.value;
    var apellido=document.formenviarerror.apellido.value;
	var correo=document.formenviarerror.email.value;
	var ciudad=document.formenviarerror.ciudad.value;    
	var pais=document.formenviarerror.pais.value;    
	var ocupacion=document.formenviarerror.ocupacion.value;    
	var cedula=document.formenviarerror.cedula.value;    
	var fijo=document.formenviarerror.fijo.value;    
	var oficina=document.formenviarerror.oficina.value;    
	var celular=document.formenviarerror.celular.value;    
	if(isEmpty(nombre))
	{
		alert("Por favor, escriba su nombre");
		return;
	}
    if(isEmpty(apellido))
	{
		alert("Por favor, escriba sus apellidos");
		return;
	}
    if(isEmpty(cedula))
	{
		alert("Por favor, escriba su número de cédula");
		return;
	}
				
	if(!isEmail(correo))
	{
		alert("Su dirección de correo electrónico no es válida");
		return;
	}

	if(isEmpty(ciudad))
	{
		alert("Por favor, escriba la ciudad");
		return;
	}
    if(isEmpty(pais))
	{
		alert("Por favor, escriba el país");
		return;
	}
    if(isEmpty(ocupacion))
	{
		alert("Por favor, escriba su ocupación");
		return;
	}				
	    if(isEmpty(fijo) && isEmpty(celular) && isEmpty(oficina))
	{
		alert("Por favor, escriba algún teléfono de contacto");
		return;
	}

	try{
	   var navegador = getversion();
	}catch(err){
	   navegador = "imposible determinar";  
	}
	try{
	   var os = getOS();
	}catch(err){
		os = "imposible determinar";
	}
	//para tomar la direccion de la pagina desde donde fue enviado
	var dirpagina = document.location.href;   
    document.getElementById("contentortografia").innerHTML = "<br><br><br><h3>Enviando solicitud, por favor espere...</h3><br><br><br>";    
    incluirObjeto("MOSTRAR_GRACIAS_INSCRIBE","comentarios@eltiempo.com.co",correo,nombre,apellido,ciudad,pais,fijo,navegador, os, dirpagina,cedula,ocupacion,oficina,celular,"contentortografia");        
    
}

function enviarInfoNominacionEmpresa(){
     
    var indice=document.formenviarerror.categorias.options.selectedIndex;	
	var categoria = document.formenviarerror.categorias.options[indice].value;		
    var organizacion=document.formenviarerror.nombreorganizacion.value;
    var ciudad=document.formenviarerror.ciudadorigen.value;    
    var industria=document.formenviarerror.sectorindustria.value;
    var nombre = document.formenviarerror.nombrecontacto.value;
    var cargo = document.formenviarerror.cargo.value;
    var tel = document.formenviarerror.telefonos.value;
    var direccion = document.formenviarerror.direc.value;
    var correo=document.formenviarerror.email.value;
    var fax=document.formenviarerror.numfax.value;
    var porquenominado = document.formenviarerror.mensajeporquenominado.value;
    
        	
	if(isEmpty(nombre))
	{
		alert("Por favor, escriba su nombre...");
		return;
	}
    if(isEmpty(organizacion))
	{
		alert("Por favor, escriba el nombre de la Organización");
		return;
	}
    if(isEmpty(industria))
	{
		alert("Por favor, escriba el Sector o la Industria");
		return;
	}
				
	if(!isEmail(correo))
	{
		alert("Su dirección de correo electrónico no es válida");
		return;
	}

	if(isEmpty(ciudad))
	{
		alert("Por favor, escriba la ciudad");
		return;
	}
    if(isEmpty(tel))
	{
		alert("Por favor, escriba su teléfono");
		return;
	}
    if(isEmpty(cargo))
	{
		alert("Por favor, escriba su ocupación");
		return;
	}
	if(isEmpty(direccion))
	{
		alert("Por favor, escriba su dirección");
		return;
	}
	if(isEmpty(fax))
	{
		alert("Por favor, escriba su número de Fax");
		return;
	}				
	

	try{
	   var navegador = getversion();
	}catch(err){
	   navegador = "imposible determinar";  
	}
	try{
	   var os = getOS();
	}catch(err){
		os = "imposible determinar";
	}
	//para tomar la direccion de la pagina desde donde fue enviado
	var dirpagina = document.location.href;   
    document.getElementById("contentortografia").innerHTML = "<br><br><br><h3>Enviando solicitud, por favor espere...</h3><br><br><br>";    
    incluirObjeto("MOSTRAR_GRACIAS_NOMI_ORG","",categoria,organizacion,ciudad,industria,nombre,cargo,tel,direccion,correo,fax,porquenominado,navegador,os,"contentortografia");    
    
}

function enviarInfoNominacionPersona(){
     
    var indice=document.formenviarerror2.categorias2.options.selectedIndex;	
	var categoria = document.formenviarerror2.categorias2.options[indice].value;
	var nombre = document.formenviarerror2.nombrepersona.value;
	var apellidos=document.formenviarerror2.apellido.value;
	var universidad=document.formenviarerror2.universidad.value;
	var carrera = document.formenviarerror2.carrera.value;
	var telefono = document.formenviarerror2.telefono.value;
	var celular = document.formenviarerror2.celular.value;
	var email=document.formenviarerror2.email.value;   
    var porquenominado = document.formenviarerror2.mensajeporquenominadopersona.value;
       
        	
	if(isEmpty(nombre))
	{
		alert("Por favor, escriba su nombre");
		return;
	}
    if(isEmpty(apellidos))
	{
		alert("Por favor, escriba sus apellidos");
		return;
	}
    if(isEmpty(universidad))
	{
		alert("Por favor, escriba la Universidad");
		return;
	}
				
	if(!isEmail(email))
	{
		alert("Su dirección de correo electrónico no es válida");
		return;
	}
	
    if(isEmpty(telefono))
	{
		alert("Por favor, escriba su teléfono");
		return;
	}
    if(isEmpty(carrera))
	{
		alert("Por favor, escriba su carrera");
		return;
	}
	if(isEmpty(celular))
	{
		alert("Por favor, escriba su número de celular");
		return;
	}					

	try{
	   var navegador = getversion();
	}catch(err){
	   navegador = "imposible determinar";  
	}
	try{
	   var os = getOS();
	}catch(err){
		os = "imposible determinar";
	}
	//para tomar la direccion de la pagina desde donde fue enviado
	var dirpagina = document.location.href;	
    document.getElementById("contentortografia2").innerHTML = "<br><br><br><h3>Enviando solicitud, por favor espere...</h3><br><br><br>";    
    incluirObjeto("MOSTRAR_GRACIAS_NOMI_PER","",categoria,nombre,apellidos,universidad,carrera,telefono,celular,email,porquenominado,navegador,os,"contentortografia2");    
            
}

function enviarInfoAbuso(){
        
    var indice=document.formenviarabuso.abusos.options.selectedIndex;	
	var tipo_abuso = document.formenviarabuso.abusos.options[indice].value;	
	var mensaje_abuso=document.formenviarabuso.mensajeusuabuso.value;	
	var comentario_reportado = document.formenviarabuso.num_comentario.value;
	var autor_reportado = document.formenviarabuso.autor_comentario.value;
							
	if(isEmpty(mensaje_abuso))
	{
		alert("Por favor, escriba el mensaje");
		return;
	}
    

	try{
	   var navegador = getversion();
	}catch(err){
	   navegador = "imposible determinar";  
	}
	try{
	   var os = getOS();
	}catch(err){
		os = "imposible determinar";
	}
	//para tomar la direccion de la pagina desde donde fue enviado
	var dirpagina = document.location.href;   
    //document.getElementById("contentgraciasabuso").innerHTML = "<br><br><br><h3>Enviando solicitud, por favor espere...</h3><br><br><br>";    
    incluirObjeto("MOSTRAR_GRACIAS_ABUSO","comentarios@eltiempo.com.co",tipo_abuso,mensaje_abuso,navegador, os, dirpagina,comentario_reportado,autor_reportado,"contentcamposAbuso");        
    
}
//se ultiliza para mostrar todas las secciones en el modulo de herramientas y servicios del home

function modificarPaginaInicio(obj)
{
   if (isExplorer())  
   {
      obj.style.behavior='url(#default#homepage)'; 
      obj.setHomePage('http://www.eltiempo.com/');
   }
   else 
   {  
      alert("Desde Firefox o Safari, agregue eltiempo.com a sus favoritos presionando Ctrl+D"); 
   }
} 

function esEmail(email)
{
   var unEmail=/(((\w|-)+)\@((((\w|-)+)\.)+)(\w+))/;
   if(unEmail.test(email))
      return true;
   else 
      return false;
}
function tieneEspacios(q)
{
   for(i=0;i<q.length;i++)
   {  
      if(q.charAt(i)==" ")
         return true;
   }
   return false;
}
function alfanumerico(q)
{  
   var c=/^([a-z]|[0-9])+$/i; 
   if(c.test(q))
      return true;
   else 
      return false;
}
function soloEspacios(q)
{
   for(i=0;i<q.length;i++)
   {  
      if(q.charAt(i)!=" ")
         return false;
   }
   return true;
}

function onEnter( evt, frm ) {
	var keyCode = null;
	if( evt.which ) {
		keyCode = evt.which;
	} 
	else if( evt.keyCode ) {
		keyCode = evt.keyCode;
	}
	if( 13 == keyCode ) {
		validar();
		return false;
	}
	return true;
}

function onEnterLogin( evt, frm ) {
	var keyCode = null;
	if( evt.which ) {
		keyCode = evt.which;
	} 
	else if( evt.keyCode ) {
		keyCode = evt.keyCode;
	}
	if( 13 == keyCode ) {
		validarIngreso();
		return false;
	}
	return true;
}
//para el login del cabezote
function onEnterLogin2( evt, frm ) {
	var keyCode = null;
	if( evt.which ) {
		keyCode = evt.which;
	} 
	else if( evt.keyCode ) {
		keyCode = evt.keyCode;
	}
	if( 13 == keyCode ) {
		validarIngreso2();
		return false;
	}
	return true;
}
function agregarAMisNoticias(id_recurso)
{	  
	     abrirLightbox('lightboxAgregarAMisNoticias',0,'contentcamposAgregar');
		 document.getElementById("contentcamposAgregar").innerHTML = "<p><center>Espere unos segundos.</center></p>";
  		 incluirObjeto("AGREGAR_RECURSO_FAVORITO",id_recurso,'contentcamposAgregar');
} 

function loNuevo()
 {
   if ($("#TextoBarraLoNuevo").hasClass("1")){ 
           $("#moduloLoNuevo").slideUp("slow");
           $("#TextoBarraLoNuevo").removeClass("1");
           $("#barraSuperior").removeClass("barraSuperiorAbierto");
           $("#barraSuperior").addClass("barraSuperiorCerrado");
           $("#TextoBarraLoNuevo").addClass("2");
           document.getElementById('barraLoNuevo').innerHTML='<a href="#" onclick="loNuevo(); return false;"><img src="/images/botonDown.gif"/></a>';
           document.getElementById('TextoBarraLoNuevo').innerHTML='Conozca la evolución de eltiempo.com <a href="#"  onclick="loNuevo(); return false;">Clic aquí</a>'
    }else{       
           $("#moduloLoNuevo").slideDown("slow");
           $("#TextoBarraLoNuevo").removeClass("2");
           $("#TextoBarraLoNuevo").addClass("1");
           $("#barraSuperior").removeClass("barraSuperiorCerrado");
           $("#barraSuperior").addClass("barraSuperiorAbierto");
           document.getElementById('barraLoNuevo').innerHTML='<a href="#" onclick="loNuevo(); return false;"><span>Cerrar</span>X</a>'
           document.getElementById('TextoBarraLoNuevo').innerHTML='Haga clic <a href="#"  onclick="loNuevo(); return false;">aquí</a> para cerrar esta información.'
    }
}

function hora_actualizada_param(fechaPublicacion)
{
	
	var fechaActual;
	date1 = new Date();
	date2 = new Date();
	diff  = new Date();
    //alert(fechaPublicacion)
	date1temp = new Date(fechaPublicacion);
	date1.setTime(date1temp.getTime());
    
	var fecha = new Date();

	fechaActual = (eval(fecha.getMonth()) + 1 ) + '/' + fecha.getDate() + '/' + fecha.getFullYear() + ' ' + fecha.getHours() + ':' + fecha.getMinutes() + ':' + fecha.getSeconds();
    date2temp = new Date(fechaActual);
	date2.setTime(date2temp.getTime());
	diff.setTime(Math.abs(date1.getTime() - date2.getTime()));
	timediff = diff.getTime();
    
	weeks = Math.floor(timediff / (1000 * 60 * 60 * 24 * 7));
	timediff -= weeks * (1000 * 60 * 60 * 24 * 7);
	weeks = Math.floor(weeks * 24 * 7);
    
	days = Math.floor(timediff / (1000 * 60 * 60 * 24));
	timediff -= days * (1000 * 60 * 60 * 24);
	days = Math.floor(days * 24);
    
	hours = Math.floor(timediff / (1000 * 60 * 60)); 
	timediff -= hours * (1000 * 60 * 60);
    
    
	mins = Math.floor(timediff / (1000 * 60)); 
	timediff -= mins * (1000 * 60);
    
	secs = Math.floor(timediff / 1000); 
	timediff -= secs * 1000;

	hours = weeks + days + hours;
	textoMinutos = ' minutos';
	if (eval(mins) == 1) {
		textoMinutos = ' minuto';
	}

	if (eval(hours)<= 0) {
		horasDiferencia =  mins +  textoMinutos; 
	}else {
		textohora = ' horas ';
		if (eval(hours) == 1) {
			textohora = ' hora ';
		}
		horasDiferencia =  hours + textohora  + mins +  textoMinutos; 
	}
	document.getElementById("fecha2").innerHTML="- actualizado hace "+horasDiferencia;
}
	
function validarBusqBlogs(){
    var divErrores = document.getElementById("mensajeBusqBlog");
   
   var a=true;
   
   with(document.busqBlog) {
       if (buscar.value == "" || buscar.value == "Ingrese palabra clave"){
            divErrores.style.display = "block";
			divErrores.innerHTML = "<p>Por favor. Ingrese su criterio de su búsqueda.</p>";
			a = false;
		}
	
		if (a) 
	       submit();
   }
}


function cambiarPagExperto(posicion, limite, pag)
{   
//   document.foroExperto.action = "";
   document.foroExperto.posicionExperto.value=posicion-1;
   document.foroExperto.hastaExperto.value=limite;
   document.foroExperto.pagActual.value=pag;
   document.foroExperto.target ="_top";
   document.foroExperto.submit();
}  



//Buscador de ClasifiCAR
//TODO
function vehiculo (index, id_marca, marca, id_linea, linea, id_especificacion, especificacion, modelo, precioventa, kilometraje, placa, codigo, idfichatecnica) {
 this.index = index;
 this.id_marca = id_marca;
 this.marca = marca;
 this.id_linea = id_linea;
 this.linea = linea;
 this.id_especificacion = id_especificacion;
 this.especificacion = especificacion;
 this.modelo = modelo;
 this.precioventa = precioventa;
 this.kilometraje = kilometraje;
 this.placa = placa;
 this.codigo = codigo;
 this.idfichatecnica = idfichatecnica;
}

function get_random(maxNum) {
 if (Math.random && Math.round)
 {
  var ranNum= Math.round(Math.random()*(maxNum-1));
  ranNum+=1;
  return ranNum;
 }
 else
 {
  today= new Date();
  hours= today.getHours();
  mins=   today.getMinutes();
  secn=  today.getSeconds();
  if (hours==19)
   hours=18;
  var ranNum= (((hours+1)*(mins+1)*secn)%maxNum)+1;
  return ranNum;
  }
}

function modificarSelectHomeElTiempoCL (modo) {
  if (modo == 1) {
    document.getElementById('nuevos').className ='clasificarActivo';
    document.getElementById('usados').className ='clasificarInactivo';
	document.getElementById('selectnuevos').disabled = false;
	document.getElementById('selectusados').disabled = true;
  }
  else {
    document.getElementById('nuevos').className ='clasificarInactivo';
    document.getElementById('usados').className ='clasificarActivo';
	document.getElementById('selectnuevos').disabled = true;
	document.getElementById('selectusados').disabled = false;
  }     
}

function publicareImagen(){
   document.getElementById('cargarImagen').style.display="block";
   document.getElementById('cargarVideo').style.display="none";
   document.getElementById('avisoAyudaSubir').innerHTML="<p>Las imágenes pueden ser de máximo <em>1.000Kb</em> Todo material publicado es revisado antes de ser publicado. <em>eltiempo.com</em> se reserva el derecho a rechazar fotos y videos que violen el código de ética de participación de <em>eltiempo.com</em>. </p>";
}

function publicareVideo(){
   document.getElementById('cargarImagen').style.display="block";
   document.getElementById('cargarVideo').style.display="none";
   document.getElementById('avisoAyudaSubir').innerHTML="<p>Los videos pueden ser de máximo 50M.  Todo material publicado es revisado antes de ser publicado. <em>eltiempo.com</em> se reserva el derecho a rechazar fotos y videos que violen el código de ética de participación de <em>eltiempo.com</em>. </p>";
   /*document.getElementById('cargarImagen').style.display="none";
   document.getElementById('cargarVideo').style.display="block";
*/
}




function cargarDetalleOlimpicos(objeto,div)
{
    incluirObjeto(objeto,div);
    sorter();
}

/***********************
*     TABLESORTER      *
***********************/


(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$¿?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);




//Jumba

//function jumba(id_jumba,ancho_jumba,alto_jumba){
function jumba(alias,espacio){

	jQuery.get('http://www.eltiempo.com/pauta/jumba_leer.php', function(data){
		if (data=="true"){
			jQuery.get('http://www.eltiempo.com/pauta/cargar_pauta.php?archivo=eltiempo.csv&alias='+alias+'&espacio='+espacio, function(data2){
				data3 = new String(data2);
				trozos=data3.split(",");
				id_jumba = trozos[0];
				ancho_jumba = trozos[1];
				alto_jumba = trozos[2];
				
				if (id_jumba != ""){
					if (espacio == "home"){
						document.getElementById("jumba").innerHTML='<div class="nivel publicidad3 publicidad31"><div class="contenido-publicidad3"><p class="texto-publicidad3">Publicidad</p><iframe frameborder="0" marginwidth=0 marginheight=0 scrolling="no" width="'+ancho_jumba+'" height="'+alto_jumba+'" src="http://ad.jumbaexchange.com/st?ad_type=iframe&ad_size='+ancho_jumba+'x'+alto_jumba+'&section='+id_jumba+'"></iframe></div></div>';
					}else{
						document.getElementById("jumba").innerHTML='<div class="publicidad1"><p class="texto-publicidad1">Publicidad</p><iframe frameborder="0" marginwidth=0 marginheight=0 scrolling="no" width="'+ancho_jumba+'" height="'+alto_jumba+'" src="http://ad.jumbaexchange.com/st?ad_type=iframe&ad_size='+ancho_jumba+'x'+alto_jumba+'&section='+id_jumba+'"></iframe></div>';
					}
				}
			})
		}
    })
}

 

function cargarPautaTab(){
	document.getElementById("lapautatab").innerHTML='<div id="pautaTabs" class="activo-tabs" style="display:block"><div class="cerrar1"><a id="tabHome" href="javascript:void(0);" onclick="tabPauta(); return false;">Cerrar X</a></div><object width="950" height="450" border="0" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="allowscriptaccess" value="always"/><param name="movie" value="http://ads.us.e-planning.net/eb/3/c1e/de08aecac67e3ba2?o=2&rnd=$RANDOM"/><param name="quality" value="autohigh"/><param name="LOOP" value="true"/><param name="wmode" value="transparent"/><param name="flashvars" value="clickTag=http://ads.us.e-planning.net/ei/3/c1e/de08aecac67e3ba2?it=0&rnd=$RANDOM"/><embed width="950" height="450" border="0" quality="autohigh" type="application/x-shockwave-flash" flashvars="clickTag=http://ads.us.e-planning.net/ei/3/c1e/de08aecac67e3ba2?it=0&rnd=$RANDOM" wmode="transparent" loop="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" src="http://ads.us.e-planning.net/eb/3/c1e/de08aecac67e3ba2?o=2&rnd=$RANDOM" allowscriptaccess="always"/></object></div>';
}

function setCookie2(){
  var today = new Date(); 
  var expira=new Date( today.getTime() + (3600000*24));
  setCookie('pauta','nomostrar',expira,'/');
}


/* 
 * More info at: http://phpjs.org
 * 
 * This is version: 2.71
 * php.js is copyright 2009 Kevin van Zonneveld.
 * 
 * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
 * (http://kevin.vanzonneveld.net), Onno Marsman, Michael White
 * (http://getsprink.com), Waldo Malqui Silva, Paulo Ricardo F. Santos, Jack,
 * Philip Peterson, Jonas Raoni Soares Silva (http://www.jsfromhell.com),
 * Legaev Andrey, Ates Goral (http://magnetiq.com), Martijn Wieringa, Nate,
 * Enrique Gonzalez, Philippe Baumann, Webtoolkit.info
 * (http://www.webtoolkit.info/), Theriault, Jani Hartikainen, Ash Searle
 * (http://hexmen.com/blog/), Carlos R. L. Rodrigues
 * (http://www.jsfromhell.com), Ole Vrijenhoek, travc, Michael Grier, GeekFG
 * (http://geekfg.blogspot.com), Johnny Mast (http://www.phpvrouwen.nl), Alex,
 * d3x, stag019, Andrea Giammarchi (http://webreflection.blogspot.com),
 * marrtins, Erkekjetter, Steve Hilder, Oleg Eremeev, David, Marc Palau,
 * Steven Levithan (http://blog.stevenlevithan.com), gorthaur, Arpad Ray
 * (mailto:arpad@php.net), Public Domain (http://www.json.org/json2.js),
 * gettimeofday, mdsjack (http://www.mdsjack.bo.it), Thunder.m, Alfonso
 * Jimenez (http://www.alfonsojimenez.com), KELAN, Tyler Akins
 * (http://rumkin.com), Mirek Slugen, Kankrelune
 * (http://www.webfaktory.info/), Karol Kowalski, AJ, Lars Fischer, Caio
 * Ariede (http://caioariede.com), Aman Gupta, Sakimori, Pellentesque
 * Malesuada, Breaking Par Consulting Inc
 * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
 * Josh Fraser
 * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
 * Paul, madipta, Douglas Crockford (http://javascript.crockford.com), Ole
 * Vrijenhoek (http://www.nervous.nl/), Hyam Singer
 * (http://www.impact-computing.com/), Raphael (Ao RUDLER), kenneth, T. Wild,
 * nobbler, class_exists, noname, Marco, David James, Steve Clay, marc andreu,
 * ger, john (http://www.jd-tech.net), mktime, Brad Touesnard, J A R, djmix,
 * Lincoln Ramsay, Linuxworld, Thiago Mata (http://thiagomata.blog.com),
 * Pyerre, Jon Hohle, Bayron Guevara, duncan, Sanjoy Roy, sankai, 0m3r, Felix
 * Geisendoerfer (http://www.debuggable.com/felix), Gilbert, Subhasis Deb,
 * Soren Hansen, T0bsn, Eugene Bulkin (http://doubleaw.com/), Der Simon
 * (http://innerdom.sourceforge.net/), JB, LH, Marc Jansen, Francesco, echo is
 * bad, XoraX (http://www.xorax.info), MeEtc (http://yass.meetcweb.com),
 * Peter-Paul Koch (http://www.quirksmode.org/js/beat.html), Nathan, Tim Wiel,
 * Ozh, David Randall, Bryan Elliott, Jalal Berrami, Arno, Rick Waldron,
 * Mick@el, rezna, Kirk Strobeck, Martin Pool, Daniel Esteban, Saulo Vallory,
 * Kristof Coomans (SCK-CEN Belgian Nucleair Research Centre), Pierre-Luc
 * Paour, Eric Nagel, Bobby Drake, penutbutterjelly, Christian Doebler,
 * setcookie, Gabriel Paderni, Simon Willison (http://simonwillison.net), Pul,
 * Luke Godfrey, Blues (http://tech.bluesmoon.info/), Anton Ongson, Jason Wong
 * (http://carrot.org/), Valentina De Rosa, sowberry, hitwork, Norman "zEh"
 * Fuchs, Yves Sucaet, johnrembo, Nick Callen, ejsanders, Aidan Lister
 * (http://aidanlister.com/), Philippe Jausions
 * (http://pear.php.net/user/jausions), dptr1988, Pedro Tainha
 * (http://www.pedrotainha.com), Alan C, uestla, Wagner B. Soares, T.Wild,
 * strcasecmp, strcmp, DxGx, Alexander Ermolaev
 * (http://snippets.dzone.com/user/AlexanderErmolaev), ChaosNo1, metjay, YUI
 * Library: http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html,
 * Blues at http://hacks.bluesmoon.info/strftime/strftime.js, taith, Robin,
 * Matt Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/),
 * FGFEmperor, baris ozdil, Tod Gentille, FremyCompany, Manish, Cord, Slawomir
 * Kaniecki, ReverseSyntax, Mateusz "loonquawl" Zalega, Scott Cariss,
 * Francois, Victor, stensi, vlado houba, date, gabriel paderni, Yannoo,
 * mk.keck, Leslie Hoare, Ben Bryan, Dino, Andrej Pavlovic, Andreas, DtTvB
 * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Russell Walker,
 * Garagoth, booeyOH, Cagri Ekin, Benjamin Lupton, davook, Atli Ã?Ã³r, jakes,
 * Allan Jensen (http://www.winternet.no), Howard Yeend, Kheang Hok Chin
 * (http://www.distantia.ca/), Luke Smith (http://lucassmith.name), Rival,
 * Diogo Resende
 * 
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */ 


function get_html_translation_table(table, quote_style) {
    // Returns the internal translation table used by htmlspecialchars and htmlentities  
    // 
    // version: 906.401
    // discuss at: http://phpjs.org/functions/get_html_translation_table
    // +   original by: Philip Peterson
    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: noname
    // +   bugfixed by: Alex
    // +   bugfixed by: Marco
    // +   bugfixed by: madipta
    // +   improved by: KELAN
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // +    bugfixed by: Brett Zamir (http://brett-zamir.me)
    // %          note: It has been decided that we're not going to add global
    // %          note: dependencies to php.js. Meaning the constants are not
    // %          note: real constants, but strings instead. integers are also supported if someone
    // %          note: chooses to create the constants themselves.
    // *     example 1: get_html_translation_table('HTML_SPECIALCHARS');
    // *     returns 1: {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}
    
    var entities = {}, histogram = {}, decimal = 0, symbol = '';
    var constMappingTable = {}, constMappingQuoteStyle = {};
    var useTable = {}, useQuoteStyle = {};
    
    // Translate arguments
    constMappingTable[0]      = 'HTML_SPECIALCHARS';
    constMappingTable[1]      = 'HTML_ENTITIES';
    constMappingQuoteStyle[0] = 'ENT_NOQUOTES';
    constMappingQuoteStyle[2] = 'ENT_COMPAT';
    constMappingQuoteStyle[3] = 'ENT_QUOTES';

    useTable       = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS';
    useQuoteStyle = !isNaN(quote_style) ? constMappingQuoteStyle[quote_style] : quote_style ? quote_style.toUpperCase() : 'ENT_COMPAT';

    if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {
        throw new Error("Table: "+useTable+' not supported');
        // return false;
    }

    if (useTable === 'HTML_ENTITIES') {
        entities['160'] = '&nbsp;';
        entities['161'] = '&iexcl;';
        entities['162'] = '&cent;';
        entities['163'] = '&pound;';
        entities['164'] = '&curren;';
        entities['165'] = '&yen;';
        entities['166'] = '&brvbar;';
        entities['167'] = '&sect;';
        entities['168'] = '&uml;';
        entities['169'] = '&copy;';
        entities['170'] = '&ordf;';
        entities['171'] = '&laquo;';
        entities['172'] = '&not;';
        entities['173'] = '&shy;';
        entities['174'] = '&reg;';
        entities['175'] = '&macr;';
        entities['176'] = '&deg;';
        entities['177'] = '&plusmn;';
        entities['178'] = '&sup2;';
        entities['179'] = '&sup3;';
        entities['180'] = '&acute;';
        entities['181'] = '&micro;';
        entities['182'] = '&para;';
        entities['183'] = '&middot;';
        entities['184'] = '&cedil;';
        entities['185'] = '&sup1;';
        entities['186'] = '&ordm;';
        entities['187'] = '&raquo;';
        entities['188'] = '&frac14;';
        entities['189'] = '&frac12;';
        entities['190'] = '&frac34;';
        entities['191'] = '&iquest;';
        entities['192'] = '&Agrave;';
        entities['193'] = '&Aacute;';
        entities['194'] = '&Acirc;';
        entities['195'] = '&Atilde;';
        entities['196'] = '&Auml;';
        entities['197'] = '&Aring;';
        entities['198'] = '&AElig;';
        entities['199'] = '&Ccedil;';
        entities['200'] = '&Egrave;';
        entities['201'] = '&Eacute;';
        entities['202'] = '&Ecirc;';
        entities['203'] = '&Euml;';
        entities['204'] = '&Igrave;';
        entities['205'] = '&Iacute;';
        entities['206'] = '&Icirc;';
        entities['207'] = '&Iuml;';
        entities['208'] = '&ETH;';
        entities['209'] = '&Ntilde;';
        entities['210'] = '&Ograve;';
        entities['211'] = '&Oacute;';
        entities['212'] = '&Ocirc;';
        entities['213'] = '&Otilde;';
        entities['214'] = '&Ouml;';
        entities['215'] = '&times;';
        entities['216'] = '&Oslash;';
        entities['217'] = '&Ugrave;';
        entities['218'] = '&Uacute;';
        entities['219'] = '&Ucirc;';
        entities['220'] = '&Uuml;';
        entities['221'] = '&Yacute;';
        entities['222'] = '&THORN;';
        entities['223'] = '&szlig;';
        entities['224'] = '&agrave;';
        entities['225'] = '&aacute;';
        entities['226'] = '&acirc;';
        entities['227'] = '&atilde;';
        entities['228'] = '&auml;';
        entities['229'] = '&aring;';
        entities['230'] = '&aelig;';
        entities['231'] = '&ccedil;';
        entities['232'] = '&egrave;';
        entities['233'] = '&eacute;';
        entities['234'] = '&ecirc;';
        entities['235'] = '&euml;';
        entities['236'] = '&igrave;';
        entities['237'] = '&iacute;';
        entities['238'] = '&icirc;';
        entities['239'] = '&iuml;';
        entities['240'] = '&eth;';
        entities['241'] = '&ntilde;';
        entities['242'] = '&ograve;';
        entities['243'] = '&oacute;';
        entities['244'] = '&ocirc;';
        entities['245'] = '&otilde;';
        entities['246'] = '&ouml;';
        entities['247'] = '&divide;';
        entities['248'] = '&oslash;';
        entities['249'] = '&ugrave;';
        entities['250'] = '&uacute;';
        entities['251'] = '&ucirc;';
        entities['252'] = '&uuml;';
        entities['253'] = '&yacute;';
        entities['254'] = '&thorn;';
        entities['255'] = '&yuml;';
    }

    if (useQuoteStyle !== 'ENT_NOQUOTES') {
        entities['34'] = '&quot;';
    }
    if (useQuoteStyle === 'ENT_QUOTES') {
        entities['39'] = '&#39;';
    }
    entities['60'] = '&lt;';
    entities['62'] = '&gt;';

    // ascii decimals for better compatibility
    entities['38'] = '&amp;';

    // ascii decimals to real symbols
    for (decimal in entities) {
        symbol = String.fromCharCode(decimal);
        histogram[symbol] = entities[decimal];
    }
    
    return histogram;
}

function htmlentities (string, quote_style) {
    // Convert all applicable characters to HTML entities  
    // 
    // version: 906.401
    // discuss at: http://phpjs.org/functions/htmlentities
  
    var histogram = {}, symbol = '', tmp_str = '', entity = '';
    tmp_str = string.toString();
    
    if (false === (histogram = this.get_html_translation_table('HTML_ENTITIES', quote_style))) {
        return false;
    }
    histogram["'"] = '&#039;';
    for (symbol in histogram) {
        entity = histogram[symbol];
        tmp_str = tmp_str.split(symbol).join(entity);
    }
    
    return tmp_str;
}

function strip_tags(str, allowed_tags) {
    // Strips HTML and PHP tags from a string  
    // version: 905.3122
    // discuss at: http://phpjs.org/functions/strip_tags
    var key = '', allowed = false;
    var matches = [];
    var allowed_array = [];
    var allowed_tag = '';
    var i = 0;
    var k = '';
    var html = '';

    var replacer = function(search, replace, str) {
        return str.split(search).join(replace);
    };

    // Build allowes tags associative array
    if (allowed_tags) {
        allowed_array = allowed_tags.match(/([a-zA-Z]+)/gi);
    }

    str += '';

    // Match tags
    matches = str.match(/(<\/?[\S][^>]*>)/gi);

    // Go through all HTML tags
    for (key in matches) {
        if (isNaN(key)) {
            // IE7 Hack
            continue;
        }

        // Save HTML tag
        html = matches[key].toString();

        // Is tag not in allowed list? Remove from str!
        allowed = false;

        // Go through all allowed tags
        for (k in allowed_array) {
            // Init
            allowed_tag = allowed_array[k];
            i = -1;

            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+'>');}
            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+' ');}
            if (i != 0) { i = html.toLowerCase().indexOf('</'+allowed_tag)   ;}

            // Determine
            if (i == 0) {
                allowed = true;
                break;
            }
        }

        if (!allowed) {
            str = replacer(html, "", str); // Custom replace. No regexing
        }
    }

    return str;
}

function enviarContactoMotor(idform){
   
    form =  document.getElementById(idform);
    
    //para tomar el enlace de la pagian en la que se encuentra
    var link = form.redireccion.value;
    form.nombreUsu.value=strip_tags(form.nombreUsu.value);
	form.cedulaUsu.value=strip_tags(form.cedulaUsu.value);
	form.telUsu.value=strip_tags(form.telUsu.value);
	form.correoUsu.value=strip_tags(form.correoUsu.value);
	form.mensajeUsu.value=strip_tags(form.mensajeUsu.value);
	
    var nombreusua=form.nombreUsu.value;
	var cedulausua=form.cedulaUsu.value;
	var telusua=form.telUsu.value;
	var correousua=form.correoUsu.value;
	var mensaje=form.mensajeUsu.value; 
	
    var barra_mensaje = document.getElementById("mensaje_error_reportar_amigo");
   
   if(isEmpty(nombreusua))
	{
		barra_mensaje.innerHTML = "Por favor, escribe tu nombre";
		return;
	}
	if(isEmpty(cedulausua))
	{
		barra_mensaje.innerHTML = "Por favor, escribe tu cédula";
		return;
	}
	if(isEmpty(telusua))
	{
		barra_mensaje.innerHTML = "Por favor, escribe tu teléfono";
		return;
	}
	if(!isEmail(correousua))
	{
		barra_mensaje.innerHTML = "Tu direccion de correo electronico no es valida";
		return;
	}

	if(isEmpty(mensaje))
	{
		barra_mensaje.innerHTML = "Por favor, escribe tu  mensaje";
		return;
	}	
	 document.getElementById("contentcamposEnviarContato").innerHTML = "<br><br><br><h1>Un momento por favor. Estamos enviando sus observaciones a nuestro equipo editorial.</h1><br><br><br>";
     incluirObjeto("ENVIAR_CONTACTENOS_MOTOR",nombreusua,cedulausua,telusua, correousua, mensaje, link, "contentcamposEnviarContato");
                
} 
