var newWin = null;
var recs = "0";
var S = new Array ("");
function goToURL(){
var args=goToURL.arguments;
document.returnValue=false;
eval(args[0]+".location='"+args[1]+"'");
}
function ShowUsage(){
if (newWin && !newWin.closed){newWin.focus();return true;}
newWin = window.open("/info/help/sd_db.html","baby","resizable,status,scrollbars,width=600,height=600");
newWin.focus();
return true;
}
function doSqd(tp,nme){
goToURL('self','/cgi-bin-nat/tools/sd_dbx.cgi?'+tp+nme);
}
function subSquadForm(){
var f = document.squadform;
if (f.act_type.value == "D"){
if (!confirm("\nDelete this Record? \n\nIt cannot be undone!\n")){
f.act_type.value = "U";
return false;
}
if (!confirm("\nAre you really sure? \n\nYou can still cancel!\n")){
f.act_type.value = "U";return false;}
return true;
}
// Return false if Name field is blank.
if (f.name.value == ""){
alert("\nThe Name field is blank.\n\nPlease enter Name.")
f.name.focus();
return false;
}
if (f.type.value == "s"){f.type.value = "S";}
if (f.type.value == "d"){f.type.value = "D";}
// Return false if Type field is blank.
if (f.type.value == ""){
alert("\nThe Type field is blank.\n\nPlease enter Type: S or D")
f.type.focus();
return false;
}
// Return false if District field is blank.
if (f.dist.value == "" && f.type.value == "S"){
alert("\nThe District field is blank.\n\nPlease enter District.")
f.dist.focus();
return false;
}
// Return false if Number field is blank.
if (f.sqnumber.value == ""){
alert("\nThe Number field is blank.\n\nPlease enter Number.")
f.sqnumber.focus();
return false;
}
if (f.type.value == "D"){return true;}
// Return false if Initials field is blank.
if (f.initials.value == ""){
alert("\nThe Initials field is blank.\n\nPlease enter Initials.")
f.initials.focus();
return false;
}
// Return false if State field is blank.
if (f.state.options[f.state.selectedIndex].text == ""){
alert("\nThe State field is blank.\n\nPlease select a State.")
f.state.focus();
return false;
}
return true;
}