window.defaultStatus = ' Pi.Emme Medical - Forniture ospedaliere, vendita e assistenza tecnica'; 

function fullScreen(str) {
        searchWin = window.open(str,'fullScreen','scrollbars=no,resizable=no,width=800,height=600,status=no,location=no,toolbar=no');
//        searchWin.refer = self;
}
function nccview(str) {
        searchWin = window.open(str,'nccview','scrollbars=yes,resizable=no,width=640,height=480,status=no,location=no,toolbar=no');
//        searchWin.refer = self;
}
var win = null; 
function NewWindow(mypage,myname,w,h,scroll){ 
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; 
TopPosition = (screen.height) ? (screen.height-h)/2 : 0; 
settings = 
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no' 
win = window.open(mypage,myname,settings) 
} 

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

// Initialize DHTML Toggle DIV
function switchMenu(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != "none" ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}

function controlla() {
     var Nome = document.info.nome.value;
     var Cognome = document.info.cognome.value;
     var Job = document.info.job.value;
     var Indirizzo = document.info.indirizzo.value;
     var Cap = document.info.cap.value;
     var City = document.info.city.value;
     var Provincia = document.info.provincia.value;
     var Tel = document.info.telefono.value;
     var Email = document.info.email.value;
     var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;

        if ((Nome == "") || (Nome == "undefined")) {
           alert("Il campo Nome è obbligatorio.");
           document.info.nome.focus();
           return false;
        }
        else if ((Cognome == "") || (Cognome == "undefined")) {
           alert("Il campo Cognome è obbligatorio.");
           document.info.cognome.focus();
           return false;
        }
        else if ((Job == "") || (Job == "undefined")) {
           alert("Il campo Professione è obbligatorio.");
           document.info.job.focus();
           return false;
        }
        else if ((Indirizzo == "") || (Indirizzo == "undefined")) {
           alert("Il campo Indirizzo è obbligatorio.");
           document.info.indirizzo.focus();
           return false;
        }
        else if ((Cap == "") || (Cap == "undefined")) {
           alert("Il campo C.A.P. è obbligatorio.");
           document.info.cap.focus();
           return false;
        }
        else if ((Provincia == "") || (Provincia== "undefined")) {
           alert("Il campo Provincia è obbligatorio.");
           document.info.provincia.focus();
           return false;
        }
        else if ((City == "") || (City == "undefined")) {
           alert("Il campo Città è obbligatorio.");
           document.info.city.focus();
           return false;
        }
        else if ((Tel == "") || (Tel == "undefined")) {
           alert("Il campo Telefono è obbligatorio.");
           document.info.telefono.focus();
           return false;
        }
        else if ((Email == "") || (Email== "undefined")) {
           alert("Il campo Email è obbligatorio.");
           document.info.email.focus();
           return false;
        }
        else if (!email_reg_exp.test(Email) || (Email== "") || (Email== "undefined")) {
           alert("Inserire un indirizzo Email corretto.");
           document.info.email.select();
           return false;
		}
	}
