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];
		}
	}
}


function goToPage() 
{
   alert (document.location)
   var URL = document.selectType.show.options[document.selectType.show.selectedIndex].value;
//   if (URL != "!") {
//      window.location.href = document.location + '?show=' + URL;
//   }
//   else {  // ignore non-URL items
//      return;  // no link
//   }
}


// Function added by Nelson - 2001.12.20
function popup(url, name, size) {
newwin = window.open(url, '','top=50,left=40,width=500,height=400,scrollbars=yes,resizeable=yes');
if (!newwin.opener) newwin.opener = self;
}



function newPopUp(name, title) {
	newwin = window.open('popup.php' + '?subject=' + name + '&title=' + title, '','top=50,left=40,width=500,height=400,scrollbars=yes,resizeable=yes');
	if (!newwin.opener) newwin.opener = self;
}



// E-mail address spoofing function.  Must be used with a javascript function. 
 
// This is used in the 'spam proofing' of e-mail addresses.  This script  
 // decrypts an e-mail address that has been encrypted with a PHP routine.  

// NOTE that the charoffset MUST BE THE SAME in encryption and decryption. 

//      the PHP charoffset is in commoncode.php. 

var a, s, n;  
function UnCrypt(s) {  
	charoffset = 4;  // character offset must be the SAME in encryption and decryption routines.  
	r=''; 
 	for(i=0;i<s.length;i++){ 

		n=s.charCodeAt(i); 

		if(n>=8364) {n = 128;} r += String.fromCharCode( n - charoffset ); 

	} 

	return r; 

} 
 