// Hide email addresses from spiders 
function writeEmail (user, domain, display1, display2) {
  var str_name = user
  var str_domain = domain
  var str_display = display1 + display2
  document.write("<a href=" + "mail" + "to:" + str_name + "@" + str_domain + ">" + str_display + "</a>")
}

function toggleDisplay(divId) {
	var toggleDiv = document.getElementById(divId);
	
	if (toggleDiv.className == "hide") {
		toggleDiv.className = "show";
	}
	else {
		toggleDiv.className = "hide";
	}
}


//script for window popup
var newWindow = null;

function popUpWin(url) {

closeWin();

var tools = " resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width=720,height=500,top=20,left=20";

newWindow = window.open(url, 'newWin', tools);
newWindow.focus();
}


function popUpWin_WithDimensions(url, width, height) {

closeWin();

var tools = " resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+width+",height="+height+",top=20,left=20";

newWindow = window.open(url, 'newWin', tools);
newWindow.focus();
}

function closeWin() {
	if (newWindow != null){
		if (!newWindow.closed) {
			newWindow.close();
		}
	}
}




function closeWin() {
	if (newWindow != null){
		if (!newWindow.closed) {
			newWindow.close();
		}
	}
}

//submits site search
function fnctSiteSearch() {
	if ( ! document.sitesearch.txtSearchPhrase.value) {
		alert('You did not enter any search criteria.')
		document.sitesearch.txtSearchPhrase.focus();
		}
	else	{
		document.sitesearch.submit();
	}
}




function selectmenulinks(thisselect) {
	var URL = thisselect.options[thisselect.selectedIndex].value
	if(URL!='') {
		window.open(URL)
	}
}






function wipeText(current_form, text, id)
{
if(current_form[id].value==text) {
	current_form[id].value=''
	}
else if(current_form[id].value=='') {
	current_form[id].value=text
	}
}



