
var ua = window.navigator.userAgent;
var msie = ua.indexOf ( "MSIE " );
if ( msie > 0 ) var ver=parseInt(ua.substring (msie+5, ua.indexOf (".", msie )));
if (ver<6)location.href = "avviso.php";


if (screen.width < 1024) location.href = "avviso.php";
var agt=navigator.userAgent;
      if((agt.search("Safari")!=-1) && (agt.search("Windows")!=-1)) document.write("<style type='text/css'>@import url(../public/style/safari.css);</style>");
else if ((agt.search("Safari")!=-1) && (agt.search("Macintosh")!=-1))  document.write("<style type='text/css'>@import url(../public/style/safari_mac.css);</style>");
else if ((agt.search("Firefox")!=-1) && (agt.search("Windows")!=-1))  document.write("<style type='text/css'>@import url(../public/style/firefox.css);</style>");
else if ((agt.search("Firefox")!=-1) && (agt.search("Macintosh")!=-1)) document.write("<style type='text/css'>@import url(../public/style/firefox_mac.css);</style>");
else if (agt.search("MSIE 6")!=-1) document.write("<style type='text/css'>@import url(../public/style/ie_6.css);</style>");

var safari=navigator.userAgent;
var index= safari.indexOf("Safari");
if (index!=-1) 
   {var build_ver = safari.substring(index+7,index+10);
    if (build_ver<400)window.location = "avviso.php";
   }


var newwindow = '';

function NewWindow(mypage,myname,w,h,scroll,pos) {
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';

        if (!newwindow.closed && newwindow.location) {
                newwindow.close();
                newwindow=window.open(mypage,myname,settings);
                //newwindow.location.href = mypage;
	}
	else {
		newwindow=window.open(mypage,myname,settings);
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}

