var partesContenidoProyecto=new Array();
var css=new Array();
function changeParteContenidoCycle(id,inactiveCSS,activeCSS){document.getElementById("pasos").style.display="block";
document.getElementById("indice").style.display="none";
document.getElementById("contenido").style.display="block";
var i=1;
for(parteContenido in partesContenidoCycle){if(id==parteContenido){partesContenidoCycle[parteContenido].style.display="block";
document.getElementById("linkParteContenido"+i).className=activeCSS
}else{partesContenidoCycle[parteContenido].style.display="none";
document.getElementById("linkParteContenido"+i).className=inactiveCSS
}i=i+1
}}function backIndice(){document.getElementById("pasos").style.display="block";
document.getElementById("indice").style.display="block";
document.getElementById("contenido").style.display="none"
}function changeBrightcovePag(variable,change,last){for(i=1;
i<=last;
i++){document.getElementById("a-"+variable+"-"+i).className="noSeleccionada"
}document.getElementById("a-"+variable+"-"+change).className="seleccionada"
}function cutString(str,tam){var i;
if(str.length>tam){str=str.substring(0,tam);
i=str.length-1;
while((str.charAt(i)!=" ")&&(i>0)){i--
}if(i!=0){str=str.substring(0,i)
}str=str+"..."
}document.write(str)
}function balanceHeightSingle(objName1,objName2){var i;
var htmlObj_1=window.document.getElementById(objName1);
var htmlObj_2=window.document.getElementById(objName2);
if(htmlObj_1!=null&&htmlObj_2!=null){balanceHeight=Math.max(htmlObj_1.scrollHeight,htmlObj_2.scrollHeight);
htmlObj_1.style.height=htmlObj_2.style.height=balanceHeight+"px";
htmlObj_1.height=balanceHeight;
htmlObj_2.height=balanceHeight;
styleHeight=parseInt(htmlObj_1.style.height);
scrollHeight=parseInt(htmlObj_2.scrollHeight)
}if(htmlObj_1==null){htmlObj_2.style.width=100+"%";
htmlObj_2.width=100
}}function balanceHeight(objName1,objName2){var i,j;
var htmlObj_1=window.document.getElementById(objName1);
var htmlObj_2=window.document.getElementById(objName2);
var padre;
var padres=window.document.getElementsByName("parent");
if(htmlObj_1!=null&&htmlObj_2!=null){for(j=0;
j<padres.length;
j++){padre=padres[j];
for(i=0;
i+1<padre.childNodes.length;
i=i+2){if(padre.childNodes[i].scrollHeight>padre.childNodes[i+1].scrollHeight){balanceHeight=padre.childNodes[i].scrollHeight;
balanceHeight=balanceHeight-36;
padre.childNodes[i+1].style.height=balanceHeight
}else{if(padre.childNodes[i].scrollHeight<padre.childNodes[i+1].scrollHeight){balanceHeight=padre.childNodes[i+1].scrollHeight;
balanceHeight=balanceHeight-36;
padre.childNodes[i].style.height=balanceHeight
}}}}}}function balanceAllHeights(objName){var i,j;
var destacados=window.document.getElementsByName(objName);
if(destacados!=null){var max=0;
for(j=0;
j+1<destacados.length;
j=j+1){if(max<Math.max(destacados[j].scrollHeight,destacados[j+1].scrollHeight)){max=Math.max(destacados[j].scrollHeight,destacados[j+1].scrollHeight)
}}for(i=0;
i<destacados.length;
i=i+1){destacados[i].style.height=max
}}}function changeBkg(id){var object=document.getElementById(id);
if(object.style.backgroundColor=="#FFF"){object.style.backgroundColor="#FFFFEC"
}else{object.style.backgroundColor="FFF"
}}function showHide(id){var object=document.getElementById(id);
if(object.style.display=="block"){object.style.display="none"
}else{object.style.display="block"
}}function hide(id){var object=document.getElementById(id);
object.style.display="none"
}function show(id){var object=document.getElementById(id);
object.style.display="block"
}function SelectorLinks(){this.entries=new Array();
this.addLink=addLink;
this.peekNLinks=peekNLinks;
this.getEntrie=getEntrie;
this.count=function count(){return this.entries.length
};
function addLink(entry){this.entries.push(entry)
}function getEntrie(index){return this.entries[index]
}function peekNLinks(cant){if(this.count()<1){return new Array()
}index1=Math.floor(Math.random()*(this.count()));
link1=this.entries[index1];
index2=Math.floor(Math.random()*(this.count()));
while(index1==index2){index2=Math.floor(Math.random()*(this.count()))
}var result=new Array();
result.push(this.getEntrie(index1));
result.push(this.getEntrie(index2));
return result
}}function Entry(_desc,_url){this.description=_desc;
this.url=_url;
this.getDescription=function(){return this.description
};
this.getUrl=function(){return this.url
}
}globalPreviousShow="infoGeneral";
function showOrHideGroupFrame(divId){div=document.getElementById(globalPreviousShow);
hideDiv(div);
showHideGroupFrame(divId);
globalPreviousShow=divId
}function Validator(frmname){this.formobj=document.forms[frmname];
if(!this.formobj){alert("BUG: couldnot get Form object "+frmname);
return
}if(this.formobj.onsubmit){this.formobj.old_onsubmit=this.formobj.onsubmit;
this.formobj.onsubmit=null
}else{this.formobj.old_onsubmit=null
}this.formobj.onsubmit=form_submit_handler;
this.addValidation=add_validation;
this.setAddnlValidationFunction=set_addnl_vfunction;
this.clearAllValidations=clear_all_validations
}function set_addnl_vfunction(functionname){this.formobj.addnlvalidation=functionname
}function clear_all_validations(){for(var itr=0;
itr<this.formobj.elements.length;
itr++){this.formobj.elements[itr].validationset=null
}}function form_submit_handler(){for(var itr=0;
itr<this.elements.length;
itr++){if(this.elements[itr].validationset&&!this.elements[itr].validationset.validate()){return false
}}if(this.addnlvalidation){str=" var ret = "+this.addnlvalidation+"()";
eval(str);
if(!ret){return ret
}}return true
}function add_validation(itemname,descriptor,errstr){if(!this.formobj){alert("BUG: the form object is not set properly");
return
}var itemobj=this.formobj[itemname];
if(!itemobj){alert("BUG: Couldnot get the input object named: "+itemname);
return
}if(!itemobj.validationset){itemobj.validationset=new ValidationSet(itemobj)
}itemobj.validationset.add(descriptor,errstr)
}function ValidationDesc(inputitem,desc,error){this.desc=desc;
this.error=error;
this.itemobj=inputitem;
this.validate=vdesc_validate
}function vdesc_validate(){if(!V2validateData(this.desc,this.itemobj,this.error)){this.itemobj.focus();
return false
}return true
}function ValidationSet(inputitem){this.vSet=new Array();
this.add=add_validationdesc;
this.validate=vset_validate;
this.itemobj=inputitem
}function add_validationdesc(desc,error){this.vSet[this.vSet.length]=new ValidationDesc(this.itemobj,desc,error)
}function vset_validate(){for(var itr=0;
itr<this.vSet.length;
itr++){if(!this.vSet[itr].validate()){return false
}}return true
}function validateEmailv2(email){if(email.length<=0){return true
}var splitted=email.match("^(.+)@(.+)$");
if(splitted==null){return false
}if(splitted[1]!=null){var regexp_user=/^\"?[\w-_\.]*\"?$/;
if(splitted[1].match(regexp_user)==null){return false
}}if(splitted[2]!=null){var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
if(splitted[2].match(regexp_domain)==null){var regexp_ip=/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
if(splitted[2].match(regexp_ip)==null){return false
}}return true
}return false
}function V2validateData(strValidateStr,objValue,strError){var epos=strValidateStr.search("=");
var command="";
var cmdvalue="";
if(epos>=0){command=strValidateStr.substring(0,epos);
cmdvalue=strValidateStr.substr(epos+1)
}else{command=strValidateStr
}switch(command){case"req":case"required":if(eval(objValue.value.length)==0){if(!strError||strError.length==0){strError=objValue.name+" : Required Field"
}alert(strError);
return false
}break;
case"maxlength":case"maxlen":if(eval(objValue.value.length)>eval(cmdvalue)){if(!strError||strError.length==0){strError=objValue.name+" : "+cmdvalue+" characters maximum "
}alert(strError+"\n[Current length = "+objValue.value.length+" ]");
return false
}break;
case"minlength":case"minlen":if(eval(objValue.value.length)<eval(cmdvalue)){if(!strError||strError.length==0){strError=objValue.name+" : "+cmdvalue+" characters minimum  "
}alert(strError+"\n[Current length = "+objValue.value.length+" ]");
return false
}break;
case"alnum":case"alphanumeric":var charpos=objValue.value.search("[^A-Za-z0-9]");
if(objValue.value.length>0&&charpos>=0){if(!strError||strError.length==0){strError=objValue.name+": Only alpha-numeric characters allowed "
}alert(strError+"\n [Error character position "+eval(charpos+1)+"]");
return false
}break;
case"num":case"numeric":var charpos=objValue.value.search("[^0-9]");
if(objValue.value.length>0&&charpos>=0){if(!strError||strError.length==0){strError=objValue.name+": Only digits allowed "
}alert(strError+"\n [Error character position "+eval(charpos+1)+"]");
return false
}break;
case"alphabetic":case"alpha":var charpos=objValue.value.search("[^A-Za-z]");
if(objValue.value.length>0&&charpos>=0){if(!strError||strError.length==0){strError=objValue.name+": Only alphabetic characters allowed "
}alert(strError+"\n [Error character position "+eval(charpos+1)+"]");
return false
}break;
case"alnumhyphen":var charpos=objValue.value.search("[^A-Za-z0-9-_]");
if(objValue.value.length>0&&charpos>=0){if(!strError||strError.length==0){strError=objValue.name+": characters allowed are A-Z,a-z,0-9,- and _"
}alert(strError+"\n [Error character position "+eval(charpos+1)+"]");
return false
}break;
case"email":if(!validateEmailv2(objValue.value)){if(!strError||strError.length==0){strError=objValue.name+": Enter a valid Email address "
}alert(strError);
return false
}break;
case"lt":case"lessthan":if(isNaN(objValue.value)){alert(objValue.name+": Should be a number ");
return false
}if(eval(objValue.value)>=eval(cmdvalue)){if(!strError||strError.length==0){strError=objValue.name+" : value should be less than "+cmdvalue
}alert(strError);
return false
}break;
case"gt":case"greaterthan":if(isNaN(objValue.value)){alert(objValue.name+": Should be a number ");
return false
}if(eval(objValue.value)<=eval(cmdvalue)){if(!strError||strError.length==0){strError=objValue.name+" : value should be greater than "+cmdvalue
}alert(strError);
return false
}break;
case"regexp":if(objValue.value.length>0){if(!objValue.value.match(cmdvalue)){if(!strError||strError.length==0){strError=objValue.name+": Invalid characters found "
}alert(strError);
return false
}}break;
case"dontselect":if(objValue.selectedIndex==null){alert("BUG: dontselect command for non-select Item");
return false
}if(objValue.selectedIndex==eval(cmdvalue)){if(!strError||strError.length==0){strError=objValue.name+": Please Select one option "
}alert(strError);
return false
}break
}return true
}function reSizeFrame(ifrmId){try{var oFrame=window.document.getElementById("ifrmId");
var oBody=oFrame.document.body;
oFrame.style.height=oBody.scrollHeight+(oBody.offsetHeight-oBody.clientHeight);
oFrame.style.width=oBody.scrollWidth+(oBody.offsetWidth-oBody.clientWidth)
}catch(e){window.status="Error: "+e.number+"; "+e.description
}}function retardarPlegar(menuId,funcion){ismouseover=false;
setTimeout(funcion,0)
}function desplegar(menuId,submenuId,menuArray,pod){if(ismouseover){return
}var submenu=document.getElementById(submenuId);
var html='<img src="sombra_opcion1menu.jpg" width="170" height="10">';
for(i=0;
i<menuArray.length;
i++){j=i+3;
html+='<div id="'+submenuId+i+'"><a href="'+escape(menuArray[i][1])+'">'+menuArray[i][0]+'</a></div><img src="sombra_opcion1menu.jpg" width="170" height="1">  '
}submenu.innerHTML=html;
if(pod>0){submenu.style.visibility="visible"
}else{submenu.style.visibility="hidden"
}}function mouseIsOver(){ismouseover=true
}function getDocHeight(doc){var docHt=0,sh,oh;
if(doc.height){docHt=doc.height
}else{if(doc.body){if(doc.body.scrollHeight){docHt=sh=doc.body.scrollHeight
}if(doc.body.offsetHeight){docHt=oh=doc.body.offsetHeight
}if(sh&&oh){docHt=Math.max(sh,oh)
}}}return docHt
}function setIframeHeight(iframeName){var iframeWin=window.frames[iframeName];
var iframeEl=document.getElementById?document.getElementById(iframeName):document.all?document.all[iframeName]:null;
if(iframeEl&&iframeWin){iframeEl.style.height="auto";
var docHt=getDocHeight(iframeWin.document);
if(docHt){iframeEl.style.height=docHt+30+"px"
}}}function loadIframe(iframeName,url){if(window.frames[iframeName]){window.frames[iframeName].location=url;
return false
}else{return true
}}function compararEntreFechas(fechaDesde,fechaHasta){var ahora=new Date();
if(compararFechasMenorIgual(fechaDesde,ahora)&&compararFechasMenorIgual(ahora,fechaHasta)){return true
}else{return false
}}function compararFechasMenorIgual(fechaDesde,fechaHasta){var res=false;
if(fechaDesde.getYear()<=fechaHasta.getYear()){if(fechaDesde.getYear()==fechaHasta.getYear()){if(fechaDesde.getMonth()<=fechaHasta.getMonth()){if(fechaDesde.getMonth()==fechaHasta.getMonth()){if(fechaDesde.getDate()<=fechaHasta.getDate()){if(fechaDesde.getDate()==fechaHasta.getDate()){if(fechaDesde.getHours()<=fechaHasta.getHours()){if(fechaDesde.getHours()==fechaHasta.getHours()){if(fechaDesde.getMinutes()<=fechaHasta.getMinutes()){if(fechaDesde.getMinutes()==fechaHasta.getMinutes()){if(fechaDesde.getSeconds()<=fechaHasta.getSeconds()){res=true
}}else{res=true
}}}else{res=true
}}}else{res=true
}}}else{res=true
}}}else{res=true
}}return res
}globalPreviousShowPreview="modo-detalle";
function showOrHideGroupFramePreview(divId){div=document.getElementById(globalPreviousShowPreview);
hideDiv(div);
showHideGroupFrame(divId);
globalPreviousShowPreview=divId
}function loadAsynchronicDiv(uri,id,param){var d_int=document.getElementById(id);
if("none"==d_int.style.display){d_int.style.display="";
var url=uri;
param="div="+id+"&"+param;
new Ajax.Updater(id,url,{method:"get",parameters:param})
}}function doTHCSearch(){var form=document.buscadorForm;
if(trim(form.texto.value)!=""||form.cycle.selectedIndex!=0){loadAsynchronicForm(form,"ajax-achor-results")
}}function busca(){hideDiv($("programacion-1"));
showDiv($("programacion-2"));
return loadAsynchronicForm(document.buscadorEmisionesForm,"ajax-achor-results")
}function recomendar(form,action){if(validarRecomendar(document.formRecomendar)){loadAsynchronicForm(form,action);
idioma=document.getElementById("idioma").value;
if(trim(idioma)=="es"){window.alert("El mensaje fue enviado correctamente")
}else{window.alert("Mensagem foi enviada corretamente")
}}}function validarRecomendar(form){idioma=document.getElementById("idioma").value;
if(trim(idioma)=="es"){document.getElementById("url").value=window.location.href;
if(trim(document.getElementById("nombreDest").value)==""){alert("El campo nombre del amigo es obligatorio")
}else{if(trim(document.getElementById("mailDest").value)==""){alert("El campo mail del amigo es obligatorio")
}else{if(trim(document.getElementById("nombre").value)==""){alert("El campo Mi Nombre es obligatorio")
}else{if(trim(document.getElementById("mail").value)==""){alert("El campo Mi Mail es obligatorio")
}else{if(!isEMail(trim(document.getElementById("mailDest").value))){alert("El mail del amigo ingresado es incorrecto")
}else{if(!isEMail(trim(document.getElementById("mail").value))){alert("El mail es incorrecto")
}else{return true
}}}}}}}else{document.getElementById("url").value=window.location.href;
if(trim(document.getElementById("nombreDest").value)==""){alert("O campo Nome do Amigo e obrigatorio")
}else{if(trim(document.getElementById("mailDest").value)==""){alert("O campo E-mail do Amigo e obrigatorio")
}else{if(trim(document.getElementById("nombre").value)==""){alert("O campo Meu Nome e obrigatorio")
}else{if(trim(document.getElementById("mail").value)==""){alert("O campo Meu E-mail e obrigatorio")
}else{if(!isEMail(trim(document.getElementById("mailDest").value))){alert("O campo E-mail do Amigo  não e um endereço de email valido")
}else{if(!isEMail(trim(document.getElementById("mail").value))){alert("O campo Meu E-mail não e um endereço de email valido")
}else{return true
}}}}}}}return false
}function isEMail(value){var exp_email1=/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
var exp_email2=/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
return !exp_email1.test(value)&&exp_email2.test(value)
}function colapsarExpandir(id_a){var a=$(id_a);
var fieldset=$(id_a+"_fieldset");
var contenedor=$(id_a+"_contenedor");
if(a.className=="colapsado"){contenedor.show();
a.className="expandido";
if(fieldset){fieldset.className="expandido"
}}else{contenedor.hide();
a.className="colapsado";
if(fieldset){fieldset.className="colapsado"
}}};