// JavaScript Document
addLoadListener(loadFlash);
addLoadListener(startList);
addLoadListener(externalLinks);

function addLoadListener(fn){
	if (typeof window.addEventListener != 'undefined'){
		window.addEventListener('load', fn, false);
	}else if (typeof document.addEventListener != 'undefined'){
		document.addEventListener('load', fn, false);
	}else if (typeof window.attachEvent != 'undefined'){
		window.attachEvent('onload', fn);
	}else{
		var oldfn = window.onload;
		if (typeof window.onload != 'function'){
			window.onload = fn;
		}else{
			window.onload = function(){
				oldfn();
				fn();
			};
		}
	}
}
function loadFlash(){
	if(document.getElementById("flashContent")){
		var flashDiv = document.getElementById("flashContent");
		var fc = "<object type='application/x-shockwave-flash' data='Images/flotech.swf' width='750' height='200' id='FlotechMain'>\n";
		fc += "<param name='movie' value='Images/flotech.swf' />\n";
		fc += "<param name='allowScriptAcess' value='sameDomain' />\n";
		fc += "<param name='quality' value='best' />\n";
		fc += "<param name='scale' value='noScale' />\n";
		fc += "<param name='salign' value='TL' />\n";
		fc += "<param name='wmode' value='transparent' />\n";
		fc += "</object>";
		flashDiv.innerHTML = fc;
	}
}
function startList(){
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav_248770");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
 	}
}
function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
