    var agt=navigator.userAgent.toLowerCase();

    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);

	var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	var is_ie3    = (is_ie && (is_major < 4));
	var is_ie4    = (is_ie && (is_major == 4) && ((agt.indexOf("msie 5")==-1) && (agt.indexOf("msie 6")==-1) && (agt.indexOf("msie 7")==-1)) );
	var is_ie4up  = (is_ie && (is_major >= 4));
	var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
	var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
	var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1));
	var is_ie7up    = (is_ie && (is_major == 4) && (agt.indexOf("msie 7.") !=-1));
	var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
	var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);

	if(!is_ie5up){is_ie5up = (is_ie7up);}
	if(!is_ie5_5up){is_ie5_5up = (is_ie7up);}

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    var is_webtv = (agt.indexOf("webtv") != -1); 

    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

//||||||||||||||||||||||||||||||||||||||||||||||
if (is_ie4) {
	document.write("<LINK REL=STYLESHEET HREF=\"/css/ie_style.css\" TYPE=\"text/css\">");
	}
else if (is_ie5up) {
	document.write("<LINK REL=STYLESHEET HREF=\"/css/ie_style.css\" TYPE=\"text/css\">");
	}
else if (is_nav6up) {
	document.write("<LINK REL=STYLESHEET HREF=\"/css/ns6_style.css\" TYPE=\"text/css\">");
	}
