var mpDone=false;var _foregroundElement1;var _foregroundElement2;var _backgroundElement;
function autoInizio(){if(!document.getElementById||!document.getElementsByTagName||!document.createElement)return false;addEvent(window,"load","inizio()");}
function inizio(){if(!mpDone){_backgroundElement=document.createElement('div');_backgroundElement.style.display='none';_backgroundElement.style.position='absolute';_backgroundElement.style.zIndex=10000;_backgroundElement.className=BackgroundCssClass;addEvent(_backgroundElement,"click","_hide()");addEvent(window,"resize","_layout()");addEvent(window,"scroll","_layout()");_foregroundElement1=ee(PopupControlID1);_foregroundElement1.parentNode.appendChild(_backgroundElement);_foregroundElement1.style.display='none';_foregroundElement1.style.position='absolute';_foregroundElement1.style.zIndex=_backgroundElement.style.zIndex+1;_foregroundElement2=ee(PopupControlID2);_foregroundElement2.parentNode.appendChild(_backgroundElement);_foregroundElement2.style.display='none';_foregroundElement2.style.position='absolute';_foregroundElement2.style.zIndex=_backgroundElement.style.zIndex+1;}mpDone=true;}
function _hide(){if(mpDone){_backgroundElement.style.display='none';_foregroundElement1.style.display='none';_foregroundElement2.style.display='none';event.returnValue=false;}return false;}
function LoginTecnosteel(FocusControlID){if(mpDone){_backgroundElement.style.display='';_foregroundElement1.style.display='';_layout();_layout();ee(FocusControlID).select();}}
function _layout(){var scrollLeft=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);var scrollTop=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);var clientWidth;if(window.innerWidth){clientWidth=(window.__safari?window.innerWidth:Math.min(window.innerWidth,document.documentElement.clientWidth));}else{clientWidth=document.documentElement.clientWidth;}var clientHeight;if(window.innerHeight){clientHeight=(window.__safari?window.innerHeight:Math.min(window.innerHeight,document.documentElement.clientHeight));}else{clientHeight=document.documentElement.clientHeight;}_backgroundElement.style.left=scrollLeft+'px';_backgroundElement.style.top=scrollTop+'px';_backgroundElement.style.width=clientWidth+'px';_backgroundElement.style.height=clientHeight+'px';_foregroundElement1.style.left=scrollLeft+((clientWidth-_foregroundElement1.offsetWidth)/2)+'px';_foregroundElement1.style.top=scrollTop+((clientHeight-_foregroundElement1.offsetHeight)/2)+'px';}
function InputLingua(tr){if(mpDone){_backgroundElement.style.display='';_foregroundElement2.style.display='';_layoutLingua(tr);_layoutLingua(tr);}}
function _layoutLingua(tr){var scrollLeft=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);var scrollTop=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);var clientWidth;if(window.innerWidth){clientWidth=(window.__safari?window.innerWidth:Math.min(window.innerWidth,document.documentElement.clientWidth));}else{clientWidth=document.documentElement.clientWidth;}var clientHeight;if(window.innerHeight){clientHeight=(window.__safari?window.innerHeight:Math.min(window.innerHeight,document.documentElement.clientHeight));}else{clientHeight=document.documentElement.clientHeight;}_backgroundElement.style.left=scrollLeft+'px';_backgroundElement.style.top=scrollTop+'px';_backgroundElement.style.width=clientWidth+'px';_backgroundElement.style.height=clientHeight+'px';_foregroundElement2.style.left=scrollLeft+((clientWidth-_foregroundElement2.offsetWidth)/2)+'px';_foregroundElement2.style.top=scrollTop+((clientHeight-_foregroundElement2.offsetHeight)/2)+'px';}
function findPosX(obj){var curleft=0;if(obj.offsetParent)while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent)break;obj=obj.offsetParent;}else if(obj.x)curleft+=obj.x;return curleft;}
