function navOver(i) {
	i.src = i.src.replace(".gif", "_over.gif");
}

function navOut(i) {
	i.src = i.src.replace("_over.gif",".gif");
}


menu_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}


function viewImage(f,iName) {
	if (iName=="")
		alert("No image specified!");
	else {
		if ((iName.indexOf("pdf")==-1) && (iName.indexOf("doc")==-1))
			window.open("mapfile.asp?i="+f+iName, "_blank","top=50,left=50,width=20,height=20,status=no,scrollbar=no,menu=no");
		else
			window.open(f+iName, "_blank","top=50,left=50,status=no,scrollbar=no,menu=no");
	}
} 


var months = new Array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

function testSelected(rb) {
	for (count=0;count<rb.length;count++) {
		if (rb[count].checked)
			return true;
	}
	return false;
}

// verifies that thee email address provided is correct.

var reEmail = /^.+\@.+\..+$/
var defaultEmptyOK = false


function isEmpty(s) { 
  return ((s == null) || (s.length == 0))
}


function isEmail (s){
  if (isEmpty(s)) 
    if (isEmail.arguments.length == 1) return defaultEmptyOK;
    else return (isEmail.arguments[1] == true);
    
  else {
    return reEmail.test(s)
  }
}
