var iFrameTransparenteVisible=false; var mouse_xcoord=100, mouse_ycoord=100; var cTimeAjax; var cTimeAjaxShow; document.onmousemove = setCoord; function setCoord(e) { if( !e ) { e = window.event; } if( !e ) { return; } if( typeof( e.pageX ) == 'number' ) { mouse_xcoord = e.pageX; mouse_ycoord = e.pageY; } else if( typeof( e.clientX ) == 'number' ) { mouse_xcoord = e.clientX; mouse_ycoord = e.clientY; if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { mouse_xcoord += document.body.scrollLeft; mouse_ycoord += document.body.scrollTop; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { mouse_xcoord += document.documentElement.scrollLeft; mouse_ycoord += document.documentElement.scrollTop; } } else { return; } } function visualizaIframeTrans() { ajaxZonaFin(); iFrameTransparenteVisible=true; window.onscroll=frameTransPosiciona; window.onresize=frameTransPosiciona; frameTransPosiciona(); hideSelect(); } function hideSelect(){ for (j=0; jtamanioBody.x) ancho=tamanioBody.x-50; if ((alto+50)>tamanioBody.y) alto=tamanioBody.y-50; setTituloIframe(titulo); var divCapaiFrame = document.getElementById('capaiFrame'); var iFrame=document.getElementById('iframeTrans'); divCapaiFrame.style.width=ancho +'px'; divCapaiFrame.style.height=alto +'px'; iFrame.style.width=(ancho-0) +'px'; iFrame.style.height=(alto-55) +'px'; document.getElementById('tablaTransparenciaCierra').width=ancho + 'px'; loadIframeNT(sHREF,ancho,alto); } function loadIframeNT(sHREF, ancho, alto) { iFrameTransparenteVisible=true; parent.iframeTrans.location.href=sHREF; frameTransPosicionaNT(ancho,alto); hideSelect(); } function loadIframeTodo(sHREF,ancho, titulo) { var tamanioBody; var alto; tamanioBody=getAnchoVentana(); alto=tamanioBody.y-50; if ((ancho+50)>tamanioBody.x) ancho=tamanioBody.x-50; setTituloIframe(titulo); var divCapaiFrame = document.getElementById('capaiFrame'); var iFrame=document.getElementById('iframeTrans'); divCapaiFrame.style.width=ancho +'px'; divCapaiFrame.style.height=alto +'px'; iFrame.style.width=(ancho-0) +'px'; iFrame.style.height=(alto-55) +'px'; document.getElementById('tablaTransparenciaCierra').width=ancho + 'px'; loadIframeNT(sHREF,ancho,alto); } function getScrollXY() { var scroll = {x: 0, y: 0} if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant scroll.y = window.pageYOffset; scroll.x = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant scroll.y = document.body.scrollTop; scroll.x = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode scroll.y = document.documentElement.scrollTop; scroll.x = document.documentElement.scrollLeft; } return (scroll); } function frameTransPosicionaNT(ancho, alto) { var tamanioBody; var scroll; scroll=getScrollXY(); var divCapaiFrame = document.getElementById('capaiFrame'); tamanioBody=getAnchoVentana(); if (iFrameTransparenteVisible) { divCapaiFrame.style.display='block'; if ((mouse_xcoord + ancho +50) > tamanioBody.x-scroll.x) { divCapaiFrame.style.left = (tamanioBody.x - ancho -50 +scroll.x)+ 'px'; } else divCapaiFrame.style.left = (mouse_xcoord+20 +scroll.x) + 'px'; /* if ((mouse_ycoord + alto +50) > tamanioBody.y-scroll.y) { divCapaiFrame.style.top = (tamanioBody.y - alto -50)+ 'px'; } else divCapaiFrame.style.top = (mouse_ycoord+20) + 'px'; if (((mouse_xcoord -20 ) + ancho ) > tamanioBody.x) { divCapaiFrame.style.left = (tamanioBody.x - ancho +30)+ 'px'; } else divCapaiFrame.style.left = (mouse_xcoord+20) + 'px'; */ if (((mouse_ycoord -20 ) + alto - document.documentElement.scrollTop) > tamanioBody.y) { divCapaiFrame.style.top = (tamanioBody.y - alto -40 + scroll.y )+ 'px'; } else { if ((mouse_ycoord -180 )40) { iFrame.style.width=(tamanioBody.x-0) +'px'; divCapaiFrame.style.width=(tamanioBody.x-20) + 'px'; } if (tamanioBody.y40) { iFrame.style.height=(tamanioBody.y-75) +'px'; divCapaiFrame.style.height=(tamanioBody.y-40) + 'px'; } divCapaiFrame.style.left = ((parseInt(tamanioBody.x) - parseInt(divCapaiFrame.offsetWidth))/2 + parseInt(scroll.x) ) + 'px'; // + ((document.all)?document.body.scrollLeft:window.pageXOffset)*/) + 'px'; divCapaiFrame.style.top = ((parseInt(tamanioBody.y) - parseInt(divCapaiFrame.offsetHeight))/2 + parseInt(scroll.y)) + 'px'; //+ ((document.all)?document.body.scrollTop:window.pageYOffset)) + 'px'; } } function frameTransFin() { var divCapaTransparencia = document.getElementById('capaTransparencia'); var divCapaiFrame = document.getElementById('capaiFrame'); parent.iframeTrans.location.href='about:blank'; iFrameTransparenteVisible=false; showSelect(); divCapaTransparencia.style.display='none'; divCapaiFrame.style.display='none'; window.onscroll=''; window.onresize=''; } function getAnchoVentana() { var tamanio = {x: 800, y: 600} /* if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { tamanio.x = window.innerWidth-16; tamanio.y = window.innerHeight-16; } if (navigator.appName.indexOf("Microsoft")!=-1) { alert (document.documentElement.clientHeight); tamanio.x = document.body.offsetWidth-20; tamanio.y= document.body.offsetHeight-20; //tamanio.x = document.documentElement.clientWidth-20; tamanio.y= document.documentElement.clientHeight-20; } } */ return (tamanio); } function cargaHelpAjax(url, titulo) { try { var httpGetDatos=getHTTPObject(); if (httpGetDatos.readyState == 4 || httpGetDatos.readyState == 0) { var ajaxDiv; reposiciona_ajaxZona (mouse_xcoord, mouse_ycoord,500,350, titulo); httpGetDatos.open("GET",'/comun/help.asp?' + url + '&rand='+Math.floor(Math.random() * 1000000), true); httpGetDatos.onreadystatechange =function() { var results; var ajaxDiv; try { if (httpGetDatos.readyState == 4) { results = httpGetDatos.responseText; ajaxDiv=document.getElementById('ajaxZonaDatos'); if (ajaxDiv) { ajaxDiv.innerHTML=results; cTimeAjax=setTimeout('ajaxZonaFin()',5000); } } } catch (e) { } }; httpGetDatos.send(null); } } catch (e) { alert ('err:' +e.description); } } function cargaImgAjax(url, titulo, direct) { //cargaHelpAjax('fx=IMG&p=' + url,titulo); if (direct) { cargaHelpAjax('fx=IMG&p=' + url,titulo); } else { clearTimeout(cTimeAjaxShow); cTimeAjaxShow=setTimeout('cargaHelpAjax(\'fx=IMG&p=' + url +'\',\'' + titulo +'\');',600); } } function reposiciona_ajaxZona(x,y,tx,ty,titulo) { var ancho, alto; ancho=tx; alto=ty; if (isNaN(tx)) ancho=400; if (isNaN(ty)) alto=300; var capaAjax=document.getElementById('sp_ajaxZona'); var iframeAjaxDiv=document.getElementById('ajaxZona_iframediv'); var iframeAjax=document.getElementById('ajaxZona_iframe'); var capaAjaxDatos=document.getElementById('ajaxZonaDatos'); var zonatitulo=document.getElementById('P1_mini'); if (capaAjax && iframeAjax) { clearTimeout(cTimeAjax); capaAjax.style.width=ancho +'px'; capaAjax.style.height=(alto+30) +'px'; iframeAjax.style.width=(ancho+8) +'px'; iframeAjax.style.height=(alto+42) +'px'; iframeAjaxDiv.style.width=(ancho+8)+'px'; iframeAjaxDiv.style.height=(alto+42) +'px'; capaAjaxDatos.style.width=ancho +'px'; capaAjaxDatos.style.height=(alto) +'px'; if (titulo) zonatitulo.innerHTML=unescape(titulo); else zonatitulo.innerHTML=''; capaAjax.style.display='block'; iframeAjaxDiv.style.display='block'; capaAjax.style.top=y+20+'px'; capaAjax.style.left=x+'px'; iframeAjax.style.top=y+20 +'px'; iframeAjax.style.left=x+'px'; iframeAjaxDiv.style.top=y+20+'px'; iframeAjaxDiv.style.left=x+'px'; capaAjaxDatos.innerHTML='

'; } } function ajaxZonaFin() { clearTimeout(cTimeAjaxShow); var divCapaAjax = document.getElementById('sp_ajaxZona'); var divCapaiFrame = document.getElementById('ajaxZona_iframediv'); divCapaAjax.style.display='none'; divCapaiFrame.style.display='none'; }