/* Copyright (c) by Andrew DiFiore Jr. All rights reserved. */
var requiredVersion = 6; 			// min version we want to allow
var useFlash = false;				// true = load Flash, false = load HTML

if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
	if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (verIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != -1) {
	    var flashVersion = parseInt(navigator.plugins["Shockwave Flash"].description.substring(verIndex-1, verIndex));
	    if (flashVersion >= requiredVersion) useFlash = true;
	}
} else {
	document.write('<script language="VBScript" type="text/vbscript">\n');
	document.write('on error resume next\n');
	document.write('useFlash = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & requiredVersion))\n');
	document.write('<\/script>\n');
} 

defaultStatus = "Leading Your Team in the Right Direction";

self.onerror = function() { return true; }

if (document.images) { 
	imageOn = new Array(); imageOff = new Array();
	for (i=1; i < 5; i++) {
		imageOn[i] = new Image(); imageOn[i].src = "images/nav_0" + i + "_over.gif";
		imageOff[i] = new Image(); imageOff[i].src = "images/nav_0" + i + ".gif"; 
	}
}

function changeImg(imageName,imageNum,on) {
	if (document.images) {
		if (on) { document[imageName].src = imageOn[imageNum].src; }
		else { document[imageName].src = imageOff[imageNum].src; }
	}
}

function hiliteButton(cssclass) { // function for button rollover (IE only)
	if (event.srcElement.tagName == "INPUT") event.srcElement.className=cssclass;
}

function writeFlashNav(path) {
	if (path == null) path = "";
	var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
	+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" '
	+ 'width="750" height="32" id="navFlash"> '
	+ '<param name="movie" value="' + path + 'nav.swf"> '
	+ '<param name="play" value="true"> '
	+ '<param name="loop" value="true"> '
	+ '<param name="quality" value="high"> '
	+ '<param name="menu" value="false"> '
	+ '<embed src="' + path + 'nav.swf" '
	+ 'width="750" height="32" '
	+ 'play="true" '
	+ 'loop="true" '
	+ 'quality="high" '
	+ 'menu="false" '
	+ 'name="navFlash" '
	+ 'type="application/x-shockwave-flash" '
	+ 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> '
	+ '<\/embed>'
	+ '<\/object>';
	document.write(oeTags);
}

function writeHTMLNav(path) {
	if (path == null) path = "";
	var oeTags = '<img src="' + path + 'images/nav.jpg" width="750" height="32" usemap="#noflashMap" border="0" alt="">'
	+ '<map name="noflashMap">'
	+ '<area shape="rect" coords="0,10,125,28" href="' + path + 'team.html" alt="Teambuilding" title="Teambuilding">'
	+ '<area shape="rect" coords="125,10,250,28" href="' + path + 'corporate.html" alt="Corporate" title="Corporate">'
	+ '<area shape="rect" coords="250,10,375,28" href="' + path + 'schools.html" alt="Schools" title="Schools">'
	+ '<area shape="rect" coords="375,10,500,28" href="' + path + 'parties.html" alt="Parties" title="Parties">'
	+ '<area shape="rect" coords="500,10,625,28" href="' + path + 'clients.html" alt="Client List" title="Client List">'
	+ '<area shape="rect" coords="625,10,750,28" href="' + path + 'about.html" alt="About Us" title="About Us">'
	+ '<\/map>'
	document.write(oeTags);
}

function openWindow(url, name, rs, sc, mn, tb, w, h, cent) { 
	popupWin = null;
	if (rs) resize = "resizable,"; else resize = "";
	if (sc) scrolls = "scrollbars,"; else scrolls = "";
	if (mn) menu = "menubar,"; else menu = "";
	if (tb) tool = "toolbar,"; else tool = "";
	if (cent) { // center popup
		chasm = screen.availWidth;
		mount = screen.availHeight;	  
		popupWin = window.open(url, name, resize + scrolls + menu + tool + 'width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5));
	} 
	else popupWin = window.open(url, name, resize + scrolls + menu + tool + 'width=' + w + ',height=' + h + ',left=20, top=20');
}