//JONK's getAcuElementById------
// some browser sniffing:
document.version = parseFloat(navigator.appVersion);
document.hostApplication = navigator.appName.substring(0,3);
document.browserClass = parseInt(document.version);
			
if(document.browserClass < 4) 
{
 // redirect -- no CSS support
 // if you used &lt;script language=javascript1.2&gt; 
 // this won't be necessary
 // ALL this code will be ignored!
}
else      // isolate this setup from "modern" browsers!!
if(document.browserClass == 4) // might need to check NN5 browsers as well
{

	if(document.hostApplication == "Net") // got netscape?
	{
		  // need to "fake" the style attribute
		  // so we add a little misdirection
		  // by creating an object that will
		  // intercept the property setting.
		  // we make NN think it's setting properties 
		  // in A style object, when it is actually
		  // redirected to set the property to the actual layer
		   // and you might have thought it couldn't be done...
		 function _style()
		 {
		  this.layerRef = null;    // this will be set when <B style="COLOR: black; BACKGROUND-COLOR: #ffff66">getElementByID</B> is called

		  /* we don't actually need these -- it's just pseudocode
		  this.visibility = "";
		  this.top = 0;
		  this.left = 0;
		  */
						   
		   // very cool method in NN (only) -- 
		   // since these aren't "real" object properties
		   // it's more like a watchdog
		   // for more info -- check Netscape's docs
		  this.watch("visibility", 
		     function(id, old, nval) 
		      {  // set the "real" property of the layer here
		       eval("this.layerRef." + id + " = '" + nval + "'");
		       return nval; });
		        // you must return either old or nval
		  this.watch("top",
		     function(id, old, nval) {
		       eval("this.layerRef." + id + " = '" + nval + "'");
		      return nval;});
		  this.watch("left",
		     function(id, old, nval) {
		       eval("this.layerRef." + id + " = '" + nval + "'");
		      return nval;});
						  
		   // note: all the inline functions are exactly the same
		   //  you can cut'n'paste for each property you need to watch!
		}

	 // here we set up the "appearance" of a style property

	 Layer.prototype.style = new _style();
	  // each time a new layer is created, a new _style() object
	  // is attached to it
				    
	} // end if NN

	 // here, getElementById is getting declared by BOTH IE4 and NN4 browsers
	document.getAcuElementById = function(name)
	{
		if(document.hostApplication == "Net") // netscape 4
		{
			if (document.browserClass == 4){
				var lyr = eval("document." + name);
						   
			 // only need to do this once, but
			 // what the hey...
			 if(lyr.style != null) lyr.style.layerRef = lyr;
								    
			return lyr;
			}else{
				return document.layers('" + name + "');
			}
		}
		  else // IE
		  {
			return eval("document.all." + name);
		  }
  }
}else // end browserClass == 4
	{
	if(document.hostApplication == "Net"){
		document.getAcuElementById = function(name){
				if(!eval("document." + name)){
					return document.getElementById(name);
				}else{
					return eval("document." + name);
				}
			}
	}else
	{
		document.getAcuElementById = function(name){
				return document.getElementById(name);
			}
	}
}
//END JONK's getAcuElementById---------

//- for auto date footer
today=new Date();
y0=today.getFullYear();

//HNT getElementByAny
function getElementByAny(any)
{
	var elmnt;
	if(elmnt = document.getElementById(any)) {
		return elmnt;
	} else {
		elmnt = document.getElementsByName(any).item(0);
		return elmnt;
	}
}
//END HNT



function doNotDelete(){
	alert('This function should never be called.');
}

var timeOn = null;
numMenus = 7;
document.onmouseover = hideAllMenus;
document.onclick = hideAllMenus;

//prevent js errors from showing (doesn't work in IE)
window.onerror = null;

// initialize hacks whenever the page loads
window.onload = initializeHacks;

function showMenu(menuNumber, eventObj) {
    hideAllMenus();
	if(document.layers) {
	img = getImage("img" + menuNumber);
 	x = getImagePageLeft(img);
 	y = getImagePageTop(img);
 	menuTop = y + 22; // LAYER TOP POSITION - should be set to the height of the image button
	eval('document.layers["menu'+menuNumber+'"].top="'+menuTop+'"');
 	eval('document.layers["menu'+menuNumber+'"].left="'+x+'"');
	}
	eventObj.cancelBubble = true;
    var menuId = 'menu' + menuNumber;
    if(changeObjectVisibility(menuId, 'visible')) {
		return true;
    } else {
		return false;
    }
}

