function ShowWide(slideshowname) {
var optionstr="resizable, scrollbars, top="+(screen.height-260)/2+",left="+(screen.width-340)/2+",width=340,height=260";

msgWindow=window.open("","displayWindow",optionstr);
msgWindow.document.write('<HTML><HEAD><TITLE>Slideshow</TITLE></HEAD><BODY bgcolor="#ffffff"><DIV align="center"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=320 HEIGHT=240><PARAM NAME=movie VALUE='+slideshowname+'><PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=exactfit><PARAM NAME=align VALUE=t><PARAM NAME=wmode VALUE=opaque><PARAM NAME=bgcolor VALUE=#ffffff><EMBED src="'+slideshowname+'" quality=high scale=exactfit align=t wmode=opaque WIDTH=320 HEIGHT=240 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT></DIV></BODY></HTML>');
}

function ShowTall(slideshowname) {
var optionstr="resizable, scrollbars, top="+(screen.height-340)/2+",left="+(screen.width-260)/2+",width=260,height=340";

msgWindow=window.open("","displayWindow",optionstr);
msgWindow.document.write('<HTML><HEAD><TITLE>Slideshow</TITLE></HEAD><BODY bgcolor="#ffffff"><DIV align="center"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=240 HEIGHT=320><PARAM NAME=movie VALUE='+slideshowname+'><PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=exactfit><PARAM NAME=align VALUE=t><PARAM NAME=wmode VALUE=opaque><PARAM NAME=bgcolor VALUE=#ffffff><EMBED src="'+slideshowname+'" quality=high scale=exactfit align=t wmode=opaque WIDTH=240 HEIGHT=320 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT></DIV></BODY></HTML>');
}

function ShowSlide(firstpic) {
// shows images in html files
var optionstr="resizable, scrollbars, top="+(screen.height-374)/2+",left="+(screen.width-340)/2+",width=340,height=374";
msgWindow=window.open("","displayWindow",optionstr);
msgWindow.location=firstpic;
}

function OpenWin(loadurl,winheight,winwidth) {
// opens a window and loads in a file
var optionstr="resizable, scrollbars, top="+(screen.height-winheight)/2+",left="+(screen.width-winwidth)/2+",width="+winwidth+",height="+winheight+"'";
msgWindow=window.open("","ThisWindow",optionstr);
msgWindow.location=loadurl;
}

function OpenWin2(loadurl,winheight,winwidth) {
// opens a window and loads in a file
var optionstr="resizable, scrollbars, top="+(screen.height-winheight)/2+",left="+(screen.width-winwidth)/2+",width="+winwidth+",height="+winheight+"'";
msgWindow2=window.open("","ThisWindow2",optionstr);
msgWindow2.location=loadurl;
}

function PadZeros(num, totalLen) {
   var numStr = num.toString();
   var numZeros = totalLen - numStr.length;
   if (numZeros > 0) {
     for (var i = 1; i <= numZeros; i++) {
        numStr = "0" + numStr            }
                     }
return numStr
}
/*
function ShowImgs(dirname, firstno, lastno) {
//   var optionstr="resizable, scrollbars, screenX=1,screenY=1,height="+screen.availheight+",width="+screen.availwidth;
   var optionstr="resizable, scrollbars, top=0,left=0,height="+screen.availheight+",width="+screen.availwidth;
   msgWindow=window.open("","displayWindow",optionstr);
   msgWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Slideshow - Controls Below the Pictures</title><script type="text/javascript">var TimerID= null;var TimerRunning= false;var subby= '+firstno+';function HandlePause(TotalImgs) {if(TimerRunning) {document.forms["imgs"].elements["pausebtn"].value= "MAKE AUTOMATIC";StopClock();}else {document.forms["imgs"].elements["pausebtn"].value= "MAKE MANUAL";StartClock(TotalImgs);}} function ShowNext(TotalImgs) {if (subby < TotalImgs) {++subby;ShowImage();}else {if (TimerRunning) {StopClock();}window.close();}} function ShowPrevious() {if (subby > 1) {--subby;ShowImage();}} function StopClock() {if(TimerRunning) {clearInterval(TimerID);TimerRunning = false;}}function ShowImage() {document.images.SlideImg.src = "'+dirname+'" +PadZeros(subby,3) + ".jpg";document.forms["imgs"].elements["imgnum"].value= subby;}function StartClock(TotalImgs) {StopClock();	TimerRunning = true;TimerID= setInterval("ShowNext("+TotalImgs+")", "4000");}function PadZeros(num, totalLen) {var numStr = num.toString(); var numZeros = totalLen - numStr.length; if (numZeros > 0) {for (var i = 1; i <= numZeros; i++) {numStr = "0" + numStr}}return numStr}</script></head><body bgcolor="#003333" text="#FFFFFF" link="#FFCCFF" vlink="#FF9966" alink="#FFCCCC" onLoad="StartClock('+lastno+')"><center><img name="SlideImg" src= "'+dirname+ PadZeros(firstno,3) +'.jpg" border="12" align="middle"></center><center><form name="imgs">Picture <input type="button" name="imgnum" value="'+firstno+'"> of <input type="button" name="imgtotal" value="'+lastno+'"><br><input type="button" name="pausebtn" value="MAKE AUTOMATIC" onClick="HandlePause('+lastno+')"><br><input type="button" name="prevbtn" value="PREVIOUS" onClick="ShowPrevious()">  <input type="button" name="prevbtn" value="NEXT" onClick="ShowNext('+lastno+')"></form></center></body></html>');
}

*/function ShowImgs(dirname, firstno, lastno) {
//   var optionstr="resizable, scrollbars, screenX=1,screenY=1,height="+screen.availheight+",width="+screen.availwidth;
//   var optionstr="resizable, scrollbars, top=0,left=0,height="+screen.availheight+",width="+screen.availwidth;
//   var optionstr="resizable, scrollbars, top=0,left=0,height="+screen.availheight+",width="+screen.availwidth;
var optionstr="resizable, scrollbars, top="+(screen.height-630)/2+",left="+(screen.width-705)/2+",width=705,height=630";

   msgWindow=window.open("","displayWindow",optionstr);
   msgWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Slideshow - Controls Below the Pictures</title><script type="text/javascript">var TimerID= null;var TimerRunning= false;var subby= '+firstno+';function HandlePause(TotalImgs) {if(TimerRunning) {document.forms["imgs"].elements["pausebtn"].value= "MAKE AUTOMATIC";StopClock();}else {document.forms["imgs"].elements["pausebtn"].value= "MAKE MANUAL";StartClock(TotalImgs);}} function ShowNext(TotalImgs) {if (subby < TotalImgs) {++subby;ShowImage();}else {if (TimerRunning) {StopClock();}window.close();}} function ShowPrevious() {if (subby > 1) {--subby;ShowImage();}} function StopClock() {if(TimerRunning) {clearInterval(TimerID);TimerRunning = false;}}function ShowImage() {document.images.SlideImg.src = "'+dirname+'" +PadZeros(subby,3) + ".jpg";document.forms["imgs"].elements["imgnum"].value= subby;}function StartClock(TotalImgs) {StopClock();	TimerRunning = true;TimerID= setInterval("ShowNext("+TotalImgs+")", "4000");}function PadZeros(num, totalLen) {var numStr = num.toString(); var numZeros = totalLen - numStr.length; if (numZeros > 0) {for (var i = 1; i <= numZeros; i++) {numStr = "0" + numStr}}return numStr}</script></head><body bgcolor="#000000" text="#FFFFFF" link="#FFCCFF" vlink="#FF9966" alink="#FFCCCC" onLoad="StartClock('+lastno+')"><center><img name="SlideImg" src= "'+dirname+ PadZeros(firstno,3) +'.jpg" border="12" align="middle"></center><center><form name="imgs">Picture <input type="button" name="imgnum" value="'+firstno+'"> of <input type="button" name="imgtotal" value="'+lastno+'"><br><input type="button" name="pausebtn" value="MAKE AUTOMATIC" onClick="HandlePause('+lastno+')"><br><input type="button" name="prevbtn" value="PREVIOUS" onClick="ShowPrevious()">  <input type="button" name="prevbtn" value="NEXT" onClick="ShowNext('+lastno+')"></form></center></body></html>');
}

