// Generic function to show enlargements of photos

//IMAGE FOR FUNCTION 'showfig' SHOULD NOT EXCEED A SIZE OF 480 X 360

// JavaScript Document 
var myWin = null; 
var width = 644; 
var height = 514; 
var trayH = 30;
var frameW = width - 10;
var frameH = 70;
var tablewidth = width;
var tableheight = height;
var leftM = 0; 
var topM = 0; 
var x = 80; 
var y = 80;
var mapWin = null; 
var mapwidth = 480; 
var mapheight = 480; 
var pixWin = null;
var pixWidth = 540;
var pixHeight = 520;
var pixframeW = pixWidth - 20;
var pixframeH = pixHeight - 60;
var missionWin = null;
var missionWidth = 644;
var missionHeight = 514;


if (document.all) { 
	// IE Browsers 
	var position = "left=" + x + ",top=" + y; 
} else { 
	// all others 
	var position = "screenX=" + x + ",screenY=" + y; 
	leftM = 5;
	topM = 5;
	tablewidth = tablewidth - 18;
	tableheight = tableheight - 21;
} 


function showMission(srcImage) { 

	// open a new window if this is the first time calling 
	// this function or if the window was previously closed 
    if (missionWin == null || missionWin.closed) { 
		missionWin = window.open("", "FullSize", "location=no,status=no,scrollbars=auto,resizable=yes,width=" + missionWidth + ",height=" + missionHeight + "," + position); 
	} 

	// output html document to this window	
	var d = missionWin.document;

	d.writeln("<html><head><title>East Moriches Fire Department</title>");
	d.writeln("<link rel='stylesheet' type='text/css' href='./emfd_styles.css'>");
	d.writeln("</head>");
	d.writeln("<body bgcolor='#ffffff' align='center' leftmargin=" + leftM + " topmargin=" + topM + ">");
	d.writeln("<table cellpadding='0' cellspacing='0' align='center' border='1' bordercolor='#000000' width='" + tablewidth + "px' height='" + tableheight + "px'>");
	d.writeln("<tr><td valign='center' align='center'><img src='misc/photos/" + srcImage + ".jpg'></img></td></tr>"); 
	d.writeln("<tr><td valign='center' align='center' height='" + trayH + "'><a href='javascript:close()' class='nav07'>Close Window</a></td></tr>"); 
	d.writeln("</table>");
	d.writeln("</body></html>"); 
	d.close(); 

	// bring the window to the top 
	missionWin.focus(); 

} 

function showfig(srcImage) { 

	// open a new window if this is the first time calling 
	// this function or if the window was previously closed 
    if (myWin == null || myWin.closed) { 
		myWin = window.open("", "FullSize", "location=no,status=no,scrollbars=auto,resizable=yes,width=" + width + ",height=" + height + "," + position); 
	} 

	// output html document to this window	
	var d = myWin.document;

	d.writeln("<html><head><title>East Moriches Fire Department</title>");
	d.writeln("<link rel='stylesheet' type='text/css' href='./emfd_styles.css'>");
	d.writeln("</head>");
	d.writeln("<body bgcolor='#ffffff' align='center' leftmargin=" + leftM + " topmargin=" + topM + ">");
	d.writeln("<table cellpadding='0' cellspacing='0' align='center' border='1' bordercolor='#000000' width='" + tablewidth + "px' height='" + tableheight + "px'>");
	d.writeln("<tr><td valign='center' align='center'><img src='misc/photos/" + srcImage + ".jpg'></img></td></tr>"); 
	d.writeln("<tr><td valign='top' align='center'><iframe name='caption' frameborder='0' src='misc/photos/" + srcImage + ".htm' width='" + frameW + "' height='" + frameH + "' scrolling='auto' align='top' marginheight='0' marginwidth='0'></iframe></td></tr>"); 
	d.writeln("<tr><td valign='center' align='center' height='" + trayH + "'><a href='javascript:close()' class='nav07'>Close Window</a></td></tr>"); 
	d.writeln("</table>");
	d.writeln("</body></html>"); 
	d.close(); 

	// bring the window to the top 
	myWin.focus(); 

} 

