function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}
 
function confirmAction(confirmMsg) {
	if (confirm(confirmMsg)){ return true; }
	else { return false; }
}

function blankWindow(obj) {
	window.open(obj.href,'','');
}

function focusOn(o) {
	object = document.getElementById(o);
	object.focus();
}

function hideObject(o) { //v2.0
  object = document.getElementById(o);
  object.className = 'hidden';
}
function focusSearchFor(o) {
   object = document.getElementById(o);
}
function clearSearch() {
	object = document.getElementById('toolbar_uiKeywords');
	object.value = '';
}

function loadRegistration() {
	uiAnyOtherChildren = document.getElementById('join_uiAnyOtherChildren');
	if(uiAnyOtherChildren.options[uiAnyOtherChildren.selectedIndex].value=='true')
	 document.getElementById('uiMoreChildren').className = ''; 
	else
	 document.getElementById('uiMoreChildren').className = 'hidden';
}


function changeValue(object,text) {
	object.value = text;
}

function enterPress(btn, event){
 btn=document.getElementById(btn);
	if (document.all){
  if (event.keyCode == 13){
   event.returnValue=false;
   event.cancel = true;
   btn.click();
  }
 }

 else if (document.getElementById){
  if (event.which == 13){
   event.returnValue=false;
   event.cancel = true;
   btn.click();
  }
 }

 else if(document.layers){

  if(event.which == 13){
   event.returnValue=false;
   event.cancel = true;
   btn.click();
  }
 }
}

var theID = "";
function highlighter(styleloop) {
	var limit = 5;
	if (styleloop == 1) {
		document.getElementById(theID).className = "faq-step" + styleloop.toString();
		setTimeout("highlighter(" + (styleloop + 1) + ")", 1000); /* Pause on initial colour */
	} else if (styleloop <= limit) {
		document.getElementById(theID).className = "faq-step" + styleloop.toString();
		setTimeout("highlighter(" + (styleloop + 1) + ")", 33);
	} else {
		document.getElementById(theID).className = "faq-step0";
	}
}

function jump(target) {
	if (target)	{
		if ( target.indexOf("#") >= 0 ) {
			if ( (theID != "") && document.getElementById(theID) ) {
				document.getElementById(theID).className = "faq_off";
			}
			theID = target.substring(target.indexOf("#")+1);	
			if (document.getElementById(theID)) {
				highlighter(0);
			}		
		}
	}
}