<!--

var loc = window.location.href.substring(0,window.location.href.lastIndexOf("/")+1);
var oldimg = false;

 function isBlank(val){
	if(val==null){return true;}
	for(var i=0;i<val.length;i++) {
		if ((val.charAt(i)!=' ')&&(val.charAt(i)!="\t")&&(val.charAt(i)!="\n")&&(val.charAt(i)!="\r")){return false;}
		}
	return true;
	}

function tcheck(val){
	if (isBlank(val)){return false;}
	for(var i=0;i<val.length;i++){
		if(!isDigit(val.charAt(i))){
			 alert("La preghiamo di inserire un numero di telefono valido");
			return false;
			}
		}
	return true;
	}


function isDigit(num) {
	if (num.length>1){return false;}
	var string="1234567890";
	if (string.indexOf(num)!=-1){return true;}
	return false;
	}



function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}




function validate_form2 ()
{
    valid = true;  

    if ( document.kontakt.realname.value == "" )
    {
        alert (  "La preghiamo di inserire: il suo Nome" );
      document.kontakt.realname.value="";
		document.kontakt.realname.focus();
        valid = false;
    } else if ( document.kontakt.name_p.value == "" )
    {
        alert (  "La preghiamo di inserire: il suo Cognome" );
		document.kontakt.name_p.value="";
		document.kontakt.name_p.focus();
        valid = false;
    } else if ( document.kontakt.telefon_n.value == "" )
    {
        alert (  "La preghiamo di inserire: il suo telefono" );
				document.kontakt.telefon_n.value="";
		document.kontakt.telefon_n.focus();
        valid = false;
    }else if  (tcheck(document.kontakt.telefon_n.value)==false){
		document.kontakt.telefon_n.value="";
		document.kontakt.telefon_n.focus();
		return false
	}
    return valid;
}
 


function validate_form ()
{
    valid = true;  

    if ( document.kontakt.realname.value == "" )
    {
        alert (  "La preghiamo di inserire: il suo Nome" );
      document.kontakt.realname.value="";
		document.kontakt.realname.focus();
        valid = false;
    } else if ( document.kontakt.name_p.value == "" )
    {
        alert (  "La preghiamo di inserire: il suo Cognome" );
		document.kontakt.name_p.value="";
		document.kontakt.name_p.focus();
        valid = false;
    } else if ( document.kontakt.email.value == "" )
    {
        alert (  "La preghiamo di inserire: il suo Email" );
				document.kontakt.email.value="";
		document.kontakt.email.focus();
        valid = false;
    }else if  (echeck(document.kontakt.email.value)==false){
		document.kontakt.email.value="";
		document.kontakt.email.focus();
		return false
	}
    return valid;
}
 

function getstyle(was) { 
 
	if ( !was ) was='';
	if (navigator.appName=="Netscape" || navigator.appName=="Opera") {
		
		document.writeln("<link rel='stylesheet' type='text/css' href='"+loc+"/css/mozilla"+was+".css'>");
	} else {
		document.writeln("<link rel='stylesheet' type='text/css' href='"+loc+"/css/explorer"+was+".css'>");
	}
}



function SetMiddle() {
	
	if (navigator.appName!="Microsoft Internet Explorer") {
		if ( navigator.appName=="Netscape" ) {
			var fhoehe=self.innerHeight;
			var newheight = fhoehe-150;
			var middleheight=document.getElementById("holder").offsetHeight-149;
			if ( document.getElementById("holder").offsetHeight >= fhoehe) {
			    document.getElementById("contents").style.height = middleheight+"px";
			} else {
				document.getElementById("contents").style.height = newheight+"px";
			}
		} else {
			var fhoehe=self.innerHeight;
			var middleheight=document.getElementsByTagName('div')[0].offsetHeight;
			if ( middleheight >= fhoehe) {
			    document.getElementById("contents").style.height = (middleheight-130)+"px";
			} else {
				document.getElementById("contents").style.height = (fhoehe-100)+"px";
			}
		}
	} else {
		var fhoehe=document.body.clientHeight;
		var newheight = fhoehe-146;
		document.getElementById("contents").style.height = newheight;
	}
}

function centerwindow(file,winname,fwidth,fheight,scrolling,resizeable){
  var win = null;
  var winl = (screen.width-fwidth)/2;
  var wint = (screen.height-fheight)/2;
  var settings  ='height='+fheight+',';
      settings +='width='+fwidth+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scrolling+',';
      settings +='resizable='+resizeable+'';
  win=window.open(file,winname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

 var bilder=new Array(  'images/5.jpg','images/1.jpg',
           'images/2.jpg','images/3.jpg','images/4.jpg','images/5.jpg','images/0.jpg'  );
           

 var intervall=6000;
 var bildzaehler=0;


	 
function diashow () {
	if (!(document.images)) {return;}
	
 
						 					 
	 
	
	 setTimeout(" document.bild.src= 'images/naturax_rote.gif'",5300);
		
	 document.bild.src=bilder[bildzaehler++];
	 
	
													 
	   
	 if (bildzaehler == bilder.length) { bildzaehler = 0; }
	 setTimeout("diashow();",intervall);
}

function showimg(was) {
	if ( oldimg ) document.getElementById(oldimg).style.visibility='hidden';
	if ( was ) document.getElementById(was).style.visibility='visible';
	oldimg = was;
}
 

-->