var isNav, isIE, nVer = parseInt(navigator.appVersion.charAt(0));if (nVer >= 4) {isNav = (navigator.appName == "Netscape") ? 1 : 0;isIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;}var last = '';
function popup(id, est, n_t, id_l){var nome_obj = new Array("im_"+id, "im_"+id);larghezza = 4 * document.images[nome_obj[n_t]].width+10;altezza = 4 * document.images[nome_obj[n_t]].height+56;if ((isNav) && (nVer < 5)) altezza = altezza + 10;if (isNav) {altezza = altezza + 10;larghezza = larghezza + 15;}if (isIE) {altezza = altezza + 12;larghezza = larghezza + 15;}window.open('./popup_gallery.asp?l=' + id_l + '&n='+ n_t +'&id_g='+ id +'&e='+ est,'zoom','scrollbars=no,resizable=no,width='+larghezza+',height='+altezza+',top='+(screen.availHeight-altezza)/2+',left='+(screen.availWidth-larghezza)/2+',status=no,location=no,toolbar=no');}
function transac(nome,tipo){switch (tipo){case 0:if (nome!=last)  eval('document.'+nome+'.src=off'+nome+'.src');break;case 1:eval('document.'+nome+'.src=on'+nome+'.src');break;case 2:if ((nome!=last)&&(last!='')) eval('document.'+last+'.src=off'+last+'.src');eval('document.'+nome+'.src=on'+nome+'.src');last=nome;break;case 3:eval('document.'+last+'.src=off'+last+'.src');last='';break;default:alert("Errore!");}}
function trim(sString){sTrimmedString = "";if (sString != ""){var iStart = 0;var iEnd = sString.length - 1;var sWhitespace = " \t\f\n\r\v";while (sWhitespace.indexOf(sString.charAt(iStart)) != -1) {iStart++;if (iStart > iEnd) break;}if (iStart <= iEnd){ while (sWhitespace.indexOf(sString.charAt(iEnd)) != -1) iEnd--;sTrimmedString = sString.substring(iStart,++iEnd);}}return sTrimmedString;}
function s(str){window.open('./core/print/default.asp?'+str,'Print','scrollbars=yes,resizable=no,width=630,height=300,top='+(screen.availHeight-300)/2+',left='+(screen.availWidth-630)/2+',status=no,location=no,toolbar=no');}
function i(str){window.open('./core/print/default.asp?'+str,'Send','scrollbars=yes,resizable=no,width=300,height=300,top='+(screen.availHeight-300)/2+',left='+(screen.availWidth-300)/2+',status=no,location=no,toolbar=no');}
function check(nome_form){switch(nome_form){case "CAMOFORM": return check_form();break;case "LOGIN": return (check_input(nome_form,'user',0)&&check_input(nome_form,'pass',0));break;default: return check_input(nome_form,'ricerca',2);}}
function check_input(nome_form,nome_input,lmin) {if (document.forms[nome_form].elements[nome_input].value.length>lmin) return true; else return false;}
function post(nome_form){if (check(nome_form)) document.forms[nome_form].submit();}
function map(){window.open('skin/blanco/mappa.html','Mappa','width=623,height=438,top='+(screen.availHeight-438)/2+',left='+(screen.availWidth-623)/2+'');}
function refresh(){document.images["webcam"].src="http://www.riminidavivere.it/webcam/video.jpg?"+new Date();}
