<!-- 

// VERIFICA NOME,COGNOME,CITTA
function isName(what, message)
{
   if (what.name.substring(0,3)=="ck_" && what.value=='') { 
   //what.focus();
   alert(message);
   return false}
   else {  
   var i=new RegExp("[^a-zA-Z\u0020\u0027\u0041-\u005A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\uFFFF]");
   if(i.test(what.value)) {
    //what.focus();
	alert(message);
	return false}   
   return true;
   }
}

// VERIFICA PASSWORD
function isPassword(what,message)
{
   if (what.name.substring(0,3)=="ck_" && what.value=='') { 
   //what.focus();
   alert(message);
   return false}
   else { 
   var i=new RegExp("([a-zA-Z0-9]{8,15})");
   if(!i.test(what.value)) {
   //what.focus();
   alert(message);
   return false}   
   return true;
   }
}


// VERIFICA URL
function isURL(what,message)
{
   if (what.name.substring(0,3)=="ck_" && what.value=='') { 
   //what.focus();
   alert(message);
   return false}
   else { 
   var i=new RegExp("^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,4}(/\S*)?$","gi");
   if(!i.test(what.value)) {
   //what.focus();
   alert(message);
   return false}   
   return true;
   }
}

// VERIFICA CAP
function isCAP(what,message)
{
   if (what.name.substring(0,3)=="ck_" && what.value=='') { 
   //what.focus();
   alert(message);
   return false}
   else { 
   var i=new RegExp("^[0-9]{5}$");
   if(!i.test(what.value)) {
   //what.focus();
   alert(message);
   return false }   
   return true;
   }
}

// VERIFICA Indirizzo
function isAddress(what,message)
{
   if (what.name.substring(0,3)=="ck_" && what.value=='') { 
   //what.focus();
   alert(message);
   return false}
   else { 
   var i=new RegExp("([a-zA-Z0-9\ ]{3,})");
   if(!i.test(what.value)) { 
   //what.focus();
   alert(message);
   return false }
   return true;
   }
}

// VERIFICA Data di nascita
function isDate(what,message)
{
   if (what.name.substring(0,3)=="ck_" && what.value=='') { 
   //what.focus();
   alert(message);
   return false}
   else { 
   var i=new RegExp("^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})$");
   if(i.test(what.value))
   {
	datePart=what.value.split("/");
	giorno=(datePart[0]>=1) && (datePart[0]<=31);
	mese=(datePart[1]>=1) && (datePart[1]<=12);
	anno=(datePart[2]>=1900) && (datePart[2]<=9999);

	if(!giorno || !mese || !anno) { 
	//what.focus();
	alert(message);
	 return false
	 }
	
   }  
   else
   {
	//what.focus();
	 alert(message);
	 return false
   }
   return true;
   }
}

function checklenght(campo,valoremin,message){
		 if(campo.value.length<valoremin) {
		 s_ = message;
		// s_ = s_.replace('%n%', valoremin);
		// campo.focus();
		 alert(s_);
		 return false;
		 }
		 else
		 return true;
}

function onlynumber(obj,msg) {
	n = obj.value;
	RE = /\D/ 
	if (RE.test(n)) {
		//obj.focus();
		alert(msg);
		return false;
	}
	return true;
}

function checkEmail(what,message) {
var value= what.value
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(value)){
return true;
}
//what.focus();
alert(message);
return false;
}



function openPhotoWnd(sFilename, iWidth, iHeight){
sOption= 'width='+iWidth+',height='+iHeight+',toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no, top=100, left=100';
wndRef=window.open(sFilename,'_blank', sOption);
} 


function openPhotoWnd1(sFilename, iWidth, iHeight){
sOption= 'width='+iWidth+',height='+iHeight+',toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=no, top=100, left=100';
wndRef=window.open(sFilename,'_blank', sOption);
}


function openpopup(sFilename, iWidth, iHeight){
sOption= 'width='+iWidth+',height='+iHeight+',toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no, top=100, left=100';
wndRef=window.open(sFilename+'&popup=1','_blank', sOption);
}

function openpopup1(sFilename, iWidth, iHeight){
sOption= 'width='+iWidth+',height='+iHeight+',toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=no, top=100, left=100';
wndRef=window.open(sFilename+'&popup=1','_blank', sOption);
}


function stampa() {
window.print();
}

function openPhotoWnd2(sFilename, iWidth, iHeight){
sOption= 'width='+iWidth+',height='+iHeight+',toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes, top=100, left=100';
wndRef=window.open(sFilename,'_blank', sOption);
}


function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function setContent() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentElement = document.getElementById('introflash');
			var contentHeight = contentElement.offsetHeight;
			if (windowHeight - contentHeight > 0) {
				contentElement.style.position = 'relative';
				contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
			}
			else {
				contentElement.style.position = 'static';
			}
		}
	}
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		//alert('windowHeight '+windowHeight)
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('rightbox').offsetHeight;
			//alert('contentHeight '+contentHeight);
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			//alert('footerHeight '+footerHeight);
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.top = (windowHeight - footerHeight) + 'px';
			//alert('windowHeight - footerHeight '+(windowHeight - footerHeight) + 'px');
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}





-->

