/*
 * Questi li uso per aprire il popup con gli allegati
 *
 */
 
  var popup=null;

  function closePopup(){
           if(popup!=null)
              popup.close();
  }
  
  function dettagliaAl(id){
           popup=window.open("../allegato/" +id ,"Dettaglio", "width=600,height=500,menubar=no,scrollbars=yes,resizable=yes");
  }
  
  function dettagliaEx(id){
                popup=window.open("../excel/" +id ,"Dettaglio","width=600,height=500,menubar=no,scrollbars=yes,resizable=yes");
  }
  
  function dettagliaUplo(id){
           popup=window.open("../allegato/" +id ,"Dettaglio", "width=600,height=500,menubar=yes,tollbar=yes,scrollbars=yes,resizable=yes");
  }
  
  function dettagliaImg(id){
                popup=window.open("../images/" +id ,"Dettaglio","menubar=no,scrollbars=yes,resizable=yes");
  }
  
  function Controlla(stringa)
	{
    var myregexp = /^[a-zA-Z0-9]+$/;
    if (myregexp.test(stringa) == false)
    {
        alert("Sono ammessi solamente caratteri alfabetici minuscoli o maiuscoli oppure numeri.");
        return "";
    }
    else
    {
        return stringa;
    }
}

	function Redirect(stringa)
	{
	alert("Redirezione alla pagine : "+stringa);
	location.replace(stringa);
	}
	
	function openOrdine(url) {
    var pluto = url;
      popup=window.open( pluto ,'popup','width=800,height=500,scrollbars=yes,resizable=yes');
   }

  
  
  
  