function jumppoints_rollover(target1, target2) {
    if(document.getElementById(target1).className == "jumppoints_active") {
        document.getElementById(target1).className = "";
    }
    else {
        document.getElementById(target1).className = "jumppoints_active";
    }
}

function fixPortfolio() {
    var browserName=navigator.appName;
    if(browserName!="Microsoft Internet Explorer") {
        document.getElementById("portfolio").setAttribute("style","top:5px; margin-top:0px; border:none;");
    }  
}
function fixPhone() {
    var browserName=navigator.appName;
    if(browserName!="Microsoft Internet Explorer") {
        document.getElementById("ctl00_ContentPlaceHolder1_tbPhone").setAttribute("style","top:5px; margin-top:0px; border:none;");
    }  
}

function playDemo() {
    var strHTML = new String();
			
    strHTML += '<object id="player" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="730" height="490" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">';
    strHTML += '<param name="movie" VALUE="http://www.omsonline.net/OMSPhantom.swf" />';
    strHTML += '<param name="allowFullScreen" VALUE="true">';
    strHTML += '<param name="allowscriptaccess" value="always" />';
    strHTML += '<param name="salign" VALUE="TL">';
    strHTML += '<param name="scale" VALUE="exactFit">';
    strHTML += '<param name="FlashVars" value="videos=il81fls35234/OMSOnline/Videos/OMS_FSI_final&fms=media01.omsonline.net&app=str" />';
    strHTML += '<embed pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always" FlashVars="videos=il81fls35234/OMSOnline/Videos/OMS_FSI_final&fms=media01.omsonline.net&app=str" salign="TL" scale="exactFit" allowFullScreen="true" src="http://www.omsonline.net/OMSPhantom.swf" type="application/x-shockwave-flash" width="730" height="490" name="player"></embed>';
    strHTML += '</object>';

    setOverlayCustom(strHTML);
    }

//**************************************************************//
//functions to display / close overlay message throughout the site
//
//displayHTML = HTML of the overlay message
//--------------------------------------------------------------//
var prevHeight = 0;
var prevWidth = 0;
function setOverlayCustom(displayHTML) {
    var overlay = document.getElementById("overlay");
    var overlay_background = document.getElementById("overlay_background");

    if(typeof displayHTML != "undefined") {
        displayHTML = "<div style=\"text-align: right;\"><a href=\"#\" onclick=\"cancelOverlay();\" style=\"background-color:#00264a; color:#FFFFFF; padding-left:3px; padding-right:3px; font-weight:bold; font-family:arial; font-size:12px; text-decoration:none;\">X</a>&nbsp;<a href=\"#\" onclick=\"cancelOverlay();\">Close</a></div>" + displayHTML;    
        overlay.innerHTML = displayHTML;
    }    

    overlay.style.display = "block";
    overlay_background.style.display = "block";

    var documentHeight = document.documentElement.clientHeight;
    //var divHeight = overlay.offsetHeight;
    var divHeight = 515;

    var documentWidth = document.body.clientWidth;
    //var divWidth = overlay.offsetWidth;
    var divWidth = 720;
    
    //NOTE: Added this because it continued to pad the height and width when repeatedly opened on same page.
    if(prevHeight > 0) {
        divHeight = prevHeight;
    }
    if(prevWidth > 0) {
        divWidth = prevWidth;
    }
    
    var maxHeight = 0;
    if(window.innerHeight) {
        if(window.innerHeight > maxHeight) { maxHeight = window.innerHeight; }
    }
    if(document.documentElement && document.documentElement.clientHeight) {
        if(document.documentElement.clientHeight > maxHeight) { maxHeight = document.documentElement.clientHeight; }
    }
    if(document.body) {
        if(document.body.clientHeight > maxHeight) { maxHeight = document.body.clientHeight; }
    }
    if(document.body.scrollHeight) { 
        if(document.body.scrollHeight > maxHeight) { maxHeight = document.body.scrollHeight; }
    }
    if(overlay.offsetHeight) {
        if(overlay.offsetHeight > maxHeight) { maxHeight = overlay.offsetHeight; }
    }
    
    overlay_background.style.height = maxHeight + "px";
    
    if(document.body.scrollWidth > overlay.offsetWidth) {
        overlay_background.style.width = document.body.scrollWidth + "px";
    }
    else {
        overlay_background.style.width = overlay.offsetWidth + "px";
    }
    
    if(divHeight > 515)  {
        divHeight = 515;
    }
    if(divWidth > 740) {
        divWidth = 740;
    }
    
    prevHeight = divHeight;
    prevWidth = divWidth;
    
    overlay.style.height = divHeight + "px";
    overlay.style.width = divWidth + "px";
    
    var xPos = (documentHeight - divHeight) / 2;
    var yPos = (documentWidth - divWidth) / 2  - 25;
    
    overlay.style.top = xPos + "px";
    overlay.style.left = yPos + "px";
}

