function clearMe(obj){ obj.value=''; } function opac(obj){ obj.style.filter = 'alpha(opacity=70)'; obj.style.opacity = .70; } function restore(obj){ obj.style.filter = 'alpha(opacity=100)'; obj.style.opacity = 1; } function pp(myurl,w,h,t,l,sb,tb,name){ var s = ['no','yes']; var parametros='status=no, resizable=no, scrollbars=' + s[sb] +',toolbars=' + s[tb] + ',width='+ w +',height='+ h +',top='+ t +',left='+ l; window.open(myurl,name,parametros); return false; } function show360(url){ pp(url,410,450,100,100,0,0,'c360') } function getURL(url, container, lc){ //FadeEffect('relcon'); new Ajax.Request( url, { method:'get', parameters: {lc: lc}, onSuccess: function(transport){ res = transport.responseText || "10"; $(container).innerHTML = res; ShowEffect('cover'); }, onFailure: function(){ alert('Something went wrong...'); tc="1000"; } } ); return false; } function validateAgree(){ if (document.getElementById('agree').checked== true) { return true; } else{ alert('Debes aceptar el acuerdo'); return false; } } function FadeEffect(element){ new Effect.Fade(element, { duration:10}); } function ShowEffect(element){ new Effect.Opacity(element, {duration:8, from:1, to:1, transition: Effect.Transitions.wobble, queue:'front'}); new Effect.Opacity(element, {duration:2, from:1, to:.5, transition: Effect.Transitions.wobble, queue:'end'}); } function getCover(n){ clearTimeout(timer) i=n; if (n==1){ getURL('/home/coverA.php', 'cover', '') } if (n==2){ getURL('/home/coverB.php', 'cover', '') } if (n==3){ getURL('/home/coverC.php', 'cover', '') } else if(n==4){ getURL('/home/coverD.php', 'cover', '') } i=i+1; if (i>3){ i=1 } timer=setTimeout('getCover(i)',10000); return false; } var i=1;