// nav bar for marketing pages

var help = "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td bgcolor='#CCCCCC'><img src='/images/spacer.gif' width='115' height='8' alt=''></td><td bgcolor='#6699CC' width='99%'>&nbsp;</td></tr><tr><td bgcolor='#CCCCCC'><a href='/'><img src='/images/sitelogo_01.jpg' width=115 height=75 border='0' alt='AFI Catalog' title='AFI Catalog'></a></td><td bgcolor='#6699CC'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='19%'><a href='/'><img src='/images/sitelogo_02.jpg' width=220 height=75 border='0' alt='AFI Catalog' title='AFI Catalog'></a></td><td width='81%' background='/images/sitelogo_03.jpg'><div align='right'><img src='/images/sitelogo_04.jpg' width=7 height='75' alt=''></div></td></tr></table></td></tr><tr><td bgcolor='#CCCCCC' width='60'><img src='/images/spacer.gif' width='5' height='20' alt=''>&nbsp;</td><td valign='middle' bgcolor='#6699CC'><table cellspacing='0' cellpadding='0' width='600'><tr><td class='navbar'><img src='/images/spacer.gif' width='5' height='1' alt=''><a href='/' class='nav' accesskey='1'>Home</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='index.htm' class='nav'>Information Resources</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:history.back()' class='nav'>Back</a></td></tr></table></td></tr></table>";

// Variable auto-copyright - disabled for this release as it displays incorrectly on the Mac

// var today = new Date();
// var y0 = today.getFullYear();

// to make date appear, use &copy; " + y0 + " 

//This sets a date variable

var     oneDate        = new Date();
var     theYear         = oneDate.getFullYear();
var     terms  = "2003-"+ theYear +"";

var hmcopyright = "<span class='copy'><a href='/info/webmaster.htm' class='home'>Contact us</a> | <a href='/info/sitemap.htm' accesskey='3' class='home'>Site map</a> | <a href='/info/access.htm' accesskey='0' class='home'>Accessibility</a> | <a class='home' href='/info/privacy.htm'>Privacy policy</a><br><br><a href='/info/terms.htm' class='home'>Data copyright</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> American Film Institute.<br><a href='/info/terms.htm' class='home'>Data arrangement and software copyright</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> ProQuest LLC. <br>Images &copy; Getty Images.<br>All Rights Reserved.</span>";

var copyright = "<br><img src='/images/black.gif' width='610' height='1' alt=''><br><br><table width='610'><tr><td class='xxSmall'><a href='/info/webmaster.htm'>Contact us</a> | <a href='/info/sitemap.htm' accesskey='3'>Site map</a> | <a href='/info/access.htm' accesskey='0'>Accessibility</a> | <a href='/info/privacy.htm'>Privacy policy</a></td><td class='xxSmall'><table cellpadding='5'><tr><td><a href='http://www.proquest.co.uk' target='_blank'><img src='/images/chw.gif' alt='Chadwyck-Healey logo' title='Chadwyck-Healey logo' width='60' height='32' border='0'></a></td><td><a href='http://www.afi.com/' target='_blank'><img src='/images/afilogo_wh.gif' alt='American Film Institute logo' title='American Film Institute logo' width='90' height='32' border='0'></a></td></tr></table></td></tr><tr><td class='xxSmall' colspan='2'><a href='/info/terms.htm'>Data copyright</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> The American Film Institute.<br><a href='/info/terms.htm'>Data arrangement and software</a> &copy; <SCRIPT>document.writeln(terms);</SCRIPT> ProQuest LLC. <br>All rights reserved. </td></tr></table>";

function jumpMenu(){
location=document.jump.menu.options[document.jump.menu.selectedIndex].value;
}

var newWin = null;
function popUp(strURL, strType, strWidth, strHeight) {  
	if (newWin != null && !newWin.closed)    
	newWin.close();  
	var strOptions="";
	  
	if (strType=="promo")
	strOptions="top=50,left=50,width="+strWidth+",height="+strHeight; 
 
	newWin = window.open(strURL, 'newWin', strOptions);  
	newWin.focus();
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}	


function checkEnter(e)
{ 
	//e is event object passed from function invocation

	var characterCode;  //literal character code will be stored in this variable

 	if(e && e.which)
 	{ 
 		//if which property of event object is supported (NN4)
 		e = e;
 		characterCode = e.which; //character code is contained in NN4's which property
 	}
 	else
 	{
 		e = event;
 		characterCode = e.keyCode; //character code is contained in IE's keyCode property
 	}


 	if(characterCode == 13)
 	{ 
 		//if generated character code is equal to ascii 13 (if enter key)
 		document.forms[0].submit(); //submit the form
 		return false;
 	}
 	else
 	{
 		return true;
 	}
}

