/*
 this module is for displaying pictures in a frame or popup window

*/

function WriteBottom(doc, index) {
doc.writeln('</center></body></html>');
}



function WriteTopPart(doc, index) {
doc.writeln('<html><head><title>' + ThumbInfo[index].title + '</title></head>');
doc.writeln('<body bgcolor="#000000" text="#FFCC66" link="#FFCC66" vlink="#FFAA33" alink="#00FF66" LEFTMARGIN="0" TOPMARGIN="30" MARGINWIDTH="0" MARGINHEIGHT="30">');

}

function WriteTop(doc, index) {
doc.writeln('<html><head><title>' + ThumbsList[index] + '</title></head>');
doc.writeln('<body bgcolor="#000000" text="#FFCC66" link="#FFCC66" vlink="#FFAA33" alink="#00FF66" LEFTMARGIN="0" TOPMARGIN="30" MARGINWIDTH="0" MARGINHEIGHT="30">');

}
/*
 we could generate the thumbslist inside the thumbs.htm  file which would
 be generated at the server
*/
function DisplayPic(theFrame, picIndex){
         theFrame.document.close();
         theFrame.document.open();
	 WriteTop(theFrame.document, picIndex);
         theFrame.document.writeln('<center> ' 
	+ '<img src="'
	+ ThumbsList[picIndex] 	+ '"><br>');
	WriteBottom(theFrame.document);
         theFrame.document.close();

}

/*
 we could generate the thumbslist inside the thumbs.htm  file which would
 be generated at the server
*/
function DisplayPicture(theFrame, picIndex){
   notThumb  = new String(ThumbInfo[picIndex].imgSrc);
   notThumb = notThumb.replace("t_", "");
         theFrame.document.close();
         theFrame.document.open();
	 WriteTopPart(theFrame.document, picIndex);
         theFrame.document.writeln('<center> ' 
	+ '<img src="'
	+ notThumb	+ '"><br><br>');
	
	theFrame.document.writeln('<font size="+1">' 
	+  ThumbInfo[picIndex].title + '</font>');

	if (ThumbInfo[picIndex].link !=" ") {
	  theFrame.document.writeln('<br>' + 
	'<a href="' + ThumbInfo[picIndex].link +
	'" target="OutSide">Click for more information</a>');

        }
	WriteBottom(theFrame.document);
         theFrame.document.close();

}

