//  All contents Copyright 2007 Charlies Critters. All rights reserved. 

// *********************************** Thumbnail Popup Script **********************************
// use this html to call an image pop-up using this script:
//<a href="images/image.jpg" target="_blank" onclick="LaunchImageWindow('images/image.jpg',240,302); return false;">...
//...<img src="images/thumb/thumbnail.jpg" width="153" height="100" class="thumb_l" alt="thumbnail" title="imagename"></a> 
function LaunchImageWindow(ImageSRC,ImageWidth,ImageHeight) {

var PositionLeft = 20; //Position of image window pop-up from left in pixels
var PositionTop = 140; //Position of image window pop-up from top in pixels
var InsideWidth = 0; //Define inside width dimension variable and initialize to 0
var InsideHeight = 0; //Define inside height dimension variable and initialize to 0

InsideWidth=ImageWidth+50; //Defines side margins
InsideHeight=ImageHeight+40; //Defines top and bottom margins

// Define image window pop-up and contents
ImageWindow = window.open('','ImageWindowPopUp','height=' + ImageHeight + ',width=' + ImageWidth + ',toolbar=no,directories=no,status=no,' + 'menubar=no,scrollbars=no,resizable=no');
ImageWindow.resizeTo(InsideWidth+2,InsideHeight+80); //Resizes outside dimensions - add 2 and 30 to account for title bar, border, etc.
ImageWindow.moveTo(PositionLeft,PositionTop);
ImageWindow.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
ImageWindow.document.write('<html><head><title>Charlies Critters Image Window</title></head>');
ImageWindow.document.write('<body style="background-color:#ffffcc" onclick="self.close()">');
ImageWindow.document.write('<p style="text-align:center; vertical-align:middle">');
ImageWindow.document.write('<img src="'+ ImageSRC +'" width="'+ ImageWidth +'" height="'+ ImageHeight +'" align="middle" border="0" alt="Image loading, please wait." title="Click To Close Window" />');
ImageWindow.document.write('</p>');
ImageWindow.document.write('</body></html>');
ImageWindow.focus();
}

// ##################################### Home Link Script ######################################
function home(){
	window.location = "index.html" // Allows onClick home link (not actually part of menu script)
}