function ShowImgsSize(dirname, firstno, lastno, picwidth, picheight) {
// this function accepts a
//   var optionstr="resizable, scrollbars, screenX=1,screenY=1,height="+screen.availheight+",width="+screen.availwidth;
//   var optionstr="resizable, scrollbars, top=0,left=0,height="+screen.availheight+",width="+screen.availwidth;
//   var optionstr="resizable, scrollbars, top=0,left=0,height="+screen.availheight+",width="+screen.availwidth;
var optionstr="resizable, scrollbars, top="+(screen.height-picheight)/2+",left="+(screen.width-picwidth)/2+",width="+picwidth+",height="+picheight;

   msgWindow=window.open("","displayWindow",optionstr);
   msgWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Slideshow - Controls Below the Pictures</title><script type="text/javascript">var TimerID= null;var TimerRunning= false;var subby= '+firstno+';function HandlePause(TotalImgs) {if(TimerRunning) {document.forms["imgs"].elements["pausebtn"].value= "MAKE AUTOMATIC";StopClock();}else {document.forms["imgs"].elements["pausebtn"].value= "MAKE MANUAL";StartClock(TotalImgs);}} function ShowNext(TotalImgs) {if (subby < TotalImgs) {++subby;ShowImage();}else {if (TimerRunning) {StopClock();}window.close();}} function ShowPrevious() {if (subby > 1) {--subby;ShowImage();}} function StopClock() {if(TimerRunning) {clearInterval(TimerID);TimerRunning = false;}}function ShowImage() {document.images.SlideImg.src = "'+dirname+'" +PadZeros(subby,3) + ".jpg";document.forms["imgs"].elements["imgnum"].value= subby;}function StartClock(TotalImgs) {StopClock();	TimerRunning = true;TimerID= setInterval("ShowNext("+TotalImgs+")", "4000");}function PadZeros(num, totalLen) {var numStr = num.toString(); var numZeros = totalLen - numStr.length; if (numZeros > 0) {for (var i = 1; i <= numZeros; i++) {numStr = "0" + numStr}}return numStr}</script></head><body bgcolor="#000000" text="#FFFFFF" link="#FFCCFF" vlink="#FF9966" alink="#FFCCCC" onLoad="StartClock('+lastno+')"><center><img name="SlideImg" src= "'+dirname+ PadZeros(firstno,3) +'.jpg" border="12" align="middle"></center><center><form name="imgs">Picture <input type="button" name="imgnum" value="'+firstno+'"> of <input type="button" name="imgtotal" value="'+lastno+'"><br><input type="button" name="pausebtn" value="MAKE AUTOMATIC" onClick="HandlePause('+lastno+')"><br><input type="button" name="prevbtn" value="PREVIOUS" onClick="ShowPrevious()">  <input type="button" name="prevbtn" value="NEXT" onClick="ShowNext('+lastno+')"></form></center></body></html>');
}