
function ee(id){if(document.getElementById)return document.getElementById(id);if(document.all)return document.all[id];}
function ef(f,id){if(f){if(f.window.document.getElementById)return f.window.document.getElementById(id);if(f.window.document.all)return f.window.document.all[id];}}
function efr(f,id){return document.forms[f].elements[id];}
function efw(f,id,m){var t=ef(f,id);if(t)if(typeof(t)=="object")t.innerHTML=m;}
function Fire(p){if((p)&&(p!="")){e=efr('form1','FireParam');if(e)e.value=p;__doPostBack('FireLink','');}}
function Modal(f){var retval="";retval=window.showModalDialog(f,'','dialogWidth:800px;dialogHeight:675px;status:no;dialogHide:true;help:no;scroll:yes');}
function Wind1(f){win=window.open(f,"dsW","width=800,height=800,resizable=yes,scrollbars=yes,menubar=no");win.focus();}
function Wind2(f){win=window.open(f,"dsW","top=50,left=350,width=540,height=640,resizable=yes,scrollbars=yes,menubar=no");win.focus();}
function WindP(f){win=window.open(f,"dsW","width=697,height=800,resizable=yes,scrollbars=yes,menubar=no");win.focus();}var filtroEmail=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
function esEmail(E){if(E.trim=="")return(false);return filtroEmail.test(E);}
function valoriHead(tipo,fam,sta){var f=parent.frames['topFrame'];if(typeof(f)=="object"){efw(f,'Tipologia',tipo);efw(f,'Famiglia',fam);var t=ef(f,'imgDownloadFam');if(t)if(typeof(t)=="object"){if(fam==''){t.src='immagini/spazio1.gif';}else{t.src='immagini/DownloadFam.gif';}}t=ef(f,'imgStampa');if(t)if(typeof(t)=="object"){t.alt=sta;t.src='immagini/Stampa.gif';}}}
function AssegnaScroll(){try{var y=efr('form1','scrollTop').value;if(y>0)window.scrollTo(0,y);}catch(e){}}
function LeggeScroll(){var y;if(document.all){if(!document.documentElement.scrollTop)y=document.body.scrollTop;else y=document.documentElement.scrollTop;}else y=window.pageYOffset;try{efr('form1','scrollTop').value=y;}catch(e){}}
function rowOn(id){var row=ee(id);row.className=='trOn';}
function rowOff(id){ee(id).className=='TROn';}
function addEvent(n,e,evento){var a=new Function("exe",evento);try{if(n.addEventListener)n.addEventListener(e,a,false);else if(n.attachEvent)n.attachEvent("on"+e,a);}catch(e){}}
function autoInizioR9(){if(!document.getElementById||!document.getElementsByTagName||!document.createElement)return false;addEvent(window,"load","inizioR9()");}var doneR9=false;var valoreCerca;
function inizioR9(){if(!doneR9){valoreCerca=ee(CercaControlID).value;addEvent(ee(CercaControlID),"focus","inputClickedR9()");addEvent(ee(CercaControlID),"blur","inputBlurR9()");}doneR9=true;}
function inputBlurR9(){if(ee(CercaControlID).value==""){ee(CercaControlID).value=valoreCerca;}}
function inputClickedR9(){if(ee(CercaControlID).value==valoreCerca){ee(CercaControlID).value="";}}
function inputEnterR9(thisobj,e){var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13){onCercaR9();inputClickedR9();return false;}else return true;}
function onCercaR9(){var cerca=ee(CercaControlID).value;if((cerca==valoreCerca)||(cerca=="")){}else {ee(CercaControlID).value=valoreCerca;if(Contesto!='2'){MasterFire('!'+cerca);}else{var v='prodList.aspx?'+cerca;var f=parent.frames['mainFrame'];f.location.href=v;}}}
function imrsR9(){var f=parent.frames['topFrame'];var img=ef(f,"imgRicerca");if(img)img.select();}
function classe(id,classOff){ee(id).className=classOff;}
function scrollbarWidth(){document.body.style.overflow='hidden';var width=document.body.clientWidth;document.body.style.overflow='scroll';width-=document.body.clientWidth;if(!width)width=document.body.offsetWidth-document.body.clientWidth;document.body.style.overflow='';return width;}
function inputEnterVai(thisobj,e){var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13){Fire('Vai');return false;}else return true;}
