isIE=document.all; isNN=!document.all&&document.getElementById; isN4=document.layers; isHot=false; function ddInit(e){ topDog=isIE ? "BODY" : "HTML"; whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer"); hotDog=isIE ? event.srcElement : e.target; while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){ hotDog=isIE ? hotDog.parentElement : hotDog.parentNode; } if (hotDog.id=="titleBar"){ offsetx=isIE ? event.clientX : e.clientX; offsety=isIE ? event.clientY : e.clientY; nowX=parseInt(whichDog.style.left); nowY=parseInt(whichDog.style.top); ddEnabled=true; document.onmousemove=dd; } } function dd(e){ if (!ddEnabled) return; whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety; return false; } function ddN4(whatDog){ if (!isN4) return; N4=eval(whatDog); N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP); N4.onmousedown=function(e){ N4.captureEvents(Event.MOUSEMOVE); N4x=e.x; N4y=e.y; } N4.onmousemove=function(e){ if (isHot){ N4.moveBy(e.x-N4x,e.y-N4y); return false; } } N4.onmouseup=function(){ N4.releaseEvents(Event.MOUSEMOVE); } } function hideMe(){ if (isIE||isNN) whichDog.style.visibility="hidden"; else if (isN4) document.theLayer.visibility="hide"; } function showMe(){ if (isIE||isNN) whichDog.style.visibility="visible"; else if (isN4) document.theLayer.visibility="show"; } document.onmousedown=ddInit; //document.onmouseup=Function("ddEnabled=false"); var NS = document.layers||navigator.userAgent.toLowerCase().indexOf("mac")!=-1; var NS6 = (!document.all && document.getElementById)?true:false; var message_text='
'; var drag_it=false,x_pos,y_pos,a_pos,b_pos,id,d,popover,shadow,popoverTable,opc,neopc,left_pos,top_pos,top_pos_tmp,clcl,bgimgid; var gensh=0,sht,shi,shakes=20,interval=10; function dosh() { gensh++; shi=parseInt(Math.random()*15+5); popover.style.top=parseInt(popover.style.top)+shi; shadow.style.top=parseInt(shadow.style.top)+shi; eval("setTimeout('popover.style.left=parseInt(popover.style.left)+"+shi+"; shadow.style.left=parseInt(shadow.style.left)+"+shi+"', "+interval+");"); eval("setTimeout('popover.style.top=parseInt(popover.style.top)-"+shi+"; shadow.style.top=parseInt(shadow.style.top)-"+shi+"', 2*"+interval+");"); eval("setTimeout('popover.style.left=parseInt(popover.style.left)-"+shi+"; shadow.style.left=parseInt(shadow.style.left)-"+shi+"', 3*"+interval+");"); if(gensh >= shakes) { clearInterval(sht); } } function shake() { sht=setInterval('dosh()', 4*interval); } function move(e) { if(drag_it) { left_pos=NS6?a_pos+e.clientX-x_pos:a_pos+event.clientX-x_pos; popover.style.left=left_pos; top_pos=NS6?b_pos+e.clientY-y_pos:b_pos+event.clientY-y_pos-document.body.scrollTop; popover.style.top=top_pos+(NS6?0:document.body.scrollTop); shadow.style.left=left_pos+1; shadow.style.top=top_pos+(NS6?0:document.body.scrollTop)+1; return false; } } function drags_it(e) { if(!document.all&&!NS6) return; var drag_obj=NS6?e.target:event.srcElement; var topelement=NS6?"HTML":"BODY"; while(drag_obj.tagName!=topelement&&drag_obj.className!="label_drg") { drag_obj=NS6?drag_obj.parentNode:drag_obj.parentElement; } if (drag_obj.className=="label_drg") { drag_it=true; a_pos=parseInt(popover.style.left+0); b_pos=parseInt(popover.style.top+0); x_pos=NS6?e.clientX:event.clientX; y_pos=NS6?e.clientY:event.clientY; document.onmousemove=move; return false; } } function newpositions() { if(NS6) { popover.style.top = top_pos+window.pageYOffset; shadow.style.top = top_pos+window.pageYOffset+1; } else { popover.style.top = top_pos+d.body.scrollTop; shadow.style.top = top_pos+d.body.scrollTop+1; } popover.style.left = left_pos; shadow.style.left = left_pos+1; } function hide_it() { if(popover.style.left.substring(0,popover.style.left.length-2)
"); d.close(); } else { document.onmousedown=drags_it; document.onmouseup=new Function("drag_it=false"); d.write('
| Pruebalo hoy mismo! |
| ||
| |||