function toggle(targetId) {
	if(document.getElementById) {
		targ = document.getElementById(targetId);
		if(targ.style.display == "none") targ.style.display = "";
		else targ.style.display = "none";
	}
}

function togglePlus(imgId) {
	if(document.getElementById) {
		img = document.getElementById(imgId);
		if(img.src.indexOf("icon-plus.gif") != -1) {
			img.src = "/images/icon-minus.gif";
		}
		else if(img.src.indexOf("icon-minus.gif") != -1) {
			img.src = "/images/icon-plus.gif";
		}
	}
}

function validateSelect(selectObj) {
	if(selectObj.options[selectObj.selectedIndex].value == "" || 
		selectObj.options[selectObj.selectedIndex].value == "null" || 
		selectObj.options[selectObj.selectedIndex].value == "x" ||
		selectObj.options[selectObj.selectedIndex].value.length == 0) {
		return false;
	}
	else {
		window.location = selectObj.options[selectObj.selectedIndex].value;
	}
}

function validateSelectForm(theForm) {
	for(i=0; i<theForm.elements.length; i++) {
		if(theForm.elements[i].type == "select-one" && theForm.elements[i].options[theForm.elements[i].selectedIndex].value.length <= 0)
			return false;
	}
	return true;
}

function redirectToCountryPage(theLocale) {
	if(theLocale == "" || theLocale == null) return false;
	if(theLocale.indexOf("http://") != -1) window.location = theLocale;
	else window.location = "/contact/index.jsp?country=" + theLocale + "&tab=0";
}

function validateSearch(theForm) {
	if(theForm.elements[1].value=="") {
		theForm.elements[1].focus();
		return false;
	} else {
		return true;
	}
}