function controlla_browser(preventivo, pagina)
{
	var browser_type=navigator.appName 
	var browser_version=parseInt(navigator.appVersion) 
//	alert(browser_type);
	//se IE 4 o superiore 
	if (browser_type=="Microsoft Internet Explorer" && browser_version>=4) 
	{
		if (pagina)
		{
			window.location.replace(pagina);
		}
	}
	//se tutti gli altri superiore 
	else if(browser_type=="Netscape" && browser_version>=4) 
	{
		if (pagina)
		{
			alert("Attenzione. L'accesso al preventivo è possibile solo attraverso i browser \nMicrosoft Internet Explorer release 5.x o superiore.");
		}
		else
		{
			window.location.replace("../../preventivi_ns.asp?preventivo=" + preventivo);
		}
	}
	else
	{
		if (pagina)
		{
			alert("Attenzione. L'accesso al preventivo è possibile solo attraverso i browser \nMicrosoft Internet Explorer release 5.x o superiore.");
		}
		else
		{
			window.location.replace("../../preventivi_ns.asp?preventivo=" + preventivo);
		}
	}
}

function replaceWindowURL( win, url )
{
    win.location.replace( url );
}


function doFrames()
{
    if ( top == self )
    {
  		var browser_type=navigator.appName 
  		var browser_version=parseInt(navigator.appVersion) 
  		if (browser_type=="Microsoft Internet Explorer" && browser_version>=4) 
  		{
  			var homeURL = "/index_ie.html";
  		}
  		else
  		{
  			var homeURL = "/index_ns.html";
  		}
      var thisURL = String(this.location);
      var check=thisURL.indexOf('http://www.realemutua.it/');      
      if (check!=0){
        thisURL="mappa/mappa.asp?sect=nofound";        
      }
            
      var url = homeURL + "?" + thisURL;
      replaceWindowURL( top, url );
    }
}
if ( top == self  && "MSIE" == navigator.appName )
    doFrames();


sotto_root= "";

function test_loc()

{
//var browser_type=navigator.appName 
//var browser_version=parseInt(navigator.appVersion) 
//se IE 4 o superiore 
//if (browser_type=="Microsoft Internet Explorer" && browser_version>=4) 
//{
	var percorso;
	percorso=(document.links[0].pathname);
//	alert(percorso);
	var indice;
	indice=percorso.indexOf('/');

	if (indice == -1)
		{
		  sotto_root = "";
		  return;
		}
//}
//se tutti gli altri superiore 
//else (browser_type=="Netscape" && browser_version>=4) 
//{
//window.location.replace("index_firefox.html") 
//}

}
doFrames();

