// $Id: external.js 14340 2006-11-13 16:21:34Z ckbisk $
var canonicalHost = 'www.iet.webfactional.com'
if (location.host != canonicalHost && location.protocol != "file:") {
	theRest = location.href
	theRest = theRest.substr(theRest.indexOf(location.host))
	theRest = theRest.substr(theRest.indexOf('/'))
	location.href=location.protocol+'//'+canonicalHost+theRest
}


//ROLLOVER FUNCTION

if (document.images) {
	button1on = new Image();
	button1on.src = "Images/fp_nav1_ro.jpg";
	button1off = new Image();
	button1off.src = "Images/fp_nav1.jpg";
	
	button2on = new Image();
	button2on.src = "Images/fp_nav2_ro.jpg";
	button2off = new Image();
	button2off.src = "Images/fp_nav2.jpg";
	
	button3on = new Image();
	button3on.src = "Images/fp_nav3_ro.jpg";
	button3off = new Image();
	button3off.src = "Images/fp_nav3.jpg";
	
	button4on = new Image();
	button4on.src = "Images/fp_nav4_ro.jpg";
	button4off = new Image();
	button4off.src = "Images/fp_nav4.jpg";
	
	button5on = new Image();
	button5on.src = "Images/fp_nav5_ro.jpg";
	button5off = new Image();
	button5off.src = "Images/fp_nav5.jpg";
	
	button6on = new Image();
	button6on.src = "Images/fp_splash1_ro.jpg";
	button6off = new Image();
	button6off.src = "Images/fp_splash1.jpg";
	
	button7on = new Image();
	button7on.src = "Images/secnav1_ro.jpg";
	button7off = new Image();
	button7off.src = "Images/secnav1.jpg";
	
	button8on = new Image();
	button8on.src = "Images/secnav2_ro.jpg";
	button8off = new Image();
	button8off.src = "Images/secnav2.jpg";
	
	button9on = new Image();
	button9on.src = "Images/secnav3_ro.jpg";
	button9off = new Image();
	button9off.src = "Images/secnav3.jpg";
	
	button10on = new Image();
	button10on.src = "Images/secnav4_ro.jpg";
	button10off = new Image();
	button10off.src = "Images/secnav4.jpg";
	
	button11on = new Image();
	button11on.src = "Images/secnav5_ro.jpg";
	button11off = new Image();
	button11off.src = "Images/secnav5.jpg";
}


function turnOn(imageName) {
	if (document.images) {
		document[imageName].src = eval(imageName + "on.src");
	}
}


function turnOff(imageName) {
	if (document.images) {
		document[imageName].src = eval(imageName + "off.src");
	}
}


function Start(page) {
	OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resize=yes");
}


// EMAIL VALIDATION

function validate() {
	x=document.myForm
	at=x.myEmail.value.indexOf("@")
	if (at == -1) {
		alert("Not a valid e-mail")
		return false
	}
	return true
}


// COPYRIGHT FUNCTION

function showCopyright() {
	var d = new Date()
	document.write("&copy; ");
	document.write(d.getFullYear())
	document.write(" IET, Inc. All Rights Reserved.");
}


function include_dom(script_filename) {
	var html_doc = document.getElementsByTagName('head').item(0);
	var js = document.createElement('script');
	js.setAttribute('language', 'javascript');
	js.setAttribute('type', 'text/javascript');
	js.setAttribute('src', script_filename);
	html_doc.appendChild(js);
}

_uacct = "UA-414768-1"
include_dom("http://www.google-analytics.com/urchin.js")
function try_try_again() {
	try {
		_uacct = "UA-414768-1"
		urchinTracker()
	} catch(err) {
		setTimeout("try_try_again()", 2000)
	}
}
setTimeout("try_try_again()", 3000)

