/*----------------------------------------------------------

GLOBAL VARIABLES



* baseURL - [String] Web address of web site root.

----------------------------------------------------------*/

var baseURL = "../";

//var baseURL = "http://192.168.19.117/discovery/4_production/ASP/phase%202/";

//var baseURL = "http://216.87.34.98";

//var baseURL = "http://216.87.34.98/beta/";

//var baseURL = "http://www.lewisandclarkexhibit.org";

//alert("shared/viewer.js: baseURL: " + baseURL);



function showViewer1(catalogNumber){

	// [1] Set window width, height and position.  Check to 

	// see if window width and height were sent to the function.

	// If not, set default.  Otherwise, use passed values.

	//

	// * windowWidth - [Integer] Width of window.

	// * windowHeight - [Integer] Height of window.

	// * windowX - [Integer] X coordinate of window.  By default,

	// 		this value is calculated to center the window 

	//		horizontally.  If explicit positioning is required, 

	//		replace formula with value.

	// * windowY - [Integer] Y coordinate of window.  By default,

	//		this value is calculated to center the window 

	//		vertically.  If explicit positioning is required, 

	//		replace formula with value.

	if(arguments.length == 1){

		var windowWidth = 780;

		var windowHeight = 479;

	}else{

		var windowWidth = arguments[1];

		var windowHeight = arguments[2];

	}

	var windowX = (screen.width - windowWidth)/2;

	var windowY = (screen.height - windowHeight)/2;

	// [2] Define window options string.

	windowOptions = "toolbar=0,menubar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,width=" + windowWidth + ",height=" + windowHeight + ",top=" + windowY + ",left=" + windowX + ",screeny=" + windowY + ",screenx=" + windowX;

	// [3] Define document path.

	thisDocument = baseURL + "shared/viewer1/filter.html?" + catalogNumber;

	// [4] Open window.

	viewerWindow1 = window.open(thisDocument,"viewerWindow1",windowOptions);

}



function showViewer2(galleryID){

	// [1] Set window width, height and position.  Check to 

	// see if window width and height were sent to the function.

	// If not, set default.  Otherwise, use passed values.

	//

	// * windowWidth - [Integer] Width of window.

	// * windowHeight - [Integer] Height of window.

	// * windowX - [Integer] X coordinate of window.  By default,

	// 		this value is calculated to center the window 

	//		horizontally.  If explicit positioning is required, 

	//		replace formula with value.

	// * windowY - [Integer] Y coordinate of window.  By default,

	//		this value is calculated to center the window 

	//		vertically.  If explicit positioning is required, 

	//		replace formula with value.

	if(arguments.length == 1){

		var windowWidth = 780;

		var windowHeight = 479;

	}else{

		var windowWidth = arguments[1];

		var windowHeight = arguments[2];

	}

	var windowX = (screen.width - windowWidth)/2;

	var windowY = (screen.height - windowHeight)/2;

	// [2] Define window options string.

	windowOptions = "toolbar=0,menubar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,width=" + windowWidth + ",height=" + windowHeight + ",top=" + windowY + ",left=" + windowX + ",screeny=" + windowY + ",screenx=" + windowX;

	// [3] Define document path.

	thisDocument = baseURL + "shared/viewer2/filter.html?" + galleryID;

	// [4] Open window.

	viewerWindow2 = window.open(thisDocument,"viewerWindow2",windowOptions);

}



