// JavaScript Document


//rollover script from http://www.htmlcodetutorial.com/images/images_famsupp_59.html

function preLoadImages(){
	var t='<layer top="-100" left="0" visibility="hide"><div style="position:absolute; top:-100px; left:0px; visibility:hidden">';
	for(i=0;i<arguments.length;i++)t+='<img src="'+arguments[i]+'" height="10" width="10">';
	t+='</div></layer>';
	document.write(t);}

preLoadImages('nav/ai_over.jpg','nav/home_over.jpg','nav/animation_over.jpg','nav/production_over.jpg','nav/concept_art_over.jpg','nav/team_over.jpg','nav/home_selected.jpg','nav/animation_selected.jpg','nav/production_selected.jpg','nav/concept_art_selected.jpg','nav/team_selected.jpg'); 

function swapImage(imgN,imgU){
	if(document.images)document.images[imgN].src=imgU;}


// create popup window for images on the fly 
// script by Michael Paige (http://www.treetrybe.com/imm/)
// edited for Mac by Mark Howells (http://www.mark.ac/journal/) 
// found on http://www.bigwhiteguy.com; modified further by JNG
// found on http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/73600627103; modified further by Chely Ho

var popup = new Object;
var popup = null;

function imagePopup(image, width, height, alt){
	var w = width;
	var h = height;
	var l = (screen.availWidth-width)/2;
	var t = (screen.availHeight-height)/2;
	var scroll = 0;
	
	if(w>screen.availWidth-20){
		scroll = 1; 
		w = screen.availWidth-20;}

	if(h>screen.availHeight-40){
		scroll = 1; 
		h = screen.availHeight-40;}
 

	var winProperties = "width="+w+", height="+h+", left="+l+", top="+t+", toolbar=0, menubar=0, directories=0, scrollbars="+scroll+",status=0,resizable=1";
	popup = open("", "_blank", winProperties);
	
	popup.document.write('<?xml version="1.0" encoding="UTF-8"?\>'); 
	popup.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'); 
	popup.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">'); 
	popup.document.write('<head><title>AIH Team Production 2008</title>'); 
	popup.document.write('<link href="style.css" rel="stylesheet" type="text/css" />');
	popup.document.write('</head><body>');  
	popup.document.write('<div><img src="' + image + '" alt="' + alt + '" /></div>'); 
	popup.document.write('</body></html>');
	popup.document.close();

}

