properDate = /^((0\d)|(1[0-2]))\/(([0-2]\d)|(3[0-1]))\/((19\d{2})|(2\d{3})|(\d{2}))$/;

/** 
*	obfuscate email addresses so that spam crawlers cannot harvest them as easily
*	<a href="js:email|"name","server","link_text""></a>
*							name = email addres before the "@"
*							server = domain address is located
*		(optional argument) link_text = display text for email link if you dont want the default name@server.###
**/


// **** send in an array of links to remove the marching ants when link is clicked
function killAllTheAnts( arrOfLinks ) {
	for( i = 0; i < arrOfLinks.length; i++ ) {
		arrOfLinks[i].onfocus = function() { if( this.blur ) { this.blur(); } }
	}
}
// **** killAllTheAnts above


// **** collapse "hideable" info in "wrappers"
function iCrushYourHead() {
	p = this.parentNode;
	this.innerHTML = ( this.innerHTML == "expand this topic" )? "collapse this topic" : "expand this topic";
	wrapper = /^(.*)(\swrapper\s?)(.*)$/;
	hidem = /^(.*)(\s?hideable\s?)(.*)$/;
	while( !wrapper.test( p.className ) && p.nodeName != "BODY" ) { p = p.parentNode; }
	cDIVs = p.getElementsByTagName( "DIV" );
	for( c = 0; c < cDIVs.length; c++ ) { if( hidem.test( cDIVs[c].className ) ) { cDIVs[c].style.display =  ( cDIVs[c].style.display == "none" )? "block" : "none"; } }
}
// **** iCrushYourHead above


// **** labels surrounding checkboxes or radio buttons shall now be clickable in IE6 and below
function clickableLabels() {
	if( navigator.appName.toLowerCase().indexOf( "microsoft" ) > -1  ) { // checking for any microsoft browser
		labels = document.getElementsByTagName( "LABEL" );
		for( i = 0; i < labels.length; i++ ) {
			if( labels[i].className == "clickable" ) {
				labels[i].onclick = function() {
					if( this.childNodes[0].type == "radio" ) { this.childNodes[0].checked = true; }
					else { this.childNodes[0].click(); }
				}
			}
		}
	}
}
// **** clickable lables above


// **** initialize the window **** keeps this last ****
window.onload = function() {
	clickableLabels();
	// fix specific links 
	allLinks = document.getElementsByTagName( "A" );
	for( l = 0; l < allLinks.length; l++ ) {
		node = allLinks[l];
		/*
		// pincers show and hide optional content for long sections of text
		if( node.href == "js:pincer;" ) {
			node.href = "javascript:;";
			node.innerHTML = "collapse this topic";
			node.onclick = iCrushYourHead;
			node.onclick();
		}
		*/
		// hide email links
		hiddenEmail = "js:email|";
		if( node.href.indexOf( hiddenEmail ) > -1 ) {
			temp = node.href.replace( "js:email|", "" );
			args = temp.split( "," );
			address = args[0] + "@" + args[1];
			node.href = "mailto:" + address;
			node.innerHTML = ( args.length > 2 )? args[2] : address;
		}
	}
}
// **** initialize the window **** keeps this last ****




