function isblank(s){
	for(var i = 0; i < s.length; i++) {
		var c = s.charAt(i);
		if ((c != ' ') && ( c != '\n') && (c != '\t')) return false;
	}
	return true;
}

function defaultMsg(){
 var msg;
 msg =  "_______________________________________________\n\n"
	msg += "The form was not submitted because of the following error(s).\n";
	msg += "Please correct the error(s) and re-submit.\n";
	msg +=  "_______________________________________________\n\n"
 return msg;
}

//This code prevents dotted lines when clicking on links
function ExplorerFix() {
  for (a in document.links) document.links[a].onfocus = document.links[a].blur;
}

if (document.all)	document.onmousedown = ExplorerFix;

var isNS4 = (document.layers) ? true : false;
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;

var current = false;
 function showHide(layerName){
  if ((current) && (layerName != current)) setVis(current, 'hidden');
  if (layerName) setVis(layerName, 'visible');
  current = layerName;
 }
    
if (isNS4) document.captureEvents(Event.MOUSEUP);
document["onmouseup"] = function(event) {showHide(false);}

function checkSearch(frm) {
 var ok = true;
 if (isblank(frm.search.value)) {
  ok = false;
  alert('Please enter a search string');
 } else {
  frm.submit();
 }
 return false;
}
