function hideIt(elm) {
  if (dom) {
  	document.getElementById(elm).style.visibility='hidden';
  	} else {
  	document.layers[elm].visibility='hide';
  }
}

function showIt(elm) {
  if (dom) {
  	document.getElementById(elm).style.visibility='visible';
  	} else {
  	document.layers[elm].visibility='show';
  }
}


function isEmail(elm) {
    if (elm.value.indexOf("@") + "" != "-1" && elm.value.indexOf(".") + "" != "-1" && elm.value != "") 
	return true;
	else return false;
}

function isFilled(elm) {
	if (elm.value == "" || elm.value == null) 
	return false;
	else return true;
}

function isPhone(elm) {
	var elmstr = elm.value + "";
	if (elmstr.length != 12) return false;
	for (var i = 0; i < elmstr.length; i++) {
		if ((i < 3 && i > -1) || (i > 3 && i < 7) || (i > 7 && i < 12)) {
			if (elmstr.charAt(i) < "0" || elmstr.charAt(i) > "9") return false;
		}
		else if (elmstr.charAt(i) != "-" || elmstr.charAt(i) != "/") return false;
	}
	return true;
}

function secondNav(elm) {
	var browserName=navigator.appName; 
	if (browserName=="Microsoft Internet Explorer") { 
 		document.write("<div id=\"NavLineIE" + elm + "\" style=\"visibility:hidden\">");
	} else { 
 		document.write("<div id=\"NavLine" + elm + "\" style=\"visibility:hidden\">");
   }
}
