isNav=false;
isW3C=false;
isExp=false;
isOpera=false;
isNOT=false;
isMac=false;

// Detect browser and define pre/suf-fixes
browser=navigator.appName;
version=navigator.appVersion;
useragent=navigator.userAgent;
Vmajor=parseInt(navigator.appVersion);
Vminor=parseFloat(navigator.appVersion);

if (useragent.indexOf('Opera') != -1) {
	isOpera=true;
	pre='all';
	suff='.style';
}
else if (browser=="Netscape") {
	if (Vmajor==4)
	{
		isNav=true; pre='layers.'; suf='';
	}
	else if (Vmajor>=5)	isW3C=true;
	else isNOT=true;
}
else if (browser=="Microsoft Internet Explorer") {
	if ( version.indexOf('MSIE 5.0; Macintosh;') != -1 )  {
		isExp=true;
		pre='all.';
		suf='.style';
	}
	// IE 4 to 5.5 return 4 as the version
	else if ( (Vmajor==4) ) {
		isExp=true;
		pre='all.';
		suf='.style';
	}
	else isNOT=true;
} else {
	isW3C=true;
}

if (version.indexOf('Mac') != -1) isMac=true;


function changeborder(which, color) {
	if (isExp) {
		eval ('document.'+pre+which+suf+'.color="' + color + '"');
		eval ('document.'+pre+which+suf+'.borderColor="' + color + '"');
		return;
	}
	else if (isW3C || isOpera) {
		obj=document.getElementById(which);
		obj.style.color=color;
		obj.style.borderColor=color;
	}
}




function swapImage(strElement, objImage) {	
// this function swaps the image identified by strElement for a new one preloaded as objImage
	if (document.images && objImage && objImage.src && objImage.src != "") {
		if (document.images[strElement] && document.images[strElement].src != objImage.src) {
			document.images[strElement].src = objImage.src;
		}
	}
}

function openWin1() {
var n=open('newsletter.html','new','width=500,height=130,menubar=no,status=yes,scrollbars=no,scrolling=0,resizable=no');
}

function openWin2() {
var n=open('thankyou.html','new','width=230,height=175,menubar=no,status=yes,scrollbars=no,scrolling=0,resizable=no');
}	

var currentCollectionItem = -1;

function enlargeImage(img, alt, itemID) {

	if (document.images && document.images["largeImg"]) {
			
			document.images["largeImg"].src = img;
			document.images["largeImg"].alt = alt;
			if (itemID != currentCollectionItem) {
				currentCollectionItem = itemID;
			}
	}
}


