
//function BrowserCheck() {
//	var b = navigator.appName
//	if (b=="Netscape") this.b = "ns"
//	else if (b=="Microsoft Internet Explorer") this.b = "ie"
//	else this.b = b
//	this.v = parseInt(navigator.appVersion)
//	this.ns = (this.b=="ns" && this.v>=4)
//	this.ns4 = (this.b=="ns" && this.v==4)
//	this.ns5 = (this.b=="ns" && this.v==5)
//	this.ie = (this.b=="ie" && this.v>=4)
//	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
//	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
//	if (this.ie5) this.v = 5
//	this.min = (this.ns||this.ie)
//}
//is = new BrowserCheck()

var Mac = navigator.platform == "MacPPC";
var agt = navigator.userAgent.toLowerCase(); 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 

var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
var is_nav4 = (is_nav && (is_major == 4)); 
var is_nav4up = (is_nav && (is_major >= 4)); 
var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
var is_nav5 = (is_nav && (is_major == 5)); 
var is_nav6 = (is_nav && (is_major == 5));
var is_nav7 = (agt.indexOf("netscape/7")!=-1);
var is_nav5up = (is_nav && (is_major >= 5)); 

var is_ie   = (agt.indexOf("msie") != -1); 
var is_ie3  = (is_ie && (is_major < 4)); 
var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
var is_ie4up = (is_ie  && (is_major >= 4)); 
var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
var is_ie5up = (is_ie  && !is_ie3 && !is_ie4); 
var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") != -1) );
var is_mac = (agt.indexOf("mac")!=-1);
var is_aol = (agt.indexOf("aol") != -1);
var mac_adj_IE5 = 0; 


function ResizeMe() {
		document.location.href = document.location.href;
    }

function findWH() {
 if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    winW = window.innerWidth;
	    winH = window.innerHeight;
	  } else {
	    if( document.documentElement &&
	        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	      //IE 6+ in 'standards compliant mode'
	      winW = document.documentElement.clientWidth;
	      winH = document.documentElement.clientHeight;
	    } else {
	      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	        //IE 4 compatible
	        winW = document.body.clientWidth;
	        winH = document.body.clientHeight;
	      }
	    }
	  }
	 
}

function SwitchTheImage(sImage, sNewImage, LayerName) { 
	if (document.layers) {			
		document.layers['divRoot'].document.images[sImage].src = sNewImage;					
	} else {
		document.images[sImage].src = sNewImage; 
	}
}

function NSfx(sImage, sNewImage, LayerName) {
	//document.layers[3].document.images[sImage].src = sNewImage;
}

function SwapBox(whichBox, state) {
	
	if (state == 'off') {		
		SwapDefault(whichBox);		
		WhiteOff();
	} else {		
		SwapSection(whichBox);			
		WhiteOn(whichBox);	
	}
}

function SwapDefault(whichBox) {
	if (document.layers) {
 		eval('document.layers.divRoot.layers.div'+whichBox+'BG8.visibility = "hide"');
 		eval('document.layers.divRoot.layers.div'+whichBox+'BG6.visibility = "hide"');
		document.layers.divRoot.layers.divBG8.visibility = "show";
		document.layers.divRoot.layers.divBG6.visibility = "show";	  
	  }  else if (document.all){
	    eval('div'+whichBox+'BG8.style.visibility= "hidden"');
	    eval('div'+whichBox+'BG6.style.visibility= "hidden"');
		divBG8.style.visibility= 'visible';	
		divBG6.style.visibility= 'visible';	
	  }  else if (document.getElementById)  {
		  eval('document.getElementById("div'+whichBox+'BG8").style.visibility = "hidden"');
		  eval('document.getElementById("div'+whichBox+'BG6").style.visibility = "hidden"');
		  document.getElementById('divBG8').style.visibility = "visible";	
		  document.getElementById('divBG6').style.visibility = "visible";	  
	  }
	  
	  SwitchTheImage('BG0', 'images/pic_main_1.jpg','divBG0');
	  SwitchTheImage('BG1', 'images/pic_main_2.jpg','divBG1');
	  SwitchTheImage('BG2', 'images/pic_main_3.jpg','divBG2');
	  SwitchTheImage('BG3', 'images/pic_main_4.jpg','divBG3');
	  SwitchTheImage('BG5', 'images/pic_main_cntr_rt.jpg','divBG5');	  
	  SwitchTheImage('BG7', 'images/pic_main_cntr_lft.jpg','divBG7');	  
	  	 		
}
    
