function ventanaSecundaria (URL){ window.open(URL,"ventana1","width=420,height=400,scrollbars=YES") } function sendtoafriend(idcurso){ day = new Date(); id = day.getTime(); eval("page" + id + " = window.open('enviaraunamigo.php?idcurso=' + idcurso, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=150,left = 390,top = 412');"); } function sendtoafriend2(idcurso){ day = new Date(); id = day.getTime(); eval("page" + id + " = window.open('../enviaraunamigo.php?idcurso=' + idcurso, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=150,left = 390,top = 412');"); } function iracursodecombo(idform){ var turl = document.getElementById(idform); var url= turl.value; parent.location.href =url; } function alerta(posicion,capa){ var obj=document.getElementById(posicion); setLyr(obj,capa); if (document.getElementById(capa).style.display == 'none'){ document.getElementById(capa).style.display = 'block'; }else{ document.getElementById(capa).style.display = 'none'; } } function findPos(obj){ var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop];} function setLyr(obj,lyr){ var coors = findPos(obj); if (lyr == 'testP') coors[1] -= 50; var x = document.getElementById(lyr); var topcor=coors[1] + 1; var leftcor=coors[0] + 1; x.style.top = topcor + 'px'; x.style.left = leftcor + 'px'; } function gotourl(url){ window.location=url; }