//alternativa al target _blank STRICT
function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 

window.onload = externalLinks;

function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}

function go(loc) {
	window.location.href = loc;
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function resetTXT(control)
{
	control.value=0;
	document.Ordina.submit();
}

function setTXT()
{
	document.Ordina.submit();
}

function controlla_cfisc()
   {
   cod=document.dati_ordine.cfiscale.value.toLowerCase();
   check=true;
   if (cod.length!=16)
	  check=false
	  else
	  {
	  lettere=cod.substr(0,6)+cod.substr(8,1)+cod.substr(11,1)+cod.substr(15);
	  numeri=cod.substr(6,2)+cod.substr(9,2)+cod.substr(12,3);
	  for (i=0;i<10;i++)
		 if (lettere.charCodeAt(i)<97 || lettere.charCodeAt(i)>122)
			check=false;
	  for (i=0;i<8;i++)
		 if (numeri.charCodeAt(i)<48 || numeri.charCodeAt(i)>57)
			check=false;
	  }
 if (check==false){
		alert("Controlla di aver inserito correttamente il codice fiscale")
		return false		  
	}
   }

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//-->