// JavaScript Document
<!--
//***************************************************
// don't display email addresses -- protect from spam bots
// modified to handle both formmail and multiple email addresses
//***************************************************
function noSpam() {
	var link = noSpam.arguments[0]; // text for the link
	var subject = noSpam.arguments[1]; // if there's a subject line to the message

	var myat = String.fromCharCode(64);   // @
	var mydot = String.fromCharCode(46);  // .
	var addr = '';

	// starting from the third argument,
	// read the segments and build the address:
	var i;
	var position = 0; // used to check progress to add @ dot comma
	for (i = 2; i < noSpam.arguments.length; i++) {
		if (position == 3) { // must be another email address so reset this and add comma
			position = 0;
			addr += ',';
		}
		if (position) {
			// check whether this element (any but the first)
			// comes after the @ or a dot:
			addr += (position == 1) ? myat : mydot;
		}
		addr += noSpam.arguments[i];
		position++;
	}

	var str = '';
	if (link) {
		if (link== 'formmail') {
			// you could break this down further so that
			// the 'recipient' is less apparent:
			str = '<INPUT TYPE=hidden NAME="recipient" VALUE="';
			
			str += addr;
			str += '">';
		}
		else {
			// you could break this down further so that
			// the 'mailto' is less apparent:
			str = '<a href="mailto:' + addr;
			
			if (subject) {
				// code to display the subject
				str += '?subject=' + subject;
			}
			
			str += '">';
	
			// if the first argument was literally 'addr', the text for the link
			// is the address itself, otherwise it's the text of the argument:
			str += (link == 'addr') ? addr : link;
			
			str += '<\/a>';  // close the tag
		}
	}
	else {
		// if the first argument is '' just print the address
		// without making it a link at all:
		str = addr;
	}

	document.write (str);
}

//***************************************************
// ImageReady code to swap images on roll-over
//***************************************************

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

//***************************************************
// Pop up image in new window with background color and title/caption
//***************************************************

function popitup(imageURL, newwindowname, title, caption, imagewidth, imageheight)
{
	if (! window.focus) return true;
	windowheight=imageheight+88;
	windowwidth=imagewidth+12;
	newwindow=window.open('',newwindowname,'height='+windowheight+',width='+windowwidth);
	var tmp = newwindow.document;
	tmp.write('<html><head><title>'+title+'</title>');
	tmp.write('</head><body bgcolor="#FCCC32" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><div style="text-align:center"><img src="'+imageURL+'" alt="'+caption+'" title="'+caption+'" width="'+imagewidth+'" height="'+imageheight+'" vspace="6" border="0">');
	tmp.write('<p align="center" style="margin-top:0px;margin-bottom:0px;"><font face="Arial, Helvetica, sans-serif">'+caption+'<br><br><font size="-1"><a href="javascript:self.close()">Close the window</a></font></font></p>');
	tmp.write('</body></html>');
	tmp.close();
	newwindow.focus();
	return false;
}




//-->
