<!--

function isInteger(s) {
	return (s.toString().search(/^-?[0-9]+$/) == 0);
}

function imgHilite(id) {
	if (getObject(id)) {
		getObject(id).src = getObject(id).src.replace(/_off\.gif$/,'_on.gif');
	}
}

function imgUnHilite(id) {
	if (getObject(id)) {
		getObject(id).src = getObject(id).src.replace(/_on\.gif$/,'_off.gif');
	}
}



function customDateString(oneDate) {

	var theDay = dayNames[oneDate.getDay() + 1];

	var theMonth = monthNames[oneDate.getMonth() + 1];

	var theYear = oneDate.getFullYear();

	return theDay.substring(0,3).toUpperCase() + "  |  " + theMonth.toUpperCase() + " " + oneDate.getDate() + ", " + theYear;

}



function DropdownChooser(obj,tgt,revert) {

	if (obj[obj.selectedIndex].value != '') {

		dest = obj[obj.selectedIndex].value;

		if (revert == 1) { obj.selectedIndex = 0; }

		if (tgt != '') {

			window.open(dest,tgt);

		}

		else {

			window.location = dest;

		}

	}

}



function SpawnWin(URL,W,H,Name) {

	var Spawned = window.open(URL,Name,"width="+W+",height="+H+",resizable=1,fullscreen=0");

	Spawned.window.focus();

}



function getObject(myid) {

	if ((HM_IE) || (HM_DOM)) {

		// Explorer

		if (HM_IE){

			return (document.all[myid]);

		}

		// DOM Browsers

		else if (HM_DOM) {

			return (document.getElementById(myid));

		}

	}

	else {

		return (false);

	}

}



function showItem(myid,mydisplay) {

	if (mydisplay == "none") {

		getObject(myid).style.display = 'none';

		getObject(myid).style.visibility = 'hidden';

	}

	else if (mydisplay == "block") {

		getObject(myid).style.display = 'block';

		getObject(myid).style.visibility = 'visible';

	}

}



function showNews(id) {

	if (id) {

		if (toggleItem(id,1) == 1) {

			imgHilite(id+'_trig'); // Must have matching triangle as _trig

			SI.ClearChildren.clear(); // Used to reserve space for fading object

			return;

		}

		else {

			imgUnHilite(id+'_trig'); // Must have matching triangle as _trig

			return;

		}

	}

}



function toggleItem(myid, blnFade) {

	if (getObject(myid)) {

		var itemState = getObject(myid).style.display;

		if (itemState != 'none') {

			if (blnFade == 1) {

				fadeObj(myid,-1);

			}

			else {

				showItem(myid,'none');		

			}

			return (0);

		}

		else {

			if (blnFade == 1) {

				fadeObj(myid,1);

			}

			else {

				showItem(myid,'block');

			}

			return (1);

		}

	}

}



function toggleTextBoxVal(obj,ev,defVal) {

	if (obj) {

		if (ev == 'focus') {

			if (obj.value == defVal) {

				obj.value = '';

			}

		}

		else if (ev == 'blur') {

			if (obj.value == '') {

				obj.value = defVal;

			}

		}

	}

}



function setOpacity(obj, opacity) {

	opacity = (opacity == 100)?99:opacity; // Fixes re-draw bug when opacity = 1

	// IE/Win

	obj.style.filter = "alpha(opacity:"+opacity+")";

	if (obj.filters) {obj.filters.alpha.opacity=opacity;}

	// Safari<1.2, Konqueror

	obj.style.KHTMLOpacity = opacity/100;

	// Older Mozilla and Firefox

	obj.style.MozOpacity = opacity/100;

	// Safari 1.2, newer Firefox and Mozilla, CSS3

	obj.style.opacity = opacity/100;

	return opacity;

}



function fadeObj(obj,dir,lim) {

	if (dir == 1) {

		// Fade In

		if (!lim) {

			 // Full fade in

			lim = 100;



			// Set to 0 opacity hidden

			fOp[obj] = setOpacity(getObject(obj),0);

		}

		else {

			fOp[obj] = setOpacity(getObject(obj),lim);

		}



		getObject(obj).style.visibility = 'visible';

		getObject(obj).style.display = 'block';



		// Fade it

		fClr[obj] = setInterval(function() { fadeLoop(obj,7,lim); },25); // always use anonymous fn for intervals

	}

	else if (dir == -1) {

		// Fade Out

		if (!lim) {

			// Full fade out

			lim = 0;

			

			// Set to 100% opacity visible

			fOp[obj] = setOpacity(getObject(obj),100);

		}

		else {

			fOp[obj] = setOpacity(getObject(obj),lim);

		}

			

		getObject(obj).style.visibility = 'visible';

		getObject(obj).style.display = 'block';

		

		// Fade it

		fClr[obj] = setInterval(function() { fadeLoop(obj,-7,lim); },25); // always use anonymous fn for intervals

	}

}



function fadeLoop(obj,inc,lim) {

	if (inc > 0) {

		// Fade In

		if (fOp[obj] >= lim) {

			// Clean up and stop cycle

			clearInterval(fClr[obj]);

			SI.ClearChildren.clear();

		}

		else {

			fOp[obj] = setOpacity(getObject(obj),(fOp[obj]+inc));	

		}

	}

	else if (inc < 0) {

		// Fade Out

		if (fOp[obj] <= lim) {

			// Clean up and stop cycle

			if (lim == 0) { showItem(obj,'none'); } // Used to remove object from flow

			clearInterval(fClr[obj]);

			SI.ClearChildren.clear();

		}

		else {

			fOp[obj] = setOpacity(getObject(obj),(fOp[obj]+inc));

		}

	}

	else {

		// Catch all

		clearInterval(fClr[obj]);	

		SI.ClearChildren.clear();

	}

}