else{
	document.write("<LINK REL=STYLESHEET HREF=\"/css/ie_style.css\" TYPE=\"text/css\">");
}
//||||||||||||||||||||||||||||||||||||||||||||||
if (navigator.javaEnabled()) {
	var is_java = true;
}else {
	var is_java = false;
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCVoid(){
	}

//||||||||||||||||||||||||||||||||||||||||||||||
//setTimeout ('FramesOut()', 100);
function FramesOut() {
	if (self.top.frames.length != 0)
		self.top.location.replace(self.document.location.href);
	}


//||||||||||||||||||||||||||||||||||||||||||||||
var ADCdialogWin = null;
var ADCdialogWin = new Object();
var key_date = null;
var key_date = new Date();
ADCdialogWin.key = ('win' + 
key_date.getUTCHours() + 
key_date.getUTCMinutes() +
key_date.getUTCSeconds() +
key_date.getUTCMilliseconds());
key_date = null;

document.cookie = 'ADCdialogWinKey=' + ADCdialogWin.key;
//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialog(url, width, height, refreshOpener, forceOnTop) {
	if (!ADCdialogWin.win || (ADCdialogWin.win && ADCdialogWin.win.closed)) {
		ADCdialogWin.url = url;
		ADCdialogWin.width = width;
		ADCdialogWin.height = height;
		ADCdialogWin.name = 'ADCdialogWin';

		if (is_nav4) {
			// Center on the main window.
			ADCdialogWin.left = window.screenX + ((window.outerWidth - ADCdialogWin.width) / 2);
			ADCdialogWin.top = window.screenY + ((window.outerHeight - ADCdialogWin.height) / 2);
			var attr = "screenX=" + ADCdialogWin.left + 
			   ",screenY=" + ADCdialogWin.top + ",resizable=yes,status=yes,scrollbars=yes,width=" + 
			   ADCdialogWin.width + ",height=" + ADCdialogWin.height;
		} else {
			// The best we can do is center in screen.
			ADCdialogWin.left = (screen.width - ADCdialogWin.width) / 2;
			ADCdialogWin.top = (screen.height - ADCdialogWin.height) / 2;
			var attr = "left=" + ADCdialogWin.left + ",top=" + 
			   ADCdialogWin.top + ",resizable=yes,status=yes,scrollbars=yes,width=" + ADCdialogWin.width + 
			   ",height=" + ADCdialogWin.height;
		}
		ADCdialogWin.win=window.open(ADCdialogWin.url, ADCdialogWin.name, attr);
		if (!ADCdialogWin.win){alert('It appears that you are using a popup blocker. Please add this site to the allowed sites list.'); return}
		ADCdialogWin.win.focus();
		if (forceOnTop == 1){
			setTimeout('ADCopenDialogBlockEvents()', 50);
		}
		//setTimeout('ADCopenDialogChildReadyState()', 500);
		setTimeout('ADCopenDialogNotifyChildClosed()', 500);
		if (refreshOpener == 1){
			setTimeout('ADCopenDialogOpenerReload()', 500);
		}
		if (timer_ADCstartParentSessionTimer != null){
			clearTimeout(timer_ADCstartParentSessionTimer);
			ADCparentSession.session_timeout = ADCparentSession.session_total;
		}
	} else {
		if (forceOnTop == 1){
			ADCdialogWin.win.focus();
		}
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialogChildReadyState(){
	var theWin = ADCdialogWin.win
	if (theWin.document.readyState == 'complete') {
		//alert('done');
	}
	else{
		setTimeout('ADCopenDialogChildReadyState()', 500);
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialogNotifyChildClosed(){
	if (ADCdialogWin.win && ADCdialogWin.win.closed) {
		if (self.ADCparentSessionRenewTimer){
			ADCparentSessionRenewTimer();
		}
		self.focus();
	}
	else{
		setTimeout('ADCopenDialogNotifyChildClosed()', 500);
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialogOpenerReload(){
	if (ADCdialogWin.win && ADCdialogWin.win.closed) {
		if (document.forms['AssmntNavigator']){
			document.forms['AssmntNavigator'].submit();
		}
		else{
			self.location.replace(self.location.href);
		}
	}
	else{
		setTimeout('ADCopenDialogOpenerReload()', 500);
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialogDeadend() {
	if (ADCdialogWin.win && !ADCdialogWin.win.closed) {
		ADCdialogWin.win.focus();
		return false;
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
var IELinkClicks
function ADCopenDialogDisableForms() {
	IELinkClicks = new Array();
	for (var i = 0; i < document.forms.length; i++) {
		for (var j = 0; j < document.forms[i].elements.length; j++) {
			document.forms[i].elements[j].disabled = true;
		}
		for (i = 0; i < document.links.length; i++) {
			IELinkClicks[i] = document.links[i].onclick;
			document.links[i].onclick = ADCopenDialogDeadend;
		}
	}
}
function ADCopenDialogEnableForms() {
	for (var i = 0; i < document.forms.length; i++) {
		for (var j = 0; j < document.forms[i].elements.length; j++) {
			document.forms[i].elements[j].disabled = false;
		}
	}
	for (i = 0; i < document.links.length; i++) {
		document.links[i].onclick = IELinkClicks[i];
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialogUnblockEvents() {
	if (is_ie5up){document.body.style.visibility = 'visible';}
	if (ADCdialogWin){
		document.onunload = ADCdialogWin.save_onunload_parent;
	}
	window.onmouseover = null;
	window.onmousedown = null;
	window.onclick = null;
	window.onfocus = null;
	var ADCdialogWin = null;
	if (is_ie5up){return;}
	if (is_nav) {
		window.releaseEvents(Event.CLICK | Event.MOUSEDOWN | Event.MOUSEUP | Event.FOCUS);
	}
	else {
		ADCopenDialogEnableForms();
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialogBlockEvents() {
	if (is_ie5up){document.body.style.visibility = 'hidden';}
	window.onfocus = ADCopenDialogCheckModal;
	window.onmouseover = ADCdialogWin.win.focus;
	window.onmousedown = ADCdialogWin.win.focus;
	if (document.onunload == null){
		ADCdialogWin.save_onunload_parent = '';
	}
	else{
		ADCdialogWin.save_onunload_parent = document.onunload;
	}
	document.onunload = ADCdialogWin.win.close;
	if (is_ie5up){return;}
	if (is_nav) {
		window.captureEvents(Event.CLICK | Event.MOUSEDOWN | Event.MOUSEUP | Event.FOCUS);
		window.onclick = ADCopenDialogDeadend;
	} else {
		ADCopenDialogDisableForms();
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCopenDialogCheckModal(){
	setTimeout('ADCopenDialogCheckModalfocus()',100);
}
function ADCopenDialogCheckModalfocus() {
	theWin = ADCdialogWin.win;
	if ((theWin) && (!theWin.closed)) {
		theWin.focus();
	}
	else{
		ADCopenDialogUnblockEvents();
		self.focus();
	}
}

//||||||||||||||||||||||||||||||||||||||||||||||
function validatePIN(PIN) {
	the_form = document.forms['TestViaPin'];
	if(the_form && the_form.TESTPIN){
		var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-";
		var checkStr = the_form.TESTPIN.value;
		var allValid = true;
		var decPoints = 0;
		var allNum = "";
		for (i = 0;  i < checkStr.length;  i++)
		{
		  ch = checkStr.charAt(i);
		  for (j = 0;  j < checkOK.length;  j++)
		    if (ch == checkOK.charAt(j))
		      break;
		  if (j == checkOK.length)
		  {
		    allValid = false;
		    break;
		  }
		  allNum += ch;
		}
		if (!allValid)
		{
		  alert("Invalid Pin.");
		  return (false);
		}
		if (the_form.TESTPIN.value == "")
		{
		  alert("Invalid Pin.");
		  return (false);
		}
		if (the_form.TESTPIN.value.length < 14 || the_form.TESTPIN.value.length > 16)
		{
		  alert("Invalid Pin.");
		  return (false);
		}
	}
	ADCopenDialog('/account_assessments/initialize_assessment.asp?ADEW9FBW66ZOW8B53YKKPT75LGH4MQR2P7KABNIR=' + PIN, 700, 500, 0, 1);
	return;
	}

//||||||||||||||||||||||||||||||||||||||||||||||
function ADCdisable_contextmenu(){
	this.src_item = window.event.srcElement;
	if ((this.src_item.type != 'text') && (this.src_item.type != 'textarea')){
		return false;
	}
}
//||||||||||||||||||||||||||||||||||||||||||||||
function ADCdisable_right_click (e){
	var event_number = 0;
	if (is_ie){
		event_number = event.button;
	}
	else if (is_nav){
		event_number = e.which;
	}
	if (event_number == 2 || event_number == 3){
		if (is_ie4){
			this.src_item = window.event.srcElement;
			if ((this.src_item.type != 'text') && (this.src_item.type != 'textarea')){
				alert('© Assessments.com')
			}
		}
		return false;
	}
	else{
		return true;
	}
}
//||||||||||||||||||||||||||||||||||||||||||||||
function ADCcheck_mousekey (){
	var keycode = event.keyCode;
	if ((keycode == 93)){
		ADCdisable_contextmenu;
	}
}
//||||||||||||||||||||||||||||||||||||||||||||||
function ADCtrap_page_mouse_events(){
	if (document.images){
		for (var pic=0; pic < document.images.length; pic++){
			document.images[pic].onmousedown = null;
		}
	}
	if (is_ie){ 
		document.oncontextmenu = ADCdisable_contextmenu;
		document.onmousedown = ADCdisable_right_click;
		self.focus (); 
		document.onkeydown = ADCcheck_mousekey;
	}
	else if (is_nav){
		if (is_nav6){
			document.onmouseup = ADCdisable_right_click;
			document.onmousedown = ADCdisable_right_click;
			document.captureEvents (Event.MOUSEDOWN);
			document.captureEvents (Event.MOUSEUP);
		}
		else{
			document.onmousedown = ADCdisable_right_click;
			document.captureEvents (Event.MOUSEDOWN);
		}
	}
}
if (is_ie4){
	eval('function document.getElementById(item){return document.all(item);}'
	+ 'function document.getElementsByTagName(item){return document.all.tags(item);}'
	+ 'function document.getElementsByName(item){return document.all(item);}')
}
function ADCblinkItem(item){
	setTimeout('ADCdoBlinkItem(item)', 1000);
	setTimeout('ADCdoBlinkItem(item)', 2000);
	setTimeout('ADCdoBlinkItem(item)', 3000);
	setTimeout('ADCdoBlinkItem(item)', 4000);
}
function ADCdoBlinkItem(item){
	if (item.style.visibility == 'visible'){item.style.visibility = 'hidden';}
	if (item.style.visibility == 'hidden'){item.style.visibility = 'visible';}
}
function replace(string,find,replace_with) {var strLength = string.length, txtLength = find.length;if ((strLength == 0) || (txtLength == 0)) return string;var i = string.indexOf(find);if ((!i) && (find != string.substring(0,txtLength))) return string;if (i == -1) return string;var newstr = string.substring(0,i) + replace_with;if (i+txtLength < strLength)newstr += replace(string.substring(i+txtLength,strLength),find,replace_with);return newstr;}
//||||||||||||||||||||||||||||||||||||||||||||||
include_loaded = true;
var PermissionDeniedMessage = ('Permission Denied.\n\nPlease contact your Administrator.');