// check if javascript enabled. fired off by form's onload eventfunction testJS() {document.getElementById('js').value='js_on';}// controls display of tabs in forms. Called by tabs themselves and by form's onLoad event// parameter rt is the id of the div containing the tab ul, parameter tabnumber is the tab to be turned onfunction doTab(rt,tabnumber) {	// get number of tabs	nacCont=document.getElementById(rt);	navRoot = nacCont.getElementsByTagName("ul")[0]; //nacCont.childNodes[0];	tabNodes = navRoot.getElementsByTagName("li"); //navRoot.childNodes;	var numberoftabs=tabNodes.length;	for (i=1;i<=numberoftabs;i++) {  // hide all tabs & reset the class for the look of the tabs		document.getElementById(rt+i).style.display='none';	};	 turnTabsOff(rt);	document.getElementById(rt+tabnumber).style.display='block'; //show selected tab	turnTabOn(rt,tabnumber)}// turns all tabs off when called//parameter rt is the id of the div containing the tabs ulfunction turnTabsOff(rt) {	if (document.getElementById) {		nacCont=document.getElementById(rt);		navRoot = nacCont.childNodes[0];		for (i=0; i<navRoot.childNodes.length; i++) {			node = navRoot.childNodes[i];			nodeLI = node.childNodes[0];			if (nodeLI.className!="") {nodeLI.className=""};			nodeSpan=nodeLI.childNodes[0];			if (nodeSpan.className!="") {nodeSpan.className=""};		}	}}// turns specified tab on// parameter rt is the id of the div containing the tabs ul, parameter tabnumber is the tab to be turned onfunction turnTabOn(rt,tabnumber) {	if (document.getElementById) {		nacCont=document.getElementById(rt);		navRoot = nacCont.childNodes[0];		tabNode = navRoot.childNodes[tabnumber-1];		node = tabNode.childNodes[0];		if (node.className!="on") {node.className="on"};		nodeSpan=node.childNodes[0];		if (nodeSpan.className!="on") {nodeSpan.className="on"};	}}// duo tone headingsfunction getElementsByClass(node,searchClass,tag) {    var classElements = new Array();    var els = node.getElementsByTagName(tag); // use "*" for all elements    var elsLen = els.length;    for (i = 0, j = 0; i < elsLen; i++) {         if ( els[i].className==searchClass ) {             classElements[j] = els[i];             j++;         }    }    return classElements;}    function showSpans(cls) {if(document.getElementsByTagName && document.createElement){    for (var l=1;l<=6;l++){    var headingArray = getElementsByClass(document,cls,'h'+l);        for ( var i=0, len=headingArray.length; i<len; ++i ){             var heading = headingArray[i];                 var hString = headingArray[i].firstChild.nodeValue;                 var span = document.createElement('span');                 heading.appendChild(span);                 span.innerHTML = hString;        }    }    }}// validationfunction checkElement(elid, txt){var d = document.forms[0];	se = document.getElementById(elid);	se.style.background='white';	if ( se.value == "" ) {		errMsg += txt + "\n";		se.style.background='#fcc'		if(fel=="") {			fel=elid;		}	}}function checkEmailAddr(elid, txt){var d = document.forms[0];	se = document.getElementById(elid);	se.style.background='white';	if ( !(se.value.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/)) ) {		errMsg += txt + "\n";		se.style.background='#fcc'		if(fel=="") {			fel=elid;		}	}}function checkElementCheckbox(elid,txt){	var d = document.forms[0];	d.pd1.style.background='white';	d.pd2.style.background='white';	d.pd3.style.background='white';	if (!(d.pd1.checked) && !(d.pd2.checked) && !(d.pd3.checked) ) {		errMsg += txt + "\n";		d.pd1.style.background='#fcc';		d.pd2.style.background='#fcc';		d.pd3.style.background='#fcc';		fel=elid;	}}function cp() {	window.open ('changepassword?OpenForm' , 'newWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=420,height=400');}function openWindow(url){        window.open(url);}