//---------------------------------------------------------------------------// 	Javascript developed by JOsh Powell, Web Developer for EA.com, for the //	Subcommand game web site.  It controls the screenshots page and swaps//	out multiple screenshots, and has a different pop up assosciated with// 	each pop up.  It's very cool.//---------------------------------------------------------------------------	var PATH = "images/sshots/";   // Path to image directory used by javascript	var EXT = ".jpg";			   // Type of images the javascript will use	var bigImage	 = new Array();	// Array of the big images that will be popped up	var topsshots 	 = new Array(); // Array of the top of the midsized image	var bottomsshots = new Array(); // Array of the bottom of the midsized image	var sshot_main 	 = new Array("sshots-imagemap.jpg",   // Array of the big								 "sshots_imagemap7-12.jpg", // thumbnail list								 "sshots_imagemap13-14.jpg");  //images	var CURR_LIST = 0; // Tracks which sshot_main is being used	var CURR_SCREENSHOTS = 0; // Tracks number of screenshots	var BASE = 0; // Keeps track of which images the javascript should put 				  // into the midsized images area				  //-----------------------------------------------------------------------/*	Preloads the images used into arrays.  Sets a number of images into the	array equal to the number passed in, the images must be named according	to the naming convention in order for this to work */	function loadImages(numimages)	{		for(a=1; a<=numimages; a++)	{			bigImage[CURR_SCREENSHOTS] = new Image();						topsshots[CURR_SCREENSHOTS] = new Image();			bottomsshots[CURR_SCREENSHOTS] = new Image();												bigImage[CURR_SCREENSHOTS] = eval('PATH	+ "sshot-" + a + "_large" + EXT');			topsshots[CURR_SCREENSHOTS].src = eval ('PATH + "sshot-" + a + "a" + EXT');			bottomsshots[CURR_SCREENSHOTS].src = eval ('PATH + "sshot-" + a + "b" + EXT');			CURR_SCREENSHOTS++;		}	};    	//-----------------------------------------------------------------------/*	Replaces the top and bottom images with the image stored in the arrays	passed in and sets bigImage.src for the popWin function */    function switchImage(number) {		if (number<=CURR_SCREENSHOTS)	{	        document.topImage.src = topsshots[number-1].src;	        document.bottomImage.src = bottomsshots[number-1].src;	        popUpImage = bigImage[number-1];		}    }	//-----------------------------------------------------------------------/*	Opens a new browser window, with the image of the bigImage as its source */    function popWin(bigImage) {        url=popUpImage;        var popWin= open(url,"windowName",'nostatus,resizable=yes, scrollbars=no,width=660,height=500,top=0,left=0');   		popWin.focus();    }	//-----------------------------------------------------------------------/*  This function changes the main imagemap to the next image in the	sshot-main array, looping back to the beginning if it goes over and sets 	the BASE variable so that clicking on the imagemap will bring up the 	correct image*/	function next()	{		CURR_LIST++;				if(CURR_LIST>=sshot_main.length) { CURR_LIST=0 }; 		document.sshot_imap.src = eval('PATH + sshot_main[CURR_LIST]');		BASE+=6;		if (BASE >=(6*sshot_main.length)) { BASE=0 }	};	//----------------------------------------------------------------------	/*  This function changes the main imagemap to the previous image in the	sshot-main array, looping to the end if you are at the beginning and sets 	the BASE variable so that clicking on the imagemap will bring up the correct 	image */		function previous()	{		CURR_LIST--;				if(CURR_LIST<0) { CURR_LIST = sshot_main.length-1 }; 		document.sshot_imap.src = eval('PATH + sshot_main[CURR_LIST]');		BASE-=6;		if(BASE<0) { BASE = ( 6*(sshot_main.length-1)) }	};	