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 getArrayNumber() {
	var arraynumber = '' + this.location;
	//Get URL
	arraynumber = arraynumber.substring((arraynumber.indexOf('?')) + 1);
	//Keep everything after the ?
   return arraynumber;
}

function init() {
	arraynumber = getArrayNumber();
	//Run function getArrayNumber
	arraynumber2 = eval(arraynumber);
	//Strip quotes off arraynumber value
}


function showNext(direction){
	var totalimages = 11;
	//total images of array images is n
	if (direction == 'next'){
	//if the direction is equal to 'next'
		(arraynumber2 == totalimages) ? arraynumber2 = 0 : arraynumber2++;
		//does arraynumber2 equal total images? if yes, set arraynumber2 to 0
		//if no, increase the value of arraynumber2 by 1	
	}
	else {
	//if the direction is not equal to 'next'
		(arraynumber2 == 0) ? arraynumber2 = totalimages : arraynumber2--;
		//does arraynumber2 equal o? if yes, set arraynumber2 to totalimages (18)
		//if no, decrease the value of arraynumber2 by 1
	}
	if (document.images){
		document.screenswap.src = image[arraynumber2].src;
		//change the source of screenswap to next or previous image
	}
}

function openSSwindow(theURL,winName) {
	w = 675;
	h = 530;
	var settings= 'width=' + w + ',height='
	+ h + ',left=100'
	+ ',top=100'
	+ 'toolbar=0,location=0,directories=0'
	+ ',status=1,menubar=0,scrollbars=0,'
	+ 'resizable=1';
	//window.open(theURL,winName,settings);
	win = window.open(theURL,winName,settings);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