// MENU MOUSE OVER 
function menuOver() {
 clearTimeout(timeOn);
}

// MENU MOUSE OUT 
function menuOut() {
 if(document.layers) {
 	timeOn = setTimeout("hideAllMenus()", 400);
  }
}

function hideAllMenus() {
    for(counter = 1; counter <= numMenus; counter++) {
		changeObjectVisibility('menu' + counter, 'hidden');
    }
}

function changeObjectVisibility(objectId, newVisibility) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
		styleObject.visibility = newVisibility;
		return true;
    } else {
	//we couldn't find the object, so we can't change its visibility
		return false;
    }
} 

function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
		// W3C DOM
		return document.getElementById(objectId).style;
    }else if (document.all && document.all(objectId)) {
		// MSIE 4 DOM
		return document.all(objectId).style;
    }else if (document.layers && document.layers[objectId]) {
		// NN 4 DOM.. note: this won't find nested layers
		return document.layers[objectId];
    }else {
		return false;
    }
} 

// SET BACKGROUND COLOR 
function getImage(name) {
  if (document.layers) {
    return findImage(name, document);
  }
  return null;
}

function findImage(name, doc) {
  var i, img;
  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {
  var x, obj;
  if (document.layers) {
    if (img.container != null)
      return img.container.pageX + img.x;
    else
      return img.x;
  }
  return -1;
}

function getImagePageTop(img) {
  var y, obj;
  if (document.layers) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  return -1;
}

/*function moveObject(objectId, newXCoordinate, newYCoordinate) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
		styleObject.left = newXCoordinate;
		styleObject.top = newYCoordinate;
		return true;
    } else {
	// we couldn't find the object, so we can't very well move it
		return false;
    }
} */



// ***********************
// hacks and workarounds *
// ***********************

// setup an event handler to hide popups for generic clicks on the document
function initializeHacks() {
    // this ugly little hack resizes a blank div to make sure you can click
    // anywhere in the window for Mac MSIE 5
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
		&& (navigator.platform.indexOf('Mac') != -1)
		&& getStyleObject('blankDiv')) {
			window.onresize = explorerMacResizeFix;
    }
    resizeBlankDiv();
    // this next function creates a placeholder object for older browsers
    createFakeEventObj();
}

function createFakeEventObj() {
    // create a fake event object for older browsers to avoid errors in function call
    // when we need to pass the event object to functions
    if (!window.event) {
	window.event = false;
    }
}

function resizeBlankDiv() {
    // resize blank placeholder div so IE 5 on mac will get all clicks in window
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
	getStyleObject('blankDiv').width = document.body.clientWidth - 20;
	getStyleObject('blankDiv').height = document.body.clientHeight - 20;
    }
}

function explorerMacResizeFix () {
    location.reload(false);
}

/*function mClk(src){ 
	if(event.srcElement.tagName=='TD')
		src.children.tags('A')[0].click();
}*/

function addEvent(obj, evtName, fn) {
	try{removeEvent(obj, evtName, fn)}catch(e){}
	if (obj.addEventListener) {
		obj.addEventListener(evtName, fn, false);
	} else if (obj.attachEvent) {
		obj.attachEvent('on' + evtName, fn);
	} else {
		obj['on' + evtName] = fn;
	}
}
						
function removeEvent(obj, evtName, fn) {
	try {
		if (obj.removeEventListener) {
			obj.removeEventListener(evtName, fn, false);
		} else if (obj.detachEvent) {
			obj.detachEvent('on' + evtName, fn);
		} else {
			obj['on' + evtName] = null;
		}
	} catch(e){}
}

/*********************
* FLASH DISPLAY CODE
* BEGIN
**********************/

var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ) {
	// Check for Flash version 4 or greater in Netscape
	var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=8)
		UseFlash = 1;
} else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	// Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
	UseFlash = 1;
}
// Allow the cookie to override
if (document.cookie && (document.cookie.indexOf("FlashRenderOption=P") >= 0)) {
	UseFlash = 1;
} else if (document.cookie && (document.cookie.indexOf("FlashRenderOption=I") >= 0)) {
	UseFlash = 0;
}

