/*The following code opens up the windows for the images*/

function launchmap(whichone)
{	
	if(whichone==1)
		{
		DynaWin('palmsmap.gif', '596', '454', '150', '200');
		}
	if(whichone==2)
		{
		DynaWin('imagemaker.gif', '596', '454', '150', '200');
		}
	if(whichone==3)
		{
		DynaWin('tricitymap.gif', '596', '454', '150', '200');
		}
	if(whichone==4)
		{
		DynaWin('suemap.gif', '596', '454', '150', '200');
		}
	if(whichone==5)
		{
		DynaWin('deseretmap.gif', '596', '454', '150', '200');
		}
	if(whichone==6)
		{
		DynaWin('evmap.gif', '596', '454', '150', '200');
		}
	if(whichone==7)
		{
		DynaWin('photonmap.gif', '596', '454', '150', '200');
		}
	if(whichone==8)
		{
		DynaWin('mesarentalmap.gif', '596', '454', '150', '200');
		}
	if(whichone==9)
		{
		DynaWin('somersetmap.gif', '596', '454', '150', '200');
		}
	if(whichone==10)
		{
		DynaWin('loumap.gif', '596', '454', '150', '200');
		}
	if(whichone==11)
		{
		DynaWin('auntdonnamap.gif', '546', '416', '150', '200');
		}
	if(whichone==12)
		{
		DynaWin('stimcomap.gif', '546', '416', '150', '200');
		}
	if(whichone==13)
		{
		DynaWin('loganmap.gif', '546', '416', '150', '200');
		}
	if(whichone==14)
		{
		DynaWin('princessmap.gif', '546', '416', '150', '200');
		}
	if(whichone==15)
		{
		DynaWin('ameruniform.gif', '532', '406', '150', '200');
		}
	if(whichone==16)
		{
		DynaWin('sweetdreams.gif', '532', '406', '150', '200');
		}
	if(whichone==17)
		{
		DynaWin('matthewhowell.gif', '532', '406', '150', '200');
		}
	if(whichone==18)
		{
		DynaWin('eastmesainnmap.gif', '546', '416', '150', '200');
		}
	if(whichone==19)
		{
		DynaWin('mackfammap.gif', '546', '416', '150', '200');
		}
	if(whichone==20)
		{
		DynaWin('abritemap.gif', '546', '416', '150', '200');
		}
	if(whichone==21)
		{
		DynaWin('glassurnmap.gif', '546', '416', '150', '200');
		}
	if(whichone==22)
		{
		DynaWin('countrybearmap.gif', '546', '416', '150', '200');
		}
	if(whichone==23)
		{
		DynaWin('clocksrockmap.gif', '546', '416', '150', '200');
		}
	if(whichone==24)
		{
		DynaWin('sunvaluemap1.gif', '546', '416', '150', '200');
		}
	if(whichone==25)
		{
		DynaWin('sunvaluemap2.gif', '546', '416', '150', '200');
		}
	if(whichone==26)
		{
		DynaWin('oakstoremap.gif', '546', '416', '150', '200');
		}
	if(whichone==27)
		{
		DynaWin('rosesgalormap.gif', '546', '416', '150', '200');
		}
	if(whichone==28)
		{
		DynaWin('plazamap.gif', '546', '416', '150', '200');
		}
	if(whichone==29)
		{
		DynaWin('drhealmap.gif', '532', '406', '150', '200');
		}
	if(whichone==30)
		{
		DynaWin('jchmap.gif', '532', '406', '150', '200');
		}
	if(whichone==31)
		{
		DynaWin('unitedmap.gif', '546', '416', '150', '200');
		}
	if(whichone==32)
		{
		DynaWin('favoredmap.gif', '546', '416', '150', '200');
		}
	if(whichone==33)
		{
		DynaWin('casketsmap.gif', '546', '416', '150', '200');
		}
	if(whichone==34)
		{
		DynaWin('acemap.gif', '546', '416', '150', '200');
		}
	if(whichone==35)
		{
		DynaWin('rickjamesmap.gif', '546', '416', '150', '200');
		}
	if(whichone==36)
		{
		DynaWin('wildwestmap.gif', '546', '416', '150', '200');
		}
	if(whichone==37)
		{
		DynaWin('cageworldmap.gif', '546', '416', '150', '200');
		}
	if(whichone==38)
		{
		DynaWin('tuffskinmap.gif', '546', '416', '150', '200');
		}
	if(whichone==39)
		{
		DynaWin('partitionmap.gif', '546', '416', '150', '200');
		}
	if(whichone==40)
		{
		DynaWin('elitemap.gif', '532', '406', '150', '200');
		}
	if(whichone==41)
		{
		DynaWin('mesamufflermap.gif', '532', '406', '150', '200');
		}
	if(whichone==42)
		{
		DynaWin('kennymap.gif', '532', '406', '150', '200');
		}
	if(whichone==43)
		{
		DynaWin('hondamap.gif', '532', '406', '150', '200');
		}
	if(whichone==44)
		{
		DynaWin('pitstopmap.gif', '532', '406', '150', '200');
		}
	if(whichone==45)
		{
		DynaWin('eastvalleymustang.gif', '532', '406', '150', '200');
		}
	if(whichone==46)
		{
		DynaWin('joesac.gif', '532', '406', '150', '200');
		}
	if(whichone==47)
		{
		DynaWin('hubcapmap.gif', '532', '406', '150', '200');
		}
	if(whichone==48)
		{
		DynaWin('sandsmap.gif', '532', '406', '150', '200');
		}
}

/*This function opens a dynamic window with the lenght and width passed to it from the launchpic function, and puts the image inside.
url is the path to the image, w is the width, h is the height, l is the position from left, and t is position from top*/
function DynaWin(url, w, h, l, t)
{
poph = + h + 0;
popw = + w + 0;
//l = + l - 50;
t = + t + 25;
var winX = screen.availWidth - popw - 25;
disp = window.open("","pop","height=" + poph + ",width=" + popw + ",left=" + winX + ",top=" + t + "");
content = '<HTML>';
content += '<TITLE>Directions</TITLE>';
content += '</HEAD>';
content += '<BODY bgcolor="#000000" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onBlur="self.close()">';
content += '<P ALIGN="CENTER"><img src="maps/' + url + '" height="' + h + '" width="' + w + '"></P>';
//content += '<H3 ALIGN="CENTER"><A HREF="#" onClick="self.close()">Close Window</A></H3>';
content += '</BODY></HTML>';
disp.document.write(content);
//disp.moveTo(300,200);
disp.document.close();
}


