// script.js

//*
//* This function can be tied to the submit buttons on 
//* a form.  It will set the action field with the value 
//* of a button.  In addition, it will confirm the delete 
//* button before submitting.
//*
function submitAction(argButton) 
{
    var action = argButton.value;
    if (action == "Delete")
    {
        var ans = confirm("Are you sure you want to delete this record?");
        if (ans == false)
        {
           return false;
        }
    }
    document.forms[0].elements['formAction'].value = action;
    return;
}

//*
//* This function links to another page.
//*
function newPage(argUrl, argAction, argId)
{
    var url = argUrl + "?formAction=" + argAction + "&id=" + argId;
	top.location.href = url;
	return false;
}

// This script opens a new browser window and writes
// HTML to display an image with a title and caption

function show_photo(pFileName) {

// specify window parameters
  photoWin = window.open( "", "photo", "width=300,height=300,status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");
  photoWin.document.write('<BODY BGCOLOR=White TEXT=#000000>');
  photoWin.document.write('<center>');
  photoWin.document.write('<img src="' + 
    pFileName + '"><p>');
  
  photoWin.document.close();	
	
// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();
}





