function flashdetect()
	 {
         try{if ((navigator.appName=="Microsoft Internet Explorer")&&(navigator.appVersion.substring(0,1)>3)) 
                return FlashDetectIE()
              else 
                  return FlashDetectNS()
            }catch (errore_verificato){return false}	 
          }
    function FlashDetectIE() 
    { 
       try{var test=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6")}
         catch (errore_verificato){return false}
        if (test) 
            return true; 
         else
	    return false; 
		
     } 
    function FlashDetectNS() 
    { 
         if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) 
        { 
       	     if (navigator.plugins && navigator.plugins["Shockwave Flash"])
        	  return true; 
         } 
         else 
	          return false;
    } 

function popup(url,per_larg,per_alto,per_posx,per_posy)
  {
   try{
       var larg = screen.availWidth * per_larg;
       var alto = screen.availHeight* per_alto;
       var pos_x= (screen.availWidth -larg)* per_posx;
       var pos_y= ((screen.availHeight-alto)* per_posy);
       var status="alwaysRaised,dependent,titlebar=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,status=0"+",top="+pos_y+",left="+pos_x+",height="+alto+",width="+larg
       if (flashdetect())
          var pop = window.open(url,'popup1',status);
       return true;
       }catch(errore){return false}
     }
