//*********************************************************
//                     Rollover code
//*********************************************************

// INTIALIZE IMAGES
if (document.images) {


// top nav
    howworkOff = new Image();
    howworkOff.src = "images/buttons/tn_b_howwork.gif"
    howworkOn = new Image();
    howworkOn.src = "images/buttons/tn_b_howwork_on.gif"
    
    wedoOff = new Image();
    wedoOff.src = "images/buttons/tn_b_wedo.gif"
    wedoOn = new Image();
    wedoOn.src = "images/buttons/tn_b_wedo_on.gif"
    
    seeworkOff = new Image();
    seeworkOff.src = "images/buttons/tn_b_seework.gif"
    seeworkOn = new Image();
    seeworkOn.src = "images/buttons/tn_b_seework_on.gif"
    
    resourcesOff = new Image();
    resourcesOff.src = "images/buttons/tn_b_resources.gif"
    resourcesOn = new Image();
    resourcesOn.src = "images/buttons/tn_b_resources_on.gif"
    
    contactusOff = new Image();
    contactusOff.src = "images/buttons/tn_b_contactus.gif"
    contactusOn = new Image();
    contactusOn.src = "images/buttons/tn_b_contactus_on.gif"   

// SWAP ON
function swapOn(imgName) {
    if (document.images) { 
        imgOn = eval(imgName + "On.src");
        document [imgName].src = imgOn;
	}
}

// SWAP OFF
function swapOff(imgName) {
	if (document.images) {
        imgOff = eval(imgName + "Off.src");
        document [imgName].src = imgOff;
	}
}

	
// POPUP FOR LARGE IMAGE
function photo(image) {
  var w = 800;
  var h = 600;
  var popw = 500;
  var poph = 500;
 
  w = screen.availWidth;
  h = screen.availHeight;
  var leftPos = (w-popw)/2, topPos = (h-poph)/2;
  
  newWindow = window.open("","pop","toolbar=no,location=no,scrollbars=no,status=no,width=500,height=500,top=" + topPos + ",left=" + leftPos);
  newWindow.document.write("<HTML><HEAD><TITLE>Home & Habitat</TITLE></HEAD><BODY bgcolor='#9F9D70' leftmargin='0' marginheight='0' marginwidth='0' topmargin='0' onLoad='self.focus()'><table width='500' border='0' cellspacing='0' cellpadding='0' height='500'><tr><td align='center' valign='middle'><A HREF='javascript:window.close()' BORDER='0'><IMG SRC='images/what/popups/"+image+"' border='0' title='Click to close'></A></td></tr></table></BODY></HTML>");
  newWindow.document.close();
}

function photoproject(image) {
  var w = 800;
  var h = 600;
  var popw = 500;
  var poph = 500;
 
  w = screen.availWidth;
  h = screen.availHeight;
  var leftPos = (w-popw)/2, topPos = (h-poph)/2;
  
  newWindow = window.open("","pop","toolbar=no,location=no,scrollbars=no,status=no,width=500,height=500,top=" + topPos + ",left=" + leftPos);
  newWindow.document.write("<HTML><HEAD><TITLE>Home & Habitat - Featured Projects</TITLE></HEAD><BODY bgcolor='#9F9D70' leftmargin='0' marginheight='0' marginwidth='0' topmargin='0' onLoad='self.focus()'><table width='500' border='0' cellspacing='0' cellpadding='0' height='500'><tr><td align='center' valign='middle'><A HREF='javascript:window.close()' BORDER='0'><IMG SRC='images/see/popups/"+image+"' border='0' title='Click to close'></A></td></tr></table></BODY></HTML>");
  newWindow.document.close();
}

function photoportfolio(image) {
  var w = 800;
  var h = 600;
  var popw = 500;
  var poph = 500;
 
  w = screen.availWidth;
  h = screen.availHeight;
  var leftPos = (w-popw)/2, topPos = (h-poph)/2;
  
  newWindow = window.document.open("","pop","toolbar=no,location=no,scrollbars=no,status=no,width=640,height=480,top=" + topPos + ",left=" + leftPos);
  newWindow.document.write('<HTML><HEAD><TITLE>Home & Habitat - Portfolio</TITLE></HEAD><BODY bgcolor=#9F9D70 leftmargin=0 marginheight=0 marginwidth=0 topmargin=0 onLoad=self.focus()><table align=center width=500 border=0 cellspacing=0 cellpadding=0 height=500><tr><td align=center valign=middle><A HREF=javascript:window.close()><IMG SRC=images/see/popups/'+image+' border=0 title=Click to close></A></td></tr></table></BODY></HTML>');
  newWindow.document.close();
}

function openbiojanet() {
  var w = 800;
  var h = 600;
  var popw = 500;
  var poph = 500;
 
  w = screen.availWidth;
  h = screen.availHeight;
  var leftPos = (w-popw)/2, topPos = (h-poph)/2;
  
  newWindow = window.open("bio_janet.html", "pop", "toolbar=no,location=no,scrollbars=yes,status=no,width=500,height=500,top=" + topPos + ",left=" + leftPos);
  newWindow.document.close();
  }
  
  function openbioamy() {
  var w = 800;
  var h = 600;
  var popw = 500;
  var poph = 500;
 
  w = screen.availWidth;
  h = screen.availHeight;
  var leftPos = (w-popw)/2, topPos = (h-poph)/2;
  
  newWindow = window.open("bio_amy.html", "pop", "toolbar=no,location=no,scrollbars=yes,status=no,width=500,height=500,top=" + topPos + ",left=" + leftPos);
  newWindow.document.close();
  }
  
  function openfriend() {
  var w = 800;
  var h = 600;
  var popw = 400;
  var poph = 600;
 
  w = screen.availWidth;
  h = screen.availHeight;
  var leftPos = (w-popw)/2, topPos = (h-poph)/2;
  
  newWindow = window.open("share.php", "pop", "toolbar=no,location=no,scrollbars=yes,status=no,width=400,height=560,top=" + topPos + ",left=" + leftPos);
  newWindow.document.close();
  }
  
// FLASH DETECTION
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
		}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
	}
if ( MM_FlashCanPlay == false) {
	window.open("noflash.html","flash","toolbar=no, location=no, scrollbars=no, status=no,width=300,height=200");
}


}

// *******************************************************
