var isIE = false;
var isNav = false;
var objPart1 = "";
var objPart2 = "";
var curInfoClip = 0;
var animDone = true;

if((navigator.appName.indexOf("Netscape") != -1) && (parseInt(navigator.appVersion) > 3)) { isNav = true; }
if((navigator.userAgent.indexOf("MSIE") != -1) && (parseInt(navigator.appVersion) > 3)) { isIE = true; }

if(isIE) {
  objPart1 = "all.";
  objPart2 = ".style";
}

function setVisibility(objId, visStatus) {
  if(!isIE && !isNav) return;
  var obj = eval("document." + objPart1 + objId + objPart2);
  if(visStatus) {
   obj.visibility = "visible";
  } else {
   obj.visibility = "hidden";
  }
}

function setValue(formname,fieldname,layername,sIndex) {
  var obj = eval("document." + formname + "." + fieldname);
  obj.selectedIndex = sIndex
  setVisibility(layername,false);
}

function openpage(url, name, wd, ht) {
    Dist = window.open(url,name,"dependent=yes,width="+wd+",height="+ht+",left=200,top=100,resizable=yes,scrollbars=yes");
    if (window.focus) {
 	Dist.focus();
    }
}

function numonly(field) {
	var valid = "0123456789"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) {
	temp = "" + field.value.substring(i, i+1);
	if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") {
	alert("Invalid entry!  Only numbers are accepted!");
	field.focus();
	field.select();
	}
}

function moneyonly(field) {
	var valid = "0123456789."
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) {
	temp = "" + field.value.substring(i, i+1);
	if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") {
	alert("Invalid entry!  Only numbers are accepted!");
	field.focus();
	field.select();
	}
}

function confirmdelete(msg) {
	res = confirm("WARNING: " + msg + "\n\n" + "Are you sure you want to delete this?")
	if (res) { } else { return false; }
}
