

function      warndel ( act )
{

var name  =  confirm ( "\tWarning!\n\nThis photograph and associated data\nwill be removed and is unrecoverable.\n\n\nDo you wish to delete?" )
//   var name  =  confirm ( "\tWarning!\n\nAll photographs and associated data\n\tof Donor: " + act + "\nwill be removed and is unrecoverable.\n\n\nDo you wish to delete?" )


if  (name == true)
   {
   return true
   }
else
   {
   // alert  ( "no action taken")
   return false
   }

}






function openCorrectPage ()
{
document.location = '../index.html'
}



function reFocusPage ()
{
photo.focus()
}



function reFocusPg (ZZZZY)
{
eval(ZZZZY + '.focus()');
}



function   cyclephoto ()
{
newimage = document.images['uploadph']
newimage.src = document.photoform.formimage.value
}



function   cyclethumb ()
{
if  ( document.photoform.photz.value != '' )
   {
   newimage = document.images['uploadph']
   fullphot  =  pad  ( document.photoform.photz.value, 3 )
   fulurl = '../media/photos/' + document.photoform.donor.value + '/thumb/' + fullphot + '.jpg' 
   newimage.src = fulurl
   }
}





function   warnduplicate  ()
{

if  (confirm ("Warning!!\n\nRefreshing will cause a duplicate entry to be made in the archive!/n/n/nDo you wish to refresh this page?"))
{
document.refresh
}

}





function     pad  ( variab, length )
{

str  =  '' + variab
while  ( str.length < length )
   str  =  '0' + str
return str

}





