
// PrintPage - a browser friendly print function
function printPage() {
  if (window.print) {
    window.print();
  } else {
    alert('Your browser does not support this function.  To print this page you will need a newer version of your browser.');
  } // end if
} // end function printPage

function emailFriend(){
  var who = prompt('Enter your friends email address: ','');
  var page = window.location;
  var headline = 'Cool stuff for cool kids';
  window.location = 'mailto:'+who+'?subject='+headline+'&body='+page;
  //window.location = 'mailto:'+who+'?subject='+headline+'&body='+page+' - '+document.title;
} // end function emailFriend

// Frame Killer
function changePage() {
  if (self.parent.frames.length != 0) {
    self.parent.location=document.location;
  } // end if  
} // end function changePage

var picName;
function picPop() {
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=350,height=350");
PreView.document.open();
PreView.document.write(
'<html><head>' +
'<title>Photo</title>' +
'</head><body bgcolor="#E8E8D3">' +
'<center><img hspace=0 vspace=0 ' +
'src="./images/gallery/' + picName + '.jpg">' +
'</center></body></html>'
);
PreView.document.close();
}

function SF_preloadImages() {

// Image Preloader


  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.SF) == 'undefined'){
      document.SF = new Object();
    }
    document.SF.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = SF_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.SF.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.SF.loadedImages[arg].src = SF_preloadImages.arguments[arg];
    }
  }
}