/* These are the arrays which hold the images. Because of the way the script is currently working the second image in the array is the one which is visible first, sort of. I don't think this has much effect on the visual impact though*/
	
	aadImages = new Array('/images/home/cleo.jpg', '/images/home/mancini2.jpg', '/images/home/hitch.jpg','/images/home/dean.jpg','/images/home/ida.jpg','/images/home/sabrina.jpg','/images/home/coat.jpg','/images/home/waterfront.jpg')
	aadAlt = new Array("Elizabeth Taylor", "Henry Mancini", "Alfred Hitchcock", "James Dean", "Ida Lupino", "Humphrey Bogart and Audrey Hepburn", "Gwen Lee and Buster Keaton", "Marlon Brando and Eva Marie Saint")
	
	badImages = new Array('/images/home/kane.jpg','/images/home/cgable2.jpg','/images/home/colbert2.jpg','/images/home/brando.jpg','/images/home/groucho.jpg','/images/home/bette.jpg','/images/home/scorsese.jpg','/images/home/singin.jpg')
	badAlt = new Array("Marlon Brando", "Clark Gable", "Claudette Colbert", "Bette Davis", "Orson Welles", "Groucho Marx", "Martin Scorsese", "Gene Kelly")
		
	cadImages = new Array('/images/home/pickford.jpg','/images/home/bergman2.jpg','/images/home/disney2.jpg','/images/home/marilyn.jpg','/images/home/sunset.jpg','/images/home/cagney.jpg','/images/home/doro.jpg','/images/home/dwg.jpg','/images/home/huston.jpg')
	cadAlt = new Array("Mary Pickford", "Ingrid Bergman", "Walt Disney", "Marilyn Monroe", "William Holden and Gloria Swanson", "James Cagney", "Judy Garland", "D. W. Griffith", "John Huston")

	dadImages = new Array('/images/home/gingfred.jpg','/images/home/wilder2.jpg','/images/home/kath.jpg','/images/home/jimmy.jpg','/images/home/rita.jpg','/images/home/wayne.jpg','/images/home/mary.jpg','/images/home/frank.jpg')
	dadAlt = new Array("Ginger Rogers and Fred Astaire", "Billy Wilder", "Katherine Hepburn", "James Stewart", "Rita Hayworth", "John Wayne", "Mary Pickford", "Frank Capra")
		
	thisAd = 0
	imgCt = aadImages.length

/* There is a rotate function set for each of the arrays. The only code that'll need tweaking here will be the last line of the function in each case: setTimeout("rotate1()", 1 * 1000) to break this down "rotate1()" is the name of the function, 1 * 1000 is setting the time on the rotation to 1 * 1000 millisceonds = 1 second. Only the 1 needs to be changed depending on how fast you want the rotation to be.*/

	function rotate1() {
		if (document.images) {
			if (document.ro1.complete) {
					thisAd++
				if (thisAd == imgCt) {
					thisAd = 0
				
				}
				document.ro1.src=aadImages[thisAd]
				document.ro1.alt=aadAlt[thisAd]
			}
		  	setTimeout("rotate1()", 3 * 1000)
		}
	}
	
	
	function rotate2() {
		if (document.images) {
			if (document.ro2.complete) {
						thisAd++
				if (thisAd == imgCt) {
						thisAd = 0

				}
				document.ro2.src=badImages[thisAd]
				document.ro2.alt=badAlt[thisAd]
			}
			  setTimeout("rotate2()", 2 * 1000)
		}
	}

		function rotate3() {
			if (document.images) {
				if (document.ro3.complete) {
						thisAd++
					if (thisAd == imgCt) {
						thisAd = 0

					}
					document.ro3.src=cadImages[thisAd]
					document.ro3.alt=cadAlt[thisAd]
				}
			  	setTimeout("rotate3()", 3 * 1000)
			}
		}

		function rotate4() {
			if (document.images) {
				if (document.ro4.complete) {
						thisAd++
					if (thisAd == imgCt) {
						thisAd = 0

					}
					document.ro4.src=dadImages[thisAd]
					document.ro4.alt=dadAlt[thisAd]
				}
			  	setTimeout("rotate4()", 4 * 1000)
			}
		}