var is_mobi = 0;       if ( window.location.hostname.indexOf("beachcomberinvenice.mobi") !=-1 ) {  is_mobi = 1; }
var is_paradise=0;   if ( window.location.hostname.indexOf("paradiseonthegulf.com") !=-1 ) { is_paradise=1; }
var is_hotels=0;       if ( window.location.hostname.indexOf("venicehotels.us") !=-1 )  { is_hotels=1; }
var is_timeshare=0; if ( window.location.hostname.indexOf("timesharebydefault.com") !=-1 )  {  is_timeshare=1; }

test4redirect(0);  /* 0=root, 1=develop 2=test, 3=other non-vr synonym, 5=vr synonym */
function test4redirect(dir) { 
	if ( window.location.hostname.indexOf("beachcomberinvenice.mobi") !=-1 ) { window.location="./mobi/index.html"; }
	if ( window.location.hostname.indexOf("paradiseonthegulf.com") !=-1 ) { window.location="./ParadiseOnTheGulf/Beachcomberinvenice/ParadiseOnTheGulf.php" ; }
	if ( window.location.hostname.indexOf("paradiseongulf.com") !=-1 ) { window.location="./ParadiseOnTheGulf/Beachcomberinvenice/ParadiseOnTheGulf.php" ; }
	if ( window.location.hostname.indexOf("venicehotels.us") !=-1 )  { window.location="./ParadiseOnTheGulf/Beachcomberinvenice/ParadiseOnTheGulf.php?msg=hotel" ; }
	if ( window.location.hostname.indexOf("timesharebydefault.com") !=-1 )  { window.location="./ParadiseOnTheGulf/Beachcomberinvenice/ParadiseOnTheGulf.php?msg=ts" ; }
}
///////////////////////////// Detect the browsername //////////////////////////////////////////////////////
  browsername=navigator.appName;

  //alert("HEAD: " + navigator.appName + " " + navigator.appVersion + " "); 

		if (browsername.indexOf("Netscape")!=-1)     {browsername="NS" }
        else
          {if (browsername.indexOf("Microsoft")!=-1) {browsername="MSIE" }
           else										 {browsername="other"}};
//Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 
//             (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13  
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;  
  
// Detect the browserversion
  browserversion="0"
  if (navigator.appVersion.indexOf("2.")!=-1) {browserversion="2"};
  if (navigator.appVersion.indexOf("3.")!=-1) {browserversion="3"};
  if (navigator.appVersion.indexOf("4.")!=-1) {browserversion="4"};
  if (navigator.appVersion.indexOf("5.")!=-1) {browserversion="5"};
  if (navigator.appVersion.indexOf("6.")!=-1) {browserversion="6"};
  if (navigator.appVersion.indexOf("7.")!=-1) {browserversion="7"};
  if (navigator.appVersion.indexOf("8.")!=-1) {browserversion="8"};
 
  var wot='';
  if (browsername != "MSIE") {
      wot ='<a href="http://www.mywot.com/" class="wot-badge wot-badge-80x30">';
      wot+=	'<img src="http://api.mywot.com/widgets/images/badge80x30.png" height=28 style="border: 0" alt="Free Internet Security - WOT Web of Trust" /></a>';
      wot+='<script type="text/javascript" src="http://api.mywot.com/widgets/badge.js"></script>';	}

  var url;
  var winprops = "height=500,width=500,location=no,scrollbars=no,"
				+ "menubars=no,toolbars=no,resizable=yes";
////////////////////////////////////// buttons ///////////////////////////////////////////////////
if (document.images) {
   var button1_out  = new Image();  button1_out.src   = "./img/btnF_0.png";  
   var button2_out  = new Image();  button2_out.src   = "./img/btnP_0.png";  
   var button3_out  = new Image();  button3_out.src   = "./img/btnA_0.png";  
   var button4_out  = new Image();  button4_out.src   = "./img/btnR_0.png";  
   var button1_over = new Image();  button1_over.src  = "./img/btnF_1.png";
   var button2_over = new Image();  button2_over.src  = "./img/btnP_1.png";
   var button3_over = new Image();  button3_over.src  = "./img/btnA_1.png";
   var button4_over = new Image();  button4_over.src   = "./img/btnR_1.png";  
}
function btn_out(x) {
if (document.images) { if      (x==1) document.image1.src = button1_out.src; 
                       else if (x==2) document.image2.src = button2_out.src; 
                       else if (x==3) document.image3.src = button3_out.src; 
                       else if (x==4) document.image4.src = button4_out.src; }
return true;
}
function btn_over(x) { 
//alert(x);
if (document.images) { if      (x==1) document.image1.src = button1_over.src; 
                       else if (x==2) document.image2.src = button2_over.src; 
                       else if (x==3) document.image3.src = button3_over.src;
                       else if (x==4) document.image4.src = button4_over.src; }
return true;
}
////////////////////////////////////// pictures ///////////////////////////////////////////////////
if (document.images) {
   var pic102_out     = new Image();  pic102_out.src   = "./img/fromBeach.jpg"; //"./img/postcard.jpg";  
   var pic102_over    = new Image();  pic102_over.src   = "./img/bcGulfScape.jpg";  
}
function pic_out(x) {
if (document.images) { if  (x==102) document.image102.src = pic102_out.src; 
}
return true;
}
function pic_over(x) { 
//alert(x);
if (document.images) { if  (x==102) document.image102.src = pic102_over.src; 
}
return true;
}
