function confirmFormChange(trueForm)
{
	if (confirm("Are you sure you want to change form? \n\nAny changes you have made to this form \nsince you last pressed \"Save\" will be lost."))
	{
		document.myForm.action=trueForm;
		document.myForm.formAction.value = 'formChange';
		document.myForm.submit();
	}
}

function formChange(trueForm)
{
	document.myForm.action=trueForm;
	document.myForm.formAction.value = 'formChange';
	document.myForm.submit();
}


function openPhotoWindow(theFileName)
{
	 window.open(theFileName,'jav','width=655,height=495,resizable=yes'); 
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function previous()
{
        if (which>0)
        {
                which--
                document.images.photoslider.src=photos[which]
        }
}

function next()
{
        if (which<photos.length-1)
        {
                which++
                document.images.photoslider.src=photos[which]
        }
        else
        {
        window.status='End of gallery'
        }
}