function SwapSection(whichBox) {		
	if (document.layers) {		
 		eval('document.layers.divRoot.layers.div'+whichBox+'BG8.visibility = "show"');
 		eval('document.layers.divRoot.layers.div'+whichBox+'BG6.visibility = "show"'); 		
		document.layers.divRoot.layers.divBG8.visibility = "hide";
		document.layers.divRoot.layers.divBG6.visibility = "hide";
	  }  else if (document.all){
	     eval('div'+whichBox+'BG8.style.visibility= "visible"');
	     eval('div'+whichBox+'BG6.style.visibility= "visible"');
		 divBG8.style.visibility= 'hidden';	
		 divBG6.style.visibility= 'hidden';	
	  }  else if (document.getElementById) {
		eval('document.getElementById("div'+whichBox+'BG8").style.visibility = "visible"');
		eval('document.getElementById("div'+whichBox+'BG6").style.visibility = "visible"');
		document.getElementById('divBG8').style.visibility = "hidden";	
		document.getElementById('divBG6').style.visibility = "hidden";  
	  }
	  
	  SwitchTheImage('BG0', 'images/pic_'+whichBox+'_1.jpg','divBG0');
	  SwitchTheImage('BG1', 'images/pic_'+whichBox+'_2.jpg','divBG1');
	  SwitchTheImage('BG2', 'images/pic_'+whichBox+'_3.jpg','divBG2');
	  SwitchTheImage('BG3', 'images/pic_'+whichBox+'_4.jpg','divBG3');
	  SwitchTheImage('BG5', 'images/pic_'+whichBox+'_cntr_rt.jpg','divBG5');	  
	  SwitchTheImage('BG7', 'images/pic_'+whichBox+'_cntr_lft.jpg','divBG7');	  	
		
}

function WhiteOn(sectionName) {		
		
		if (sectionName != 'bus') {
			SwitchTheImage('BXbusiness', 'images/frames/pic_off.jpg','divBG4');
		}
		if (sectionName != 'concepts') {
			SwitchTheImage('BXconcepts', 'images/frames/pic_off.jpg','divBG4');
		}
		if (sectionName != 'dest') {
			SwitchTheImage('BXdest', 'images/frames/pic_off.jpg','divBG4');
		}
		if (sectionName != 'med') {
			SwitchTheImage('BXmed', 'images/frames/pic_off.jpg','divBG4');
		}
		if (sectionName != 'nature') {
			SwitchTheImage('BXnature', 'images/frames/pic_off.jpg','divBG4');
		}
		if (sectionName != 'people') {
			SwitchTheImage('BXpeople', 'images/frames/pic_off.jpg','divBG4');
		}
		if (sectionName != 'sports') {
			SwitchTheImage('BXsports', 'images/frames/pic_off.jpg','divBG4');
		}
    }
    
    function WhiteOff() {
		SwitchTheImage('BXbusiness', 'images/frames/pic_bus_off.jpg','divBG4');
		SwitchTheImage('BXconcepts', 'images/frames/pic_concepts_off.jpg','divBG4');
		SwitchTheImage('BXdest', 'images/frames/pic_dest_off.jpg','divBG4');
		SwitchTheImage('BXmed', 'images/frames/pic_med_off.jpg','divBG4');
		SwitchTheImage('BXnature', 'images/frames/pic_nature_off.jpg','divBG4');
		SwitchTheImage('BXpeople', 'images/frames/pic_people_off.jpg','divBG4');
		SwitchTheImage('BXsports', 'images/frames/pic_sports_off.jpg','divBG4');	
    }

function openPopup( pageToLoad, winName, width, height, scrollbars, resizable ) {

    if ((scrollbars == 0) || (scrollbars == 'false')) {
        scrollbars = 'no';
    }
    if ((scrollbars == 1) || (scrollbars == 'true')) {
        scrollbars = 'yes';
    }
    if ((scrollbars != 'no') && (scrollbars != 'yes')) {
        scrollbars = 'no';  
    }

    if ((resizable == 0) || (resizable == 'false')) {
        resizable = 'no';
    }
    if ((resizable == 1) || (resizable == 'true')) {
        resizable = 'yes';
    }
    if ((resizable != 'no') && (resizable != 'yes')) {
        resizable = 'no';   
    }


    var args;
    args    = "width=" + width + ","     
            + "height=" + height + "," 
            + "location=no," 
            + "menubar=no,"
            + "resizable=" + resizable + ","
            + "scrollbars=" + scrollbars + ","
            + "status=no,"
            + "titlebar=no,"
            + "toolbar=no,"
            + "hotkeys=no";
    
    if (is_major >= 4) {
        var xposition = (screen.width - width) / 2;
        var yposition = (screen.height - height) / 2;;
        args += ",screenx=" + xposition + ","   //NN Only
                + "screeny=" + yposition + ","  //NN Only
                + "left=" + xposition + ","     //IE Only
                + "top=" + yposition;           //IE Only
    }
    
    var newWindow = window.open( pageToLoad, winName, args );
    newWindow.focus();
    return newWindow;
}

	
		
