// This script opens a new browser window and writes
// HTML to display an image with a title and caption

function show_photo(vName, vSleeps, imgPath, imgWidth, imgHeight) {

// specify window parameters
  var h = 260 + parseInt(imgHeight);
  var photoWin = window.open( '', 'photo', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, resizable=no, scrollbars=no, width=800, height=' + h);

// wrote content to window
  photoWin.document.writeln('<html>');
  photoWin.document.writeln('<head>');
  photoWin.document.writeln('<title>Welcome to Vesta Italian Villas - Villa Photo Gallery</title>');
  photoWin.document.writeln('<LINK rel="stylesheet" href="../styles.css" type="text/css">');	
  photoWin.document.writeln('<META NAME="description" CONTENT="Vesta Italian Villas">');
  photoWin.document.writeln('<META NAME="keywords" CONTENT="Vesta Italian Villas">');
  photoWin.document.writeln('</head>');
  photoWin.document.writeln('<BODY BGCOLOR="#FEDC67" marginheight="0" marginwidth="0" topmargin=0 leftmargin=0 link="#700701">');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="1" height="8" border="0"><br>');
  photoWin.document.writeln('<center>');
  photoWin.document.writeln('<!-- HEADER ----------------->');
  photoWin.document.writeln('<table width="752" border="0" cellspacing="0" cellpadding="0" align="center">');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('<td width="750" height="88" bgcolor="#FFC705"><img src="../graphics/pop_up_header.gif" width="750" height="88" border="0"></td>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('</table>');
  photoWin.document.writeln('<!-- End HEADER ----------------->');
  photoWin.document.writeln('<!-- MAIN ----------------------->');
  photoWin.document.writeln('<table width="752" border="0" cellspacing="0" cellpadding="0" align="center">');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('<td width="750" height="10" align="center" valign="top" bgcolor="#FFEBA6"><img src="../graphics/spacer.gif" width="750" height="10" border="0"></td>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('<td width="750" height="21" align="center" valign="top" bgcolor="#FFEBA6">');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="750" height="1" border="0"><br>');
  photoWin.document.writeln('<center>');
  photoWin.document.writeln('<!-- Begin Intro Table -------------------------->');
  photoWin.document.writeln('<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<td width="49" height="1" align="center" valign="top" bgcolor="#FFEBA6">');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="49" height="1" border="0"></td>');
  photoWin.document.writeln('<td width="691" height="1" align="center" valign="top" bgcolor="#FFEBA6">');
  photoWin.document.writeln('<H1 CLASS=headlinec>' + vName + '</H1><H4 CLASS=sleepsc>' + vSleeps + '</H4>');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="691" height="8" border="0"></td>');
  photoWin.document.writeln('<td width="10" height="1" align="left" valign="top" bgcolor="#FFEBA6">');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="10" height="1" border="0"></td>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<TD WIDTH="750" HEIGHT="1" COLSPAN="3" ALIGN="center" VALIGN="middle" BGCOLOR="#FFEBA6">');
  photoWin.document.writeln('<!-- Large Image Here -->');
  photoWin.document.writeln('<img src="' + imgPath + '" width="' + imgWidth + '" height="' + imgHeight + '" align="middle" border="0"><br>');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="750" height="1" border="0">');
  photoWin.document.writeln('</TD>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('</table>');
  photoWin.document.writeln('<!-- End Intro Table ----------------------------->');
  photoWin.document.writeln('</center>');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="750" height="1" border="0"><br>');
  photoWin.document.writeln('</td>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('</table>');
  photoWin.document.writeln('<!-- END MAIN -------------------->');
  photoWin.document.writeln('<!-- FOOTER ----------------->');
  photoWin.document.writeln('<table width="752" border="0" cellspacing="0" cellpadding="0" align="center">');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('<td width="750" height="37" align="center" valign="middle" bgcolor="#FFC705" background="../graphics//pop_up_footer_top.gif"><img src="../graphics/spacer.gif" width="750" height="2" border="0"></td>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('<td width="750" height="51" align="center" valign="top" bgcolor="#FFC705" background="../graphics/pop_up_footer_bottom.gif">');
  photoWin.document.writeln('<img src="../graphics/header_ypoi.gif" width="208" height="35" border="0"><br>');
  photoWin.document.writeln('<img src="../graphics/spacer.gif" width="750" height="1" border="0"></td>');
  photoWin.document.writeln('<td width="1" bgcolor="#762424"><img src="../graphics/spacer.gif" width="1" height="1" border="0"></td>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('<tr>');
  photoWin.document.writeln('<td width="752" colspan="3" bgcolor="#762424"><img src="../graphics/spacer.gif" width="752" height="1" border="0"></td>');
  photoWin.document.writeln('</tr>');
  photoWin.document.writeln('</table>');
  photoWin.document.writeln('<br>');
  photoWin.document.writeln('<!-- End FOOTER ----------------->');
  photoWin.document.writeln('<br>');
  photoWin.document.writeln('</body>');
  photoWin.document.writeln('</html>');
  photoWin.document.close();	
	
// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();
}

