//<!--
/*
	This script was developed by Enigma Creations and is 
	copyright (c) 2003 by Enigma Creations. All rights reserved.
	Visit http://www.enigmacreations.com/ for more information.
*/
// ____________________________________________________________ Initialize the global variables
//
var IE_4Plus = 0;			//IE 4+ browser flag
var IEBrowser = 0;			//IE browser flag
var NS_3Plus = 0;			//Netscape 3+ browser flag
var NSBrowser = 0;			//Netscape browser flag
var FancyMode = 0;			//Image rollover capable flag
var ImageDir = "library/images/";		//Support image directory, buttons, etc.
//var ZoomTitle1 = "";		//Title part 1 of an image to be zoomed
//var ZoomTitle2 = "";		//Title part 2 of an image to be zoomed
//var ZoomImage = "";		//An image to be zoomed
//var ZoomX = "";			//Width of an image to be zoomed
//var ZoomY = "";			//Height of an image to be zoomed
//
//  ____________________________________________________________ Get the browser and version
//
var BrowserName = navigator.appName.substring(0,8);
if (BrowserName == "Netscape") {
	NSBrowser = 1;
	var browserVer = parseFloat(navigator.appVersion);
	if (browserVer >= 3) { NS_3Plus = 1; }
}
if (BrowserName == "Microsof") {
	IEBrowser = 1;
	var versionIndex = navigator.appVersion.indexOf("MSIE",0)+5;
	var browserVer = parseFloat(navigator.appVersion.substring(versionIndex));
	if (browserVer >= 4) { IE_4Plus = 1; }
}
if (NS_3Plus || IE_4Plus) { FancyMode = 1; }
//
// ____________________________________________________________ Open an output window
//
function OpenOutputWinBare(url,winname,winwidth,winheight) 
{
	if (winwidth <= 0) {winwidth = "600";}
	if (winheight <= 0) {winheight = "450";}
	var params = "";
	params = params + ",width=" + winwidth;
	params = params + ",height=" + winheight;
	newWindow = window.open(url,winname,params);
}
//
//  ____________________________________________________________ Show last function
//
function ShowZoom(artist,image,title,x,y) {
	ZoomTitle1 = artist;
	ZoomImage = image;
	ZoomTitle2 = "\"" + title + "\"";
	ZoomX = x;
	ZoomY = y;
	winX = Math.abs(ZoomX) + 40;
	winY = Math.abs(ZoomY) + 100;
	PopupWin('zoom.htm','Zoom'+ x + y,winX,winY);
}
//
// ____________________________________________________________ Open an output window
//
function PopupWin(url,winname,winwidth,winheight) 
{
	Xspot = 20;
	Yspot = 30;
	if (winwidth == "SignSample") 
	{
		winwidth = "760";
		winheight = "572";
		Xspot = 20;
		Yspot = 30;
	}
	
	var params = "";
	params = params + "scrollbars=no";
	params = params + ",resizable";
	params = params + ",copyhistory=no";
	params = params + ",width=" + winwidth;
	params = params + ",height=" + winheight;
	params = params + ",screenX=" + Xspot;
	params = params + ",screenY=" + Yspot;
	newWindow = window.open(url,winname,params);
	eval(newWindow).moveTo(Xspot,Yspot);
	eval(newWindow).focus();
}
//
// ____________________________________________________________ Foil
//
function Foil(act1,act2,sbj) {
	line = "mai" + "lto%" + "3A";
	line = line + act1 + act2 + "%" + "40";
	line = line + "enigma" + "creations" + "%" + "2E" + "com";
	line = line + "%" + "3F" + "Sub" + "ject" + "%" + "3D" + sbj;
	document.location = unescape(line);
}
//
// ____________________________________________________________ Set decimal places
//
function SetDecimal(expr,decplaces)
{
	var str = "" + Math.round(eval(expr) * Math.pow(10,decplaces));
	while (str.length <= decplaces) {
		str = "0" + str;
	}
	var decpoint = str.length - decplaces;
	return str.substring(0,decpoint) + "." + str.substring(decpoint,str.length);
}
//-->
