// menu onMouseOver
var img_dir = "/images/navigation/";

// preload images
if (0 && document.images) {
  var home_on = new Image();
  home_on.src = img_dir + "home_on.gif";
  var news_on = new Image();
  news_on.src = img_dir + "news_on.gif";
  var film_on = new Image();
  film_on.src = img_dir + "filmography_on.gif";
  var bio_on = new Image();
  bio_on.src = img_dir + "biography_on.gif";
  var gallery_on = new Image();
  gallery_on.src = img_dir + "gallery_on.gif";
  var guestbook_on = new Image();
  guestbook_on.src = img_dir + "guestbook_on.gif";
  var contact_on = new Image();
  contact_on.src = img_dir + "contact_on.gif";
}

function act(img_name) {
  if (document.images) 
    document.images[img_name].src = img_dir + img_name + "_on.gif";
}

function inact(img_name) {
  if (document.images)
    document.images[img_name].src = img_dir + img_name + "_off.gif";
}


// Do not allow users to right-click on images to save
var sorry="Sorry, you do not have access to this feature."

function click(e) {
    if (document.all) {
        if (event.button == 2) {
           alert(sorry);
           return false;
        }
    }
    if (document.layers) {
        if (e.which == 3) {
            alert(sorry);
            return false;
        }
    }
}

if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
}

document.onmousedown=click;

// launch popup window for photos
function photo_open(image_id, width, height) {
	height = parseInt(height) + 50;
	var photoWindow = window.open("/gallery/photo_display.php?image_id=" + image_id, "photo", 'toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height);
}