function cancelOverlay() {
    var overlay = document.getElementById("overlay");
    var overlay_background = document.getElementById("overlay_background");

    overlay.innerHTML = "&nbsp;";
    overlay.style.display = "none";
    overlay_background.style.display = "none";
}
//**************************************************************//


function toggleActiveControl(control) {
    
    var activeClassName = "input_active";
            
    if(control.className != activeClassName) {
        control.className = activeClassName;    
    }
    else {
        control.className = ""; 
    }
            
}

function setContentHeight() {
    if(document.getElementById("maincontent").offsetHeight > document.getElementById("subcontent").offsetHeight) {
        //set the content height to the height of the main content
        document.getElementById("subcontent").style.height = (document.getElementById("maincontent").offsetHeight) + "px";
    }
    else {
        //set the content height to the height of the sub content
        document.getElementById("maincontent").style.height = document.getElementById("subcontent").offsetHeight + "px";
    }
}

function clearForm() {
    for(i=0; i<document.forms[0].elements.length; i++){
        document.forms[0].elements[i].value = "";
    }
}

function addslashes(str) {
    str=str.replace(/\'/g,'\\\'');
    str=str.replace(/\"/g,'\\"');
    str=str.replace(/\\/g,'\\\\');
    str=str.replace(/\0/g,'\\0');
    return str;
}

function stripslashes(str) {
    str=str.replace(/\\'/g,'\'');
    str=str.replace(/\\"/g,'"');
    str=str.replace(/\\\\/g,'\\');
    str=str.replace(/\\0/g,'\0');
    return str;
}

function MWJ_findObj( oName, oFrame, oDoc ) {
	if( !oDoc ) { if( oFrame ) { oDoc = oFrame.document; } else { oDoc = window.document; } }
	if( oDoc[oName] ) { return oDoc[oName]; } if( oDoc.all && oDoc.all[oName] ) { return oDoc.all[oName]; }
	if( oDoc.getElementById && oDoc.getElementById(oName) ) { return oDoc.getElementById(oName); }
	for( var x = 0; x < oDoc.forms.length; x++ ) { if( oDoc.forms[x][oName] ) { return oDoc.forms[x][oName]; } }
	for( var x = 0; x < oDoc.anchors.length; x++ ) { if( oDoc.anchors[x].name == oName ) { return oDoc.anchors[x]; } }
	for( var x = 0; document.layers && x < oDoc.layers.length; x++ ) {
		    var theOb = MWJ_findObj( oName, null, oDoc.layers[x].document ); if( theOb ) { return theOb; } }
	if( !oFrame && window[oName] ) { return window[oName]; } if( oFrame && oFrame[oName] ) { return oFrame[oName]; }
	for( var x = 0; oFrame && oFrame.frames && x < oFrame.frames.length; x++ ) {
	var theOb = MWJ_findObj( oName, oFrame.frames[x], oFrame.frames[x].document ); if( theOb ) { return theOb; } }
    return null;
}

/* Group: String manipulation */
function inStr(strSearch, charSearchFor) {
	for (i=0; i < len(strSearch); i++)
	{
	    if (charSearchFor == mid(strSearch, i, len(charSearchFor)))
	    {
			return i;
	    }
	}
	return -1;
}

function len(str) {
    return String(str).length;
}

function mid(str, start, len) {
    if (start < 0 || len < 0) return "";

    var iEnd, iLen = String(str).length;
    if (start + len > iLen) {
        iEnd = iLen;
    }
    else {
        iEnd = start + len;
    }
    
    return String(str).substring(start,iEnd);
}

function left(str, n) {
    if (n <= 0) {    // Invalid bound, return blank string
        return "";
    }
    else if (n > String(str).length) {  // Invalid bound, return
        return str;                // entire string
    }
    else { // Valid bound, return appropriate substring
        return String(str).substring(0,n);
    }
}

function right(str, n) {
    if (n <= 0) {    // Invalid bound, return blank string
        return "";
    }
    else if (n > String(str).length) {  // Invalid bound, return
        return str;                     // entire string
    }    
    else { // Valid bound, return appropriate substring
        var iLen = String(str).length;
        return String(str).substring(iLen, iLen - n);
    }
}

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.addParam('wmode', 'opaque');  //added
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' wmode="opaque" id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" '; //added
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	if (window.opera || !document.all) return;
	var objects = document.getElementsByTagName("OBJECT");
	for (var i=0; i < objects.length; i++) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in fp9 see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
deconcept.SWFObjectUtil.prepUnload = function() {
	__flash_unloadHandler = function(){};
	__flash_savedUnloadHandler = function(){};
	if (typeof window.onunload == 'function') {
		var oldUnload = window.onunload;
		window.onunload = function() {
			deconcept.SWFObjectUtil.cleanupSWFs();
			oldUnload();
		}
	} else {
		window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
	}
}
if (typeof window.onbeforeunload == 'function') {
	var oldBeforeUnload = window.onbeforeunload;
	window.onbeforeunload = function() {
		deconcept.SWFObjectUtil.prepUnload();
		oldBeforeUnload();
	}
} else {
	window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload;
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;

function popUp (page, location) {
window.open(page,location); 
}