var goalIds = new Array ('maleGoals', 'femaleGoals');

function switchById(id){
	hideAllIds();
	showId(id);
}

function hideAllIds(){
	for (var i=0; i<goalIds.length; i++){
		hideId(goalIds[i]);
	}
}

function hideId(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showId(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
} 

// Footer Popup Code
function customer_popup() {
    window.open("/getting-started/customerServices.jsp","customerWin","menubar=no,width=524,height=385,toolbar=no");
}

function policy_popup() {
    window.open("/getting-started/privacyPolicy.jsp", "policyWin", "menubar=no,width=543,height=750,toolbar=no,scrollbars=yes");
}

function policy_popup_url(url) {
    window.open(url, "policyWin", "menubar=no,width=543,height=750,toolbar=no,scrollbars=yes");
}

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite( anElement, title, url){
	if (window.sidebar) {// firefox
		alert( "Please uncheck the 'load bookmark in sidebar' when you add this new bookmark." );
		window.sidebar.addPanel(title, url, "");
	}
	else if(window.opera && window.print){ // opera
		anElement.setAttribute('href',url);
		anElement.setAttribute('title',title);
		anElement.setAttribute('rel','sidebar');
		anElement.click();
	}
	else if(document.all) {// ie
		window.external.AddFavorite(url, title);
	}
	else {
		alert( "Your browser does not support bookmarking from within the page. " +
			"Please use the bookmarking feature from the browser's menu bar." );
	}
}