function obfusc(box,subj) {

	var obfusced = ("mail" + "to" + ":" + box + unescape("%40") + "novakbiddle" + "." + "com");

	if (subj) { obfusced += ("?" + "subject" + "=" + escape(subj)); }

	this.location.href=obfusced;

}



function toggleCol(colID, state) {

	// Count visible columns

	var c = 0;

	for (var t=1; t<=3; t++) {

		if (eval(getObject('div_col'+t)).style.display != 'none') {

			c++;

		}

	}

	

	// Get state of chosen column

	if (eval(getObject('div_col'+colID)).style.display != 'none') {

		// Visible, so hide

		state = 0;

		eval(getObject('div_col'+colID)).style.display = 'none';

		c--;		

	}

	else {

		state = 1;

		eval(getObject('div_col'+colID)).style.display = 'block';

		c++;		

	}

		

	// Set widths

	var availWidth = getObject('div_pgContent').offsetWidth;

	if (c > 0) {

	var newWidth = 100/c;

		for (var t=1; t<=3; t++) {

			if (eval(getObject('div_col'+t)).style.display != 'none') {

				eval(getObject('div_col'+t)).style.width = newWidth + '%';

			}

		}

	}

}



function matchColHeights() {

	var mHeight = 0;

	

	// Set array of column IDs to check in order of loading

	var aCols = new Array();

	aCols[1] = 'div_col1';

	aCols[2] = 'div_col2';

	aCols[3] = 'div_col3';

	

	// Get tallest column

	for(var i=aCols.length; i>0; i--) {

		if (elem = getObject(aCols[i])) {

			// Last column has loaded - proceed

			if (elem.offsetHeight > mHeight) { mHeight = elem.offsetHeight; }

			elem.style.height = 'auto';

		}

	}

	

	if (mHeight > 0) {

		// Set all columns to tallest height

		for(i=aCols.length; i>0; i--) {

			if (elem = getObject(aCols[i])) {

				elem.style.height = mHeight+'px';

			}

		}

		// Need to refresh footer position in IE

		getObject('div_footerCell').className = 'footerCell';

	}

}



function setBgScroll() {

	if (getObject('div_master')) {

		var masterWidth = getObject('div_master').offsetWidth;

		var bodyWidth = document.body.offsetWidth;

		if (bodyWidth < masterWidth) {

			// If needed, fix the background image

			document.body.className = 'bodyScroll';

		}

		else {

			// Reset background image	

			document.body.className = 'bodyFree';

		}

	}

}



function navToFadeOut() {

	if (obj = getObject('div_navToHide')) {

		setOpacity(obj,50);

	}

}



function navToFadeIn() {

	if (obj = getObject('div_navToHide')) {

		setOpacity(obj,100);

	}

}



function checkHashForExpandable() {

	if (window.location.hash) {

		// Anchor was passed

		var thisHash = (window.location.hash.substring(1)).toLowerCase(); // Strip pound symbol and lowercase

		if (obj = getObject('div_more_'+thisHash)) {

			// There is an expandable item with this ID

			// Close all other expandables on this page

			closeAllExpandables();

			// Show the chosen item

			obj.style.display = 'block';

			// Move screen to anchor j.i.c.

			window.location.hash = thisHash;

		}

	}

}



function closeAllExpandables() {

	var elems = (document.all) ? document.all : document.getElementsByTagName('div');

	for (var i = elems.length-1; i >= 0; i--) {

		var elem = elems[i];

		if (!elem.id.match(/\bdiv_more_.*\b/)) { continue; };

		elem.style.display = 'none';

	}



}



function secNavHilite(thisDiv) {

	// 	Set bg colors for dropdowns here and use transparent GIFs

	if (thisDiv.style) {

		thisDiv.style.backgroundColor = '#cbd9f0';	

	}

}



function secNavUnHilite(thisDiv) {

	// 	Set bg colors for dropdowns here and use transparent GIFs

	if (thisDiv.style) {

		thisDiv.style.backgroundColor = '#edece4';	

	}

}



/* Validations */

// Based on original PHP code by Cal Henderson (http://iamcal.com/publish/articles/php/parsing_email)

// Converted to JS regex

function is_valid_email_address(email) {

	var qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]';

	var dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]';

	var atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c'+'\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+';

	var quoted_pair = '\\x5c\\x00-\\x7f';

	var domain_literal = '\\x5b('+dtext+'|'+quoted_pair+')*\\x5d';

	var quoted_string = '\\x22('+qtext+'|'+quoted_pair+')*\\x22';

	var domain_ref = atom;

	var sub_domain = '('+domain_ref+'|'+domain_literal+')';

	var word = '('+atom+'|'+quoted_string+')';

	var domain = sub_domain+'(\\x2e'+sub_domain+')*';

	var local_part = word+'(\\x2e'+word+')*';

	var addr_spec = local_part+'\\x40'+domain;

	var filter = eval('/^' + addr_spec + '$/');

	

	return ((filter.test(email)) ? 1 : 0);

}



//-->