function showpage(srcPage) { 

	// open a new window if this is the first time calling 
	// this function or if the window was previously closed 
    if (pixWin == null || pixWin.closed) { 
		pixWin = window.open("", "FullSize", "location=no,status=no,scrollbars=auto,resizable=yes,width=" + pixWidth + ",height=" + pixHeight + "," + position); 
	} 

	// output html document to this window	
	var d = pixWin.document;

	d.writeln("<html><head><title>East Moriches Fire Department</title>");
	d.writeln("<link rel='stylesheet' type='text/css' href='./emfd_styles.css'>");
	d.writeln("</head>");
	d.writeln("<body bgcolor='#ffffff' align='center' leftmargin=" + leftM + " topmargin=" + topM + ">");
	d.writeln("<table cellpadding='0' cellspacing='0' align='center' border='1' bordercolor='#000000' width='" + tablewidth + "px' height='" + tableheight + "px'>");
	//d.writeln("<tr><td valign='center' align='center'><img src='misc/photos/" + srcImage + ".jpg'></img></td></tr>"); 
	d.writeln("<tr><td valign='top' align='center'><iframe name='newpage' frameborder='0' src='misc/photos/" + srcPage + ".htm' width='" + pixframeW + "' height='" + pixframeH + "' scrolling='auto' align='top' marginheight='0' marginwidth='0'></iframe></td></tr>"); 
	d.writeln("<tr><td valign='center' align='center' height='" + trayH + "'><br><a href='javascript:close()' class='nav07'>Close Window</a><br><br></td></tr>"); 
	d.writeln("</table>");
	d.writeln("</body></html>"); 
	d.close(); 

	// bring the window to the top 
	pixWin.focus(); 

} 
  
function showmap(srcImage) { 

	// open a new window if this is the first time calling 
	// this function or if the window was previously closed 
    if (mapWin == null || mapWin.closed) { 
		mapWin = window.open("", "FullSize", "location=no,status=no,scrollbars=no,resizable=no,width=" + mapwidth + ",height=" + mapheight + "," + position); 
	} 

	// output html document to this window	
	var d = mapWin.document;

	d.writeln("<html><head><title>Map</title></head>");
	d.writeln("<body bgcolor='#ffffff' align='center' leftmargin=" + leftM + " topmargin=" + topM + ">");
	d.writeln("<table cellpadding='0' cellspacing='0' align='center' border='0' width='" + mapwidth + "px' height='" + mapheight + "px'>");
	d.writeln("<tr><td valign='center' align='center'><img src='" + srcImage + "'></img></td></tr>"); 
	d.writeln("</table>");
	d.writeln("</body></html>"); 
	d.close(); 

	// bring the window to the top 
	mapWin.focus(); 

} 
  
function showdirs() { 

	// open a new window if this is the first time calling 
	// this function or if the window was previously closed 
    if (mapWin == null || mapWin.closed) { 
		mapWin = window.open("", "FullSize", "location=no,status=no,scrollbars=no,resizable=no,width=" + mapwidth + ",height=" + mapheight + "," + position); 
	} 

	// output html document to this window	
	var d = mapWin.document;

	d.writeln("<html><head><title>Map</title>");
	d.writeln("<link rel='stylesheet' type='text/css' href='./salonstyles.css'></head>");
	d.writeln("<body bgcolor='#ffffff' align='center' leftmargin='0' topmargin='0'>");
	d.writeln("<table cellpadding='6' cellspacing='0' align='center' border='0' width='" + mapwidth + "px' height='" + mapheight + "px'>");
	d.writeln("<tr><td valign='top' align='left'>"); 
	d.writeln("<span class='mini02'>"); 
	d.writeln("<b>From Points West:</b><br>");
	d.writeln("&nbsp;&nbsp;&gt;Take LIE (I-495) to Exit 71 or Sunrise Hwy. (27) to Exit 61<br>");
	d.writeln("&nbsp;&nbsp;&gt;Follow signs traveling South to Eastport<br>");
	d.writeln("&nbsp;&nbsp;&gt;Make Left onto Montauk Hwy. (Main St.)<br>");
	d.writeln("&nbsp;&nbsp;&gt;Travel East on Montauk Hwy. into Speonk (about 3 mi.)<br>");
	d.writeln("&nbsp;&nbsp;&gt;Shopping center is immediately on Right after Phillips Ave.<br><br>");
	d.writeln("<b>From Points East:</b><br>");
	d.writeln("&nbsp;&nbsp;&gt;Travel West on Montauk Hwy. into Speonk<br>");
	d.writeln("&nbsp;&nbsp;&gt;Shopping center is on Left (Entrance located on Wisteria Dr.)");
	d.writeln("</span>");
	d.writeln("</td></tr>"); 
	d.writeln("<tr><td align='center' valign='top'>"); 
	d.writeln("<img src='images/map_004a.gif' border='0' alt='' width='480'>");
	d.writeln("</td></tr>"); 
	d.writeln("</table>");
	d.writeln("</body></html>"); 
	d.close(); 

	// bring the window to the top 
	mapWin.focus(); 

}   

