

/* home page routines - note the images/ */

if (document.images) {

 
	
	topfolioon = new Image();
	topfolioon.src = "images/icon_folio_top.gif";
	topfoliooff = new Image();
	topfoliooff.src = "images/icon_folio_top_over.gif";
	
	topprofileon = new Image();
	topprofileon.src = "images/icon_profile_top.gif";
	topprofileoff = new Image();
	topprofileoff.src = "images/icon_profile_top_over.gif";
	
	topflashon = new Image();
	topflashon.src = "images/icon_flash_top.gif";
	topflashoff = new Image();
	topflashoff.src = "images/icon_flash_top_over.gif";
	

	calloutoff = new Image();
	calloutoff.src = "images/callout_invisible.gif";

	infotexton = new Image();
	infotexton.src = "images/info_callout.gif";
	infotextoff = new Image();
	infotextoff.src = "images/callout_invisible.gif";
	
	foliocallon = new Image();
	foliocallon.src = "images/callout_folio.gif";
	foliocalloff = new Image();
	foliocalloff.src = "images/callout_invisible.gif";
		
	profilecallon = new Image();
	profilecallon.src = "images/callout_profile.gif";
	profilecalloff = new Image();
	profilecalloff.src = "images/callout_invisible.gif";

	flashcallon = new Image();
	flashcallon.src = "images/callout_flashprojects.gif";
	flashcalloff = new Image();
	flashcalloff.src = "images/callout_invisible.gif";

	tminusfiftyon = new Image();
	tminusfiftyon.src = "images/flash_tminusfifty_over.gif";

	tminusfiftyoff = new Image();
	tminusfiftyoff.src = "images/flash_tminusfifty.gif";
	
	wemxmason = new Image();
	wemxmason.src = "images/flash_wem_over.gif";

	wemxmasoff = new Image();
	wemxmasoff.src = "images/flash_wem.gif";
	
	vfouron = new Image();
	vfouron.src = "images/flash_eye_over.gif";

	vfouroff = new Image();
	vfouroff.src = "images/flash_eye.gif";
			
	beateon = new Image();
	beateon.src = "images/flash_beate_over.gif";

	beateoff = new Image();
	beateoff.src = "images/flash_beate.gif";
	
	haggeron = new Image();
	haggeron.src = "images/flash_studiohagger_over.gif";

	haggeroff = new Image();
	haggeroff.src = "images/flash_studiohagger.gif";
	
	xmlexpon = new Image();
	xmlexpon.src = "images/flash_xml_exp_over.gif";

	xmlexpoff = new Image();
	xmlexpoff.src = "images/flash_xml_exp.gif";
	
	liquidon = new Image();
	liquidon.src = "images/flash_exp_liquid_over.gif";

	liquidoff = new Image();
	liquidoff.src = "images/flash_exp_liquid.gif";

	tabaon = new Image();
	tabaon.src = "images/flash_taba_over.jpg";

	tabaoff = new Image();
	tabaoff.src = "images/flash_taba.jpg";
	
	worldhotelson = new Image();
	worldhotelson.src = "images/flash_worldhotels_over.jpg";

	worldhotelsoff = new Image();
	worldhotelsoff.src = "images/flash_worldhotels.jpg";
	
	dcon = new Image();
	dcon.src = "images/flash_dc_over.gif";

	dcoff = new Image();
	dcoff.src = "images/flash_dc.gif";

}

/* Turn the images off and on, when rolled in and rolled out.,
   We check to see if the actual image is there before trying to change
   its src value */

function imgOn(imgName) {
	if (document.images[imgName]) {
		document.images[imgName].src = eval(imgName + "on.src");
	}
}

function imgOff(imgName) {
	if (document.images[imgName]) {
		document.images[imgName].src = eval(imgName + "off.src");
	}
}

/* functions for handling the icon rollovers and text in the middle of
page */
function img_act_3Dim(textName,textImg,iconImg) {
	imgOn(iconImg); //handle the icon Rollover
	if (document.images[textName]) {
		document.images[textName].src = eval(textImg + "on.src");
	}
}

function img_inact_3Dim(textName,textImg,iconImg){
	imgOff(iconImg); //handle the icon Rollover
	if (document.images[textName]) {
		document.images[textName].src = eval(textImg + "off.src");
	}
}

/* See which browser we have and if we support document.all, which is
   the standard DOM method now. */

var NN4 = document.layers? true : false; //Netscape Navigator 4.x.
var IE4 = document.all? true : false;    // IE version 4 and above.
var W3C = document.getElementById? true : false; // W3C compatibale


function showLayer(divid) {
	if (W3C) {
		document.getElementById(divid).style.visibility = "visible";	
	}
	else if (NN4) {
		document.layers[divid].visibility = "show";
	}
	else if (IE4) {
		document.all[divid].style.visibility = "visible";
	}
}

function hideLayer(divid) {
	if (W3C) {
		document.getElementById(divid).style.visibility = "hidden";	
	}
	else if (NN4) {
		document.layers[divid].visibility = "hide";
	}
	else if (IE4) {
		document.all[divid].style.visibility =	"hidden";
	}
}

/* simple function which provides a void function. void() should work but
   it has problems with Mac IE5 */

function voidFn() {
	//return true;
}

function centralize() { 
        if (IE4) { 
                newWidth = document.body.clientWidth; 
                newHeight = document.body.clientHeight; } 
        else { 
                newWidth = innerWidth; 
                newHeight = innerHeight; } 
if (!IE4) {
       if (W3C) {
      	document.getElementById('master').style.left = (newWidth-700)/2;
       			}
    }  
		if (NN4) {
		document.layers['master'].left = (newWidth-700)/2;
	}
       if (IE4) { 
        document.all['master'].style.pixelLeft = (newWidth-700)/2;
        		}
        		
        
        showLayer('master');  
    } 
 
