// NETSCAPE RESIZE FIX

if (document.layers){
	var origWidth = innerWidth;
	var origHeight = innerHeight;
	onresize = reDo;
}
function reDo(){
	if (innerWidth != origWidth || innerHeight != origHeight){
	  	location.reload(true);
	}
}



function Browser(param){http="http:/\/";this.author="Guy Shahar";this.lastModified="V2.1 10/16/00 2:35PM (modified for doubleclick on 12-7-00";this.lastModifiedBy=this.author;this.Usage_URL=http+"www.guyshahar.com/detect/usage.html";this.v=parseFloat(navigator.appVersion);this.uA=navigator.userAgent;this.ns=false;this.ns6=false;this.ie=false;this.ie5=false;this.opera=false;this.AOL=false;this.mac=false;this.pc=false;this.dhtml=false;this.Java=false;this.Flash=false;this.Flash_Download=http+"www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";this.Flash_Codebase=http+"download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0";this.loaded=false;navigator.appVersion.indexOf('Mac')!=-1?(this.mac=true):(this.pc=true);var ns6pos=this.uA.indexOf('Netscape6/');var iepos=this.uA.indexOf('MSIE');var oppos=this.uA.indexOf('Opera');if(oppos>0){this.v=parseFloat(this.uA.substring(oppos+6,this.uA.length));this.opera=true;}else{navigator.appName.indexOf('Netscape')!=-1?(this.ns=true):(this.ie=true);}if(iepos!=-1){ie5cut=this.uA.substring(iepos+5,this.uA.length);this.v=parseFloat(ie5cut.substring(0,ie5cut.indexOf('\;')));if(this.v>=5)this.ie5=true;}this.guy=true;if(ns6pos!=-1){this.v=parseFloat(this.uA.substring(ns6pos+10,this.uA.length));this.ns6=true;}if(this.uA.toLowerCase().indexOf('aol')!=-1){this.AOL=true;}if(this.v>=4){this.dhtml=this.opera?false:true;this.Java=navigator.javaEnabled();}Browser.prototype.Detect=Detect;Browser.prototype.EmbedFlash=DetectEmbedFlash;if(param==1){this.Detect();}}function Detect(){if(this.loaded==true){return;}this.loaded=true;ActiveX='<SCRIPT LANGUAGE="VBScript">\n';ActiveX+='Function GetFlashValue\n';ActiveX+='on error resume next\n';ActiveX+='dim tmpobj, FlashInstalled\n';ActiveX+='FlashInstalled = 0\n';ActiveX+='tmpobj = 0\n';ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.2")\n';ActiveX+='if IsObject(tmpobj) then FlashInstalled = 2\n';ActiveX+='tmpobj = 0\n';ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.3")\n';ActiveX+='if IsObject(tmpobj) then FlashInstalled = 3\n';ActiveX+='tmpobj = 0\n';ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.4")\n';ActiveX+='if IsObject(tmpobj) then FlashInstalled = 4\n';ActiveX+='tmpobj = 0\n';ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.5")\n';ActiveX+='if IsObject(tmpobj) then FlashInstalled = 5\n';ActiveX+='GetFlashValue = FlashInstalled\n';ActiveX+='End Function\n';ActiveX+='<\/SCRIPT>\n';if(navigator.plugins&&navigator.plugins.length>0){nparray=navigator.plugins;nparraylen=nparray.length;for(i=0;i<nparraylen;i++){npplugin=nparray[i];npname=npplugin.name;npdesc=npplugin.description;if(npname.indexOf("Shockwave Flash 2")!=-1){this.Flash=2;}if(npdesc.indexOf("Shockwave Flash 3")!=-1){this.Flash=3;}if(npdesc.indexOf("Shockwave Flash 4")!=-1){this.Flash=4;}if(npdesc.indexOf("Shockwave Flash 5")!=-1){this.Flash=5;}}}else if(this.ie){if(!this.mac){document.write(ActiveX);this.Flash=GetFlashValue();if(!this.Flash){this.Flash=false;}}else{this.Flash="Can't Detect";}}disableFlash=document.URL.toLowerCase().indexOf("flash=false")>document.URL.indexOf("?");if(disableFlash){this.Flash=false;}}function DetectEmbedFlash(file,width,height,fVersion,autostart,force){var insHTML="";var override=document.URL.indexOf("flash=false")>document.URL.indexOf("?");if(!fVersion){fVersion=3;}if(!width){width=10;}if(!height){height=10;}if(!autostart){autostart=false;}file_ID=file.substring(0,file.indexOf('.'));if((this.Flash>=parseFloat(fVersion)&&!override)||force){file = escape(file);insHTML=('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+this.Flash_Codebase+'" ID='+file_ID+' WIDTH='+width+' HEIGHT='+height+'>\n');insHTML+=('<PARAM NAME=movie VALUE="'+file+'">\n');insHTML+=('<PARAM NAME=quality VALUE=high>\n');insHTML+=('<PARAM NAME=AUTOSTART VALUE='+autostart+'> \n');insHTML+=('<EMBED src="'+file+'" quality=high width='+width+' height='+height+' type="application/x-shockwave-flash" pluginspage="'+this.Flash_Download+'" autostart="'+autostart+'" ');insHTML+=('></EMBED>\n');insHTML+=('</OBJECT>\n');document.write(insHTML);}}

/*
USAGE: 
var Ogilvy = new Browser(1);

Ogilvy.EmbedFlash(filename,width,height,version_to_detect_for);
filename will automatically be escaped converting all "=" to "%3D"

*/


// PRELOAD IMAGES

function init(){
	preloadImages();
}

var img_array = new Array("nav_comm", "nav_conn", "nav_cons", "nav_game", "nav_whow", "nav_what", "nav_intro2", "nav_offices", "nav_board");
var IMG_off = new Array();
var IMG_on = new Array();
function preloadImages(){
	for(i=0;i<img_array.length;i++){
		IMG_off[i] = new Image();
		IMG_off[i].src = "../images/" + img_array[i] + ".gif";
		IMG_on[i] = new Image();
		IMG_on[i].src = "../images/" + img_array[i] + "_o.gif";
	}
}

window.onload = init;


// ROLL-OVER BOTTOM NAV

function rollOn(img){
	if(document.images){
		what = img;
		document.images[what].src = "../images/" + img + "_o.gif";
	}
}

function rollOff(img){
	if(document.images){
		what = img;
		document.images[what].src = "../images/" + img + ".gif";
	}
}

// GLOBAL POP-UP

function popUp(url,popname,width,height) {
window.open(url,popname,'height='+height+',width='+width+',resizable=1,scrollbars=auto,location=0,toolbar=0,status=0').focus;
}

function popUptoo(url,popname,width,height) {
window.open(url,popname,'height='+height+',width='+width+',resizable=0,scrollbars=1,location=0,toolbar=0,status=0').focus;
}

