// Opens enlarged picture
function winOpen(file, w, h) 
	{
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,resizable=yes'
		win = window.open(file,'', winprops)
		
		if (parseInt(navigator.appVersion) >= 4) { 
			win.window.focus(); 
		}
	}

// Opens Currency converter window, centered on screen
function NewWindow(page, w, h, scroll) 
	{
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
		win = window.open(page,'', winprops)
	
	}

// Copyright year for footer
function copyyr()
	{
		RightNow = new Date();
		var TheYear = RightNow.getYear();

		if (TheYear >= 100 && TheYear <= 1999)
		{
			TheYear=TheYear + 1900;
		}
		else {
			TheYear=TheYear;
		}
		document.write(TheYear);
		
		//var curdate = new Date();
		//var year = curdate.getFullYear();
		//document.write(year);
	}

// Validates form fields
function checkFields() 
	{                    
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(contactform.email.value)) 
		{
			if (document.contactform.name.value=="")  
			{
				alert("Please fill in your name.");
				document.contactform.name.focus();
				return false;
			}
			else if (document.contactform.email.value=="")
			{
				alert("Please fill in your Email.");
				document.contactform.email.focus();
				return false;
			}
			else {
				if (submitcount == 0)
				{
					submitcount++;
					return true;
				}
				else {
					alert("This form has already been submitted.");
					return false;
				}
			}
			return true;
		}
		else {
			
			alert("Invalid E-mail Address! Please re-enter.");
			document.contactform.email.focus();
			return false;
		}
	}

// Validates mailing list fields
function checkEmail() 
	{                    
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mailingForm.email.value)) 
		{
			return true;
		}
		else {
			
			alert("Invalid E-mail Address! Please re-enter.");
			document.mailingForm.email.focus();
			return false;
		}
	}
