/*
slide-viewer by Daniel Murphy | I can be reached at d4nielmurphy@gmail.com if you have any questions.

Make sure the header on the initial page links to the script:
	<script language="JavaScript" src="popup_win.js" type="text/javascript"></script>
	
this script is called like so:
	<a href="#null" onclick="writeConsole('title','image','tall')"> 
		variable 'tall' will result in portrait display, otherwise leave it blank for landscape
		
formatting is controlled by popup_win.css
	base image size is 640*480 with a bg of 18px margin of 18px and a title bar of 18px. 
		so h=480+18+18*2 and w=640+18*2. Adjustments can be made accordingly
*/

function writeConsole(title_var,image_var,o_var) {
	if (o_var=='tall') {
 top.consoleRef=window.open('','myconsole',
  'width=553,height=730'
   +',menubar=0'
   +',toolbar=0'
   +',status=0'
   +',scrollbars=0'
   +',resizable=0')
 }
 else {
	  top.consoleRef=window.open('','myconsole',
  'width=712,height=571'
   +',menubar=0'
   +',toolbar=0'
   +',status=0'
   +',scrollbars=0'
   +',resizable=0')
	 }; 
 top.consoleRef.document.writeln(
  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>API-Delta | Gallery</title><link href="/css/popup_win.css" rel="stylesheet" type="text/css" /></head>'
   +'<body><div class="slide_holder"><div class="slide"><div class="slide_title"><div class="slide_close"><a href="javascript:window.close();">Close Window</a> <a href="javascript:window.close();"><img src="/images/slide_close.png" border="0" alt="close window" align="top"/></a></div>'
   +title_var
   +'</div><img src="'
   +image_var
   +'" border="0" alt="close window" /></div></div></body></html>'
   
 )
 top.consoleRef.document.close()
}

