/*----------------------------------------------------------------------------------------------------
General functions for site wide javascripting.  When adding a function, comment in your name, date you 
added the function, what the function does, and describe any parameters your function takes.  
----------------------------------------------------------------------------------------------------*/

//----------------------------------------------------------------------------------------------------
//--  	Name:		openWindow(image, title, newWidth, newHeight, desc)
//--  	Comments:	Pops up a window for screen shots
//--					image: screen shot image name stored in '<%= Application("Images") %>imgname.jpg'
//--					width: width of the window to pop up
//--					height: height of the window to pop up
//--					title: page title for the top of the description
//--					desc: brief description of the screen shot
//--	Mods:
//--	----------------------------------------------------------------------------------------------
//--	6/8/2004	Vince Welter	Created for Picasso project
//----------------------------------------------------------------------------------------------------
function openWindow(image, title, newWidth, newHeight, desc) {
	var calcLeft = 100;
	var calcTop = 100;
	var imageTag;
	var widthTag;
	var heightTag;
	var titleTag;
	var descTag;
	
	titleTag = title;
	imageTag = image;
	widthTag = newWidth;
	heightTag = newHeight;
	descTag = desc;
	
	variables = imageTag + '&width=' + widthTag +'&height=' + heightTag + '&title=' + escape(titleTag) + '&desc=' + escape(descTag);

	if (newWidth < 480) {
	newWidth = 520 }
	else {	
	newWidth = newWidth + 40;
	}
	
	
	if (parseInt(navigator.appVersion) >= 4){
	  calcTop = screen.availHeight /2 - newHeight / 2;
	  calcLeft = screen.availWidth / 2 - newWidth / 2;}

remoteWindow = window.open('http://www.telnet.ca/shared/popup.cfm?img=' + variables, + 'remote', 'status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resize=yes,width=' + newWidth + ',height=' + newHeight + ',left=' + calcLeft + ',top=' + calcTop + ',resizable=yes');

	remoteWindow.focus();
}