//EOLAS IE flash workaround
function displayFlash(sFlashSource, sStaticSource, iWidth, iHeight, sContentid, sFlashvars, sUrl, sAutoplay) {
	if (DetectFlashVer(8, 0, 0)) {
		if (sAutoplay != "false"){
			sAutoplay = "true"; }
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16,0" id="' + sContentid + '"');
		if(iWidth > 0){
			document.write(' width="'+ iWidth +'"');}
		if(iHeight > 0){
			document.write(' height="' + iHeight + '"');}
		document.write('">');
		document.write('<PARAM name="movie" value="' + sFlashSource  + '">');
		document.write('<PARAM name="quality" value="high">');
		//document.write('<param name="bgcolor" value="#FFFFFF" />');
		document.write('<param name="play" value="' + sAutoplay  + '" / >');
		//document.write('<param name="scale" value="noborder" />');
		document.write('<param name="align" value="l" />');
		document.write('<param name="salign" value="tl" />');
		document.write('<param name="wmode" value="transparent" />');
		document.write('<param name="menu" value="true" />');
		document.write('<param name="flashvars" value="' + sFlashvars + '" />');
		document.write('<EMBED src="' + sFlashSource  + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="' + sContentid + '"');
		if(iWidth > 0){
			document.write(' width="'+ iWidth +'"');}
		if(iHeight > 0){
			document.write(' height="' + iHeight + '"');}
		document.write(' play="' + sAutoplay  + '" align="l" salign="tl" wmode="transparent" menu="true" loop="true" autostart="' + sAutoplay  + '" flashvars="' + sFlashvars + '"');
		document.write('</EMBED>');
		document.write('</OBJECT>');
	} 
		else {
			if (sStaticSource.length > 0){
				document.write('<a href="' + sUrl + '">');
				document.write('<IMG src="' + sStaticSource + ' "class="borderless"');
				if(iWidth > 0){
					document.write(' width="'+ iWidth +'"');}
				if(iHeight > 0){
					document.write(' height="' + iHeight + '"');}
				document.write(' alt="">');}
				document.write('</a>');
				document.write('<br />&#160;<a href="http://www.adobe.com/go/getflash/" target="blank">Get Flash Player</a>');
				
				
	}
}

function switchSiteLanguagePage(currentlanguage,sectionpath,currentpageid,actionid,primarypageid) {
	var objDropdown, pageid, i
	objDropdown = document.getElementById('sitelanguage')
	pageid = objDropdown.options[objDropdown.selectedIndex].value
	if (pageid > 0) {
		location = '/?sectionpath=' + sectionpath + '&pageid=' + pageid + '&processor=content'
	}
}

var g_complexLinkType2Div = '';
function toggleComplexLinkType2Div(div, div11) {
	var actDiv;

	actDiv = document.getAcuElementById(div11);
	if (actDiv) { 
		actDiv.style.display = 'none';
		actDiv.style.height = '0px';
	}

	if (g_complexLinkType2Div.length > 0) {
		actDiv = document.getAcuElementById(g_complexLinkType2Div);
		if (actDiv) { 
			actDiv.style.display = 'none';
			actDiv.style.height = '0px';
//			actDiv.style.padding = '0px';
//			actDiv.style.margin = '0px';
			g_complexLinkType2Div = div;
		} else {
			g_complexLinkType2Div = '';
		}
	} else 
		g_complexLinkType2Div = div;
	actDiv = document.getAcuElementById(div);
	if (actDiv) actDiv.style.display = 'block';
	
	return true;
}

// HNT add to count words BEGIN
WordCount = function () {
	
	this.count = 0;
	
	this.countWords = function(words) {
		var str =	this.stripHTML(words);
//alert (str);
		//alert (chars);

		str =	str+" a ";	// word	added to avoid error
		str =	trim(str.replace(/&nbsp;/gi,' ').replace(/([\n\r\t])/g,' ').replace(/&(.*);/g,'	'));
//alert ("str = '" + str + "', " + str.length);  
		var count	= 0;
		for(x=1;x<str.length;x++){
			if(str.charAt(x)==' ' && str.charAt(x-1)!=' '){
//alert ("[" + str.charAt(x) + "] {" + str.charAt(x-1) + "}");
			count++;
			}  
		}
//alert(count);		
		if(str.charAt(str.length-1) != " "){
			count++;
		}	
//alert(count);		
		count =	count -	1; // extra	word removed
		this.count += count;
//		alert(lblCountTotal+": "+this.count+', '+count);
	};
	
	this.stripHTML = function(strU) {
		//strip all javascript
		var	strN = strU.replace(new RegExp("<script [^>]*>.*?<\/script>", "ig")," ");
		strN = strN.replace("%3CP%3E%0D%0A%3CHR%3E", "%3CHR%3E");
		strN = strN.replace("%3CHR%3E%0D%0A%3C/P%3E", "%3CHR%3E");
		strN = unescape(strN);
		return stripHTML(strN);
	};
		
	this.totalWords = function() {
		return this.count;
	};
}

function stripHTML(strU) {
	//count alt of a html element.
	var	strN = strU.replace(/<a[^>]*alt=(['"])([^\1>]*)\1[^>]*>/ig," $2 ");
	//strip	all	html
	strN = strN.replace(/(<([^>]+)>)/ig," ");
	//replace carriage returns and line	feeds
	strN = strN.replace(/\r\n/g," ");
	strN = strN.replace(/\n/g," ");
	strN = strN.replace(/\r/g," ");	
	strN = trim(strN);
	return strN;
}

function trim(inputString) {
	if (typeof inputString !=	"string"){
		return inputString;
	}
	inputString =	inputString.replace(/^\s+|\s+$/g, " ").replace(/\s{2,}/g, " ");
	return inputString;
}		

function initObjCountWords() {
//alert("call initObjCountwords ");
	var countword = document.forms['dummy'].countword;
	var div = document.getAcuElementById('totalwords');
	if (countword != null) {
		var objCountWords;
		objCountWords = new WordCount();
		objCountWords.countWords(countword.value)
		if (div != null)
			div.innerHTML = 'Total words: ' + objCountWords.totalWords();
		countword.value = '';
	}
}


var	replacements = new Array (
	new	RegExp(String.fromCharCode(145),'g'), "'",
	new	RegExp(String.fromCharCode(146),'g'), "'",
	new	RegExp("'"), "&#39;",
	//convert all types	of double quotes
	new	RegExp(String.fromCharCode(147),'g'), "\"",
	new	RegExp(String.fromCharCode(148),'g'), "\"",
	//new RegExp("\""),	"&#34;",
	//replace carriage returns & line feeds
	new	RegExp("[\r\n]",'g'), "	");

function htmlSafe(html) {
	html = trim(html);
	for	(i=0; i<replacements.length; i = i+2) {
		html = html.replace(replacements[i], replacements[i+1]);
	}
	return html;
}

// HNT add to count words END

//adding this to end as a quick fix- should be own file
// Flash Player Version Detection - Rev 1.5
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;			
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
    if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } else {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
  		str += '> </embed>';
    }

    document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}




function flashCheck(){
if (!DetectFlashVer(8, 0, 0)){
alert("Flash player version 8 or higher is required for proper viewing.");}
}

function cookieCheck(){
		var date = new Date();
		date.setTime(date.getTime()+(1000));
		var expires = "; expires="+date.toGMTString();
		document.cookie = "test=test"+expires+"; path=/";
		var nameEQ = "test=";
		var ca = document.cookie.indexOf(nameEQ);
		//alert(document.cookie);
		//alert("ca " + ca);
		if (ca == -1){
		alert("This site requires the use of a cookie to maintain chosen language and region settings. Please add Midtronics to your list of trusted sites.");
		document.write("<table><tr><td><b>If you are using Internet Explorer 6 or higher, double click on the privacy icon at the bottom of your browser window. ");
		document.write("Select our website and click on the 'Summary' button. This will show a condensed version of our privacy policy. ");
		document.write("Please select 'Always allow this site to use cookies' to continue.</b></td></tr></table><hr />");}
		else
		{
		document.cookie = "test=test;expries=Mon, 15 Jan 2007 12:00:00; path=/";
		
		}

}
