/*The following code opens up the windows for the images*/

function launchmap(whichone)
{	
	if(whichone==1)
		{
		DynaWin('timmets.gif', '536', '409', '150', '200');
		}
	if(whichone==2)
		{
		DynaWin('azshellfact.gif', '463', '353', '150', '200');
		}
	if(whichone==3)
		{
		DynaWin('rodscarb.gif', '536', '409', '150', '200');
		}
	if(whichone==4)
		{
		DynaWin('swbforms.gif', '536', '409', '150', '200');
		}
	if(whichone==5)
		{
		DynaWin('cactuscandy.gif', '536', '409', '150', '200');
		}
	if(whichone==6)
		{
		DynaWin('candleglow.gif', '536', '409', '150', '200');
		}
	if(whichone==7)
		{
		DynaWin('wirelesson.gif', '536', '409', '150', '200');
		}
	if(whichone==8)
		{
		DynaWin('byrneshaw.gif', '536', '409', '150', '200');
		}
	if(whichone==9)
		{
		DynaWin('rosesgalore.gif', '536', '409', '150', '200');
		}
	if(whichone==10)
		{
		DynaWin('asapre.gif', '536', '409', '150', '200');
		}
	if(whichone==11)
		{
		DynaWin('latinrealty.gif', '536', '409', '150', '200');
		}
	if(whichone==12)
		{
		DynaWin('stumpys.gif', '536', '409', '150', '200');
		}
	if(whichone==13)
		{
		DynaWin('kescreen.gif', '536', '409', '150', '200');
		}
	if(whichone==14)
		{
		DynaWin('kescreen.gif', '536', '409', '150', '200');
		}
	if(whichone==15)
		{
		DynaWin('cfg.gif', '536', '409', '150', '200');
		}
	if(whichone==16)
		{
		DynaWin('phxtest.gif', '536', '409', '150', '200');
		}
	if(whichone==17)
		{
		DynaWin('supervac.gif', '536', '409', '150', '200');
		}
	if(whichone==18)
		{
		DynaWin('fiestalatina.gif', '536', '409', '150', '200');
		}
	if(whichone==19)
		{
		DynaWin('castro.gif', '536', '409', '150', '200');
		}
	if(whichone==20)
		{
		DynaWin('clinmap.gif', '536', '409', '150', '200');
		}
	if(whichone==21)
		{
		DynaWin('owensbus.gif', '561', '428', '150', '200');
		}
	
	if(whichone==22)
		{
		DynaWin('stumpysmap.gif', '536', '409', '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();
}

