
	function returnStyle(state, element) {
		if (state == "over") {
			element.style.backgroundColor = "#FFFFFF";
		} else {
			element.style.backgroundColor = "transparent";
		}
	}
	
	function getSection(section) {
		switch (section) {
			case 6:
				window.document.location = "index.htm";
				break;
			case 5:
				window.document.location = "index.htm";
				break;
			case 4:
				window.document.location = "about.htm";
				break;
			case 3:
				window.document.location = "index.htm";
				break;
			case 2:
				window.document.location = "index.htm";
				break;
			default:
				window.document.location = "planning.htm";
				break;
		}
	}
	
	function getInfo(url) {
		window.open(url, "info", "width=400, height=500, toolbar=no, scrollbars=yes");
	}
	
	
/*
 * FlashObject embed :: 10-14-2004
 *
 * by Geoff Stearns (geoff@deconcept.com, http://blog.deconcept.com/)
 *
 * v1.0.2 - 10-20-2004
 *
 * Create and write a flash movie to the page, includes detection
 *
 * Usage:
 *
 *	myFlash = new FlashObject("path/to/swf.swf", "swfid", "width", "height", flashversion, "backgroundcolor");
 *	myFlash.altTxt = "Upgrade your Flash Player!";
 *	myFlash.addParam("wmode", "transparent");
 *	myFlash.addVariable("varname", "varvalue");
 *	myFlash.write();
 *
 */

FlashObject = function(swf, id, w, h, ver, c) {
	this.swf = swf;
	this.id = id;
	this.width = w;
	this.height = h;
	this.version = ver || 6; // default to 6
	this.align = "middle"; // default to middle
	this.redirect = "";
	this.sq = document.location.search.split("?")[1] || "";

	this.altTxt = ''
      + '<table width="630" border="0" cellpadding="0" cellspacing="0">'
      + '<tr>'
      + '<td background="images/table_bar.gif">'
      + '<table width="630" border="0" cellspacing="0" cellpadding="0" class="navBarTable">'
      + '<tr align="center">'
         + '<td id="navTD_1" onmouseover="returnStyle(\'over\', this)" onmouseout="returnStyle(\'default\', this)" onclick="getSection(1)"><a href="javascript:getSection(1)">Services</a></td>'
         + '<td id="navTD_2" onmouseover="returnStyle(\'over\', this)" onmouseout="returnStyle(\'default\', this)" onclick="getSection(2)"><a href="javascript:getSection(2)">Machinery Guidance</a></td>'
         + '<td id="navTD_3" onmouseover="returnStyle(\'over\', this)" onmouseout="returnStyle(\'default\', this)" onclick="getSection(3)"><a href="javascript:getSection(3)">North of 60</a></td>'
         + '<td id="navTD_4" onmouseover="returnStyle(\'over\', this)" onmouseout="returnStyle(\'default\', this)" onclick="getSection(4)"><a href="javascript:getSection(4)">Corporate</a></td>'
         + '<td id="navTD_5" onmouseover="returnStyle(\'over\', this)" onmouseout="returnStyle(\'default\', this)" onclick="getSection(5)"><a href="javascript:getSection(5)">Contact</a></td>'
         + '<td id="navTD_6" onmouseover="returnStyle(\'over\', this)" onmouseout="returnStyle(\'default\', this)" onclick="getSection(6)"><a href="javascript:getSection(6)">Client Login</a></td>'
      + '</tr>'
      + '</table>'
      + '</td>'
      + '</tr>'
      + '<tr>'
      + '<td><img src="images/main_img.gif" width="630" height="262"></td>'
      + '</tr>'
      + '</table>'	

	this.bypassTxt = ''

	this.params = new Object();
	this.variables = new Object();
	if (c) this.color = this.addParam('bgcolor', c);
	this.addParam('quality', 'high'); // default to high
	this.doDetect = getQueryParamValue('detectflash');
}

FlashObject.prototype.addParam = function(name, value) {
	this.params[name] = value;
}

FlashObject.prototype.getParams = function() {
    return this.params;
}

FlashObject.prototype.getParam = function(name) {
    return this.params[name];
}

FlashObject.prototype.addVariable = function(name, value) {
	this.variables[name] = value;
}

FlashObject.prototype.getVariable = function(name) {
    return this.variables[name];
}

FlashObject.prototype.getVariables = function() {
    return this.variables;
}

FlashObject.prototype.getParamTags = function() {
    var paramTags = "";
    for (var param in this.getParams()) {
        paramTags += '<param name="' + param + '" value="' + this.getParam(param) + '" />';
    }
    if (paramTags == "") {
        paramTags = null;
    }
    return paramTags;
}

FlashObject.prototype.getHTML = function() {
    var flashHTML = "";
    if (window.ActiveXObject && navigator.userAgent.indexOf('Mac') == -1) { // PC IE
        flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.width + '" height="' + this.height + '" id="' + this.id + '" align="' + this.align + '" onMouseWheel="this.SetVariable(\'_global.mousewheelObj.intWheelDelta\',event.wheelDelta);">';
        flashHTML += '<param name="movie" value="' + this.swf + '" />';
        if (this.getParamTags() != null) {
            flashHTML += this.getParamTags();
        }
        if (this.getVariablePairs() != null) {
            flashHTML += '<param name="flashVars" value="' + this.getVariablePairs() + '" />';
        }
        flashHTML += '</object>';
    }
    else { // Everyone else
        flashHTML += '<embed type="application/x-shockwave-flash" src="' + this.swf + '" width="' + this.width + '" height="' + this.height + '" id="' + this.id + '" align="' + this.align + '"';
        for (var param in this.getParams()) {
            flashHTML += ' ' + param + '="' + this.getParam(param) + '"';
        }
        if (this.getVariablePairs() != null) {
            flashHTML += ' flashVars="' + this.getVariablePairs() + '"';
        }
        flashHTML += '></embed>';
    }
    return flashHTML;	
}


FlashObject.prototype.getVariablePairs = function() {
    var variablePairs = new Array();
    for (var name in this.getVariables()) {
        variablePairs.push(name + "=" + escape(this.getVariable(name)));
    }
    if (variablePairs.length > 0) {
        return variablePairs.join("&");
    }
    else {
        return null;
    }
}

FlashObject.prototype.write = function(elementId) {
	if(detectFlash(this.version) || this.doDetect=='false') {
		if (elementId) {
			document.getElementById(elementId).innerHTML = this.getHTML();
		} else {
			document.write(this.getHTML());
		}
	} else {
		if (this.redirect != "") {
			document.location.replace(this.redirect);
		}
		document.write(this.altTxt +""+ this.bypassTxt);
	}		
}

function getFlashVersion() {
	var flashversion = 0;
	if (navigator.plugins && navigator.plugins.length) {
		var x = navigator.plugins["Shockwave Flash"];
		if(x){
			if (x.description) {
				var y = x.description;
	   			flashversion = y.charAt(y.indexOf('.')-1);
			}
		}
	} else {
		result = false;
	    for(var i = 15; i >= 3 && result != true; i--){
   			execScript('on error resume next: result = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'"))','VBScript');
   			flashversion = i;
   		}
	}
	return flashversion;
}

function detectFlash(ver) {	
	if (getFlashVersion() >= ver) {
		return true;
	} else {
		return false;
	}
}

// get value of querystring param
function getQueryParamValue(param) {
	var q = document.location.search;
	var detectIndex = q.indexOf(param);
	if(q.length > 1 && detectIndex != -1) {
		return q.substring(q.indexOf("=", detectIndex)+1, q.indexOf("&", detectIndex));
	} else {
		return true;
	}
}


