// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// << LAYER FUNCTIONALITY >>

// Check's DOM
//-------------------------------------------------------
var dom = document.getElementById ?true:false;
var ie4 = (document.all && !dom)  ?true:false;
var ns4 = document.layers         ?true:false;
//-------------------------------------------------------

// Show/Hide Layer
//------------------------------------------------------- 
function getStyle (objstr, nest) {
	nest = (nest) ? 'document.'+nest+'.' : '';
	return (dom) ? document.getElementById(objstr).style : (ie4) ? document.all[objstr].style : (ns4) ? eval(nest+'document.'+objstr) : false;
}
function showDiv (objstr,nest) {
	getStyle(objstr,nest).visibility = 'visible';
}
function hideDiv (objstr,nest) {
	getStyle(objstr,nest).visibility = 'hidden';
}
//-------------------------------------------------------

// Writes menu layers
//-------------------------------------------------------
function writeMenu(name,left,top,width){
	var div
	if (ns4) {
		div  = "<layer name='" +name+ "' ";
		div += "left='" +left+ "' ";
		div += "top='" +top+ "' ";
		div += "width='" +width+ "' ";
		div += "z-index='1000' "
		div += "visibility='hidden' ";
	} else {
		div  = "<div id='" +name+ "' ";
		div += "style='position:absolute; ";
		div += "left:" +left+ "px; ";
		div += "top:" +top+ "px; ";
		div += "width:" +width+ "px; ";
		div += "z-index:1000; "
		div += "visibility:hidden;' ";
	}
	div += "onMouseOver=\"showDiv('" +name+ "')\" onMouseOut=\"hideDiv('" +name+ "')\">";
	return div;
}
function endMenu () {
	return ns4 ? '</layer>' : '</div>';
}
//-------------------------------------------------------



// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// << IMAGE SWAPPING FUNCTIONALITY >>

// Image Swap
//-------------------------------------------------------
function preload(obj,imgsrc){
	eval(obj+' = new Image()');
	eval(obj+'.src = "'+imgsrc+'"');
}
function imageSwap(name,imgobj,div){
	if(document.layers && div != null){
		eval('document.'+div+'.document.images["'+name+'"].src = '+imgobj+'.src');
	}else{
		document.images[name].src = eval(imgobj+'.src');
	}
}
//-------------------------------------------------------
// Write Drop Down Divs
//-------------------------------------------------------
function writeDropDowns() {

// Drop Down
var str=''
str+='<script language="JavaScript" type="text/JavaScript">document.write(writeMenu(\'dropUtility\',544,123,178));</script>';
str+='<table width="178" border="0" cellspacing="0" cellpadding="0">';
str+='<tr>';
str+='<td bgcolor="#FFCC66" style="padding: 10 10 0 9"><a href="../contact/contact.shtml" onFocus="blur();" onClick="hideDiv(\'dropUtility\')" onMouseOver="imgOver(\'branding\')" onMouseOut="imgOff(\'branding\')"><img src="../images/global/nav_branding.gif" name="branding" width="101" height="10" border="0"></a><br><a href="../contact/contact.shtml" onFocus="blur();" onClick="hideDiv(\'dropUtility\')" onMouseOver="imgOver(\'mailing\')" onMouseOut="imgOff(\'mailing\')"><img src="../images/global/nav_mailing.gif" name="mailing" width="121" height="10" vspace="6" border="0"></a><br><a href="../contact/contact.shtml" onFocus="blur();" onClick="hideDiv(\'dropUtility\')" onMouseOver="imgOver(\'consultation\')" onMouseOut="imgOff(\'consultation\')"><img src="../images/global/nav_consultation.gif" name="consultation" width="104" height="10" border="0"></a><br><a href="../sitemap.shtml" onFocus="blur();" onClick="hideDiv(\'dropUtility\')" onMouseOver="imgOver(\'sitemap\')" onMouseOut="imgOff(\'sitemap\')"><img src="../images/global/nav_sitemap.gif" name="sitemap" width="46" height="10" vspace="6" border="0"></a><br><a href="../privacy.shtml" onFocus="blur();" onClick="hideDiv(\'dropUtility\')" onMouseOver="imgOver(\'privacy\')" onMouseOut="imgOff(\'privacy\')"><img src="../images/global/nav_privacy.gif" name="privacy" width="82" height="10" border="0"></a></td>';
str+='</tr>';
str+='<tr>';
str+='<td><img src="../images/global/pulldown_arrow.gif" width="178" height="17"></td>';
str+='</tr>';
str+='</table>';
str+='<script language="JavaScript" type="text/JavaScript">document.write(endMenu());</script>';

document.write(str);
}
//-------------------------------------------------------
// Rollovers
function imgOver(imgName){ 
	document[imgName].src = eval(imgName + "_over.src"); 
}

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

function bulletOver(location){
	document[location].src = eval("bullet_over.src"); 
}

function bulletOff(location){
	document[location].src = eval("bullet_off.src"); 
}

bullet_off = new Image();
bullet_off.src = "../images/global/bullet.gif";

bullet_over = new Image();
bullet_over.src = "../images/global/bullet_f2.gif";

nav_services_off = new Image();
nav_services_off.src = "../images/global/nav_services.gif";

nav_services_over = new Image();
nav_services_over.src = "../images/global/nav_services_f2.gif";

nav_portfolio_off = new Image();
nav_portfolio_off.src = "../images/global/nav_portfolio.gif";

nav_portfolio_over = new Image();
nav_portfolio_over.src = "../images/global/nav_portfolio_f2.gif";

nav_clients_off = new Image();
nav_clients_off.src = "../images/global/nav_clients.gif";

nav_clients_over = new Image();
nav_clients_over.src = "../images/global/nav_clients_f2.gif";

nav_about_off = new Image();
nav_about_off.src = "../images/global/nav_about.gif";

nav_about_over = new Image();
nav_about_over.src = "../images/global/nav_about_f2.gif";

nav_contact_off = new Image();
nav_contact_off.src = "../images/global/nav_contact.gif";

nav_contact_over = new Image();
nav_contact_over.src = "../images/global/nav_contact_f2.gif";

branding_off = new Image();
branding_off.src = "../images/global/nav_branding.gif";

branding_over = new Image();
branding_over.src = "../images/global/nav_branding_f2.gif";

mailing_off = new Image();
mailing_off.src = "../images/global/nav_mailing.gif";

mailing_over = new Image();
mailing_over.src = "../images/global/nav_mailing_f2.gif";

consultation_off = new Image();
consultation_off.src = "../images/global/nav_consultation.gif";

consultation_over = new Image();
consultation_over.src = "../images/global/nav_consultation_f2.gif";

sitemap_off = new Image();
sitemap_off.src = "../images/global/nav_sitemap.gif";

sitemap_over = new Image();
sitemap_over.src = "../images/global/nav_sitemap_f2.gif";

privacy_off = new Image();
privacy_off.src = "../images/global/nav_privacy.gif";

privacy_over = new Image();
privacy_over.src = "../images/global/nav_privacy_f2.gif";

services_off = new Image();
services_off.src = "../images/global/services.gif";

services_over = new Image();
services_over.src = "../images/global/services_f2.gif";

case_studies_off = new Image();
case_studies_off.src = "../images/global/case_studies.gif";

case_studies_over = new Image();
case_studies_over.src = "../images/global/case_studies_f2.gif";

contact_off = new Image();
contact_off.src = "../images/global/contact.gif";

contact_over = new Image();
contact_over.src = "../images/global/contact_f2.gif";


// Netscape Navigator 4 Reload Fix
//-------------------------------------------------------
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-------------------------------------------------------