	function showSub(elem){
			var par = document.getElementById(elem);
			var sub = par.getElementsByTagName('ul');
			
			var origClass = par.className;
			par.onmouseout = function(){par.className = origClass; sub[0].style.display = 'none';}
			
			par.className = 'act';
			sub[0].style.display = 'block';
		}
		
		function formEvents(){
			var allforms = document.getElementsByTagName('form');
			for(i=0;i<allforms.length;i++){
				var thisform = allforms[i].getElementsByTagName('input');
				for(j=0;j<thisform.length;j++){
					if(thisform[j].title && thisform[j].title != '' && thisform[j].type != 'image'){
						thisform[j].value = thisform[j].title;
						thisform[j].onfocus = function(){if(this.title == this.value){this.value = '';}}
						thisform[j].onblur = function(){if(this.value == ''){this.value = this.title;}}
					}
				}
			}
		}
		
		function navOver(){
			var nav = document.getElementById('nav');
			var navs = nav.getElementsByTagName('li');
			for(i=0;i<navs.length;i++){
				if(navs[i].className != 'act' && navs[i].className != 'sublink'){

				navs[i].onmouseover = function(){this.className = 'act';}
				navs[i].onmouseout = function(){this.className = '';}
				}
			}
		}
		
		
		function sortNews(col){
			window.location = '?all&sort='+col;
		}
				
		
		//**************************************************************************
		//
		//FORM VALIDATION HELPERS
		//
		//**************************************************************************
		
			
			function defValue(elem){
				if(elem.title == elem.value){return true;}
				return false;
			}
			
			// returns true if the string is a US phone number formatted as...
			// (000)000-0000, (000) 000-0000, 000-000-0000, 000.000.0000, 000 000 0000, 0000000000
			function isPhoneNumber(str){
				var re = /^\(?[2-9]\d{2}[\)\.-]?\s?\d{3}[\s\.-]?\d{4}$/
				return re.test(str);
			}
			
			function isCCNumber(str){
				//var re = /\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{3,4}$/
				//return re.test(str);
				return true;
			}
			
			// returns true if the string only contains characters A-Z, a-z or 0-9 or . or #
			function isAddress(str){
				var re = /[^a-zA-Z0-9\#\.]/g
				if (re.test(str)) return true;
				return false;
			}
			
			// returns true if the string is 5 digits
			function isZip(str){
				var re = /\d{5,}/;
				if(re.test(str)) return true;
				return false;
			}
			
			// returns true if the string only contains characters A-Z or a-z
			function isAlpha(str){
				var re = /[^a-zA-Z]/g
				if (re.test(str)) return true;
				return false;
			}
			
			// returns true if the string only contains characters A-Z or a-z or 0-9
			function isAlphaNumeric(str){
				var re = /[^a-zA-Z0-9]/g
				if (re.test(str)) return false;
				return true;
			}
		
			function isEmpty(str){
				if(str.length == 0 || str == null){
					return true;
				}else{
					return false;
				}
			}
			
			function isEmail(str){
			if(str == '') return false;
			var re = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i
			return re.test(str);
			}
			
		function stripWhitespace(str, replacement){
			if (replacement == null) replacement = '';
			var result = str;
			var re = /\s/g
			if(str.search(re) != -1){
				result = str.replace(re, replacement);
			}
			return result;
		}
		
	//**************************************************************************
	
	/****NOTES**********************************************************************
 
 This script will scroll the thumbnails pane vertically.
 
*******************************************************************************/

// These 2 vars control the speed and easing of the scrolling.
steps = 25; 
speed = 20;

//flag to tell when menu is moving
inMotion = false;

		function slide(side){
			
			//****TEST FOR MENU THAT IS STILL MOVING****************************/
			if(inMotion){return false;}
			
			//****get the amount of the div that is not visible*****************/
			
			vHei = sansPX(document.getElementById('mask').style.height);
			
			eHei = document.getElementById('thumbs').offsetHeight;
			
			//this matches the vertical margins of the thumbnails (top margin + bottom margin)
			bOffset = 3;
			
			hDiff = eHei - vHei;
			
			if(hDiff > vHei){hDiff = vHei -(-bOffset);}else{hDiff = hDiff -(-bOffset);}
			
			
			//******************************************************************/


			//****test for direction********************************************/
			
			
			if(side == 'up'){
				//if the current size is greater than our object, no need to go any further
				if(currentTop() < 0){
					//get the scroll on
					b = Math.abs(currentTop());
					t = 0;
					d = steps;
					c = hDiff;
					
					inMotion = true;
					
					scrolling = setInterval(scrollUp, speed);
				}else{
					return false;
				}
			
			}else if(side == 'down'){
				
				if(currentTop() > -(eHei - vHei) + 1){

					//get the scroll on
					b = Math.abs(currentTop());
					t = 0;
					d = steps;
					c = -hDiff;
					
					inMotion = true;
					
					scrolling = setInterval(scrollDown, speed);
				}else{
					return false;
				}
			
			}else{
				return false;
			}
			
			//******************************************************************/
			
		}
		
		function scrollUp(){
			if(t < d){
				t++;
				withEase = easeInOut(t, b, c, d);
				//scrollTo(withEase,0);
				document.getElementById('thumbs').style.top = withEase +'px';
			}else{
				clearInterval(scrolling);
				//reset position
				inMotion = false;

			}
		}
		
		function scrollDown(){
			if(t < d){
				t++;
				withEase = easeInOut(t, b, c, d);
				//scrollTo(withEase,0);
				document.getElementById('thumbs').style.top = withEase +'px';
			}else{
				clearInterval(scrolling);
				//reset position
				inMotion = false;
			}
		}
		
		/****EASING FUNCTION***************************************************/
		
		///////////// SINUSOIDAL EASING: sin(t) ///////////////
		// sinusoidal easing in - accelerating from zero velocity
		// t: current time, b: beginning value, c: change in position, d: duration
		// sinusoidal easing in/out - accelerating until halfway, then decelerating
		function easeInOut (t, b, c, d){
			return Math.ceil(-c/2 * (Math.cos(Math.PI*t/d) - 1) - (b));
		}
		
		/****GET THE CURRENT POSITION******************************************/
		
		function currentTop(){
			var tempTop = document.getElementById('thumbs').style.top;
			if(tempTop == ''){return 0;}
			else{
			var asInt = tempTop.substring(0, tempTop.length-2);
			return asInt;
			}
			
		}
		
		/****GET THE MEASURE SANS PX*******************************************/
		
		function sansPX(str){
			var tempMeasure = str;
			if(tempMeasure == ''){return 0;}
			else {
				if(tempMeasure.substring(tempMeasure.length-2, tempMeasure.length) == 'px'){
					var asInt = tempMeasure.substring(0, tempMeasure.length-2);
					return asInt;
				}else{
					return tempMeasure;
				}
			}
			
		}
		
		
		/****HIDE ELEMENTS****************************************************/
		
		function initThumbs(cnt){
			var hideIDs = new Array('prevwork', 'nextwork', 'useScroller');
			if(cnt <= imagecount){hideElems(hideIDs);}
		}
		
		function hideElems(elems){
			for(var i=0; i < elems.length; i++){
				document.getElementById(elems[i]).style.display = 'none';
			}
		}
		
/*******************************************************************************/
//  END OF SCROLLING SCRIPT
/*******************************************************************************/


//function to print total donation amount
function updateTotal(){

//collect the amounts from all fields

var total = 0;
var ttl = 0;
if(document.donate_online.sponsor1.checked){ total += 100000; }
if(document.donate_online.sponsor2.checked){ total += 75000; }
if(document.donate_online.sponsor3.checked){ total += 50000; }
if(document.donate_online.sponsor4.checked){ total += 25000; }
if(document.donate_online.sponsor5.checked){ total += 25000; }
if(document.donate_online.sponsor6.checked){ total += 15000; }
if(document.donate_online.sponsor7.checked){ total += 12500; }
if(document.donate_online.sponsor8.checked){ total += 10000; }
if(document.donate_online.sponsor9.checked){ total += 7500; }
if(document.donate_online.sponsor10.checked){ total += 7500; }
if(document.donate_online.sponsor11.checked){ total += 6000; }
if(document.donate_online.sponsor12.checked){ total += 5000; }
if(document.donate_online.sponsor13.checked){ total += 2500; }
if(document.donate_online.sponsor14.checked){ total += 2500; }
if(document.donate_online.sponsor15.checked){ total += 2000; }
if(document.donate_online.sponsor18.checked){ total += 1000; }
if(document.donate_online.sponsor16.checked){ total += 2500; }


total += (document.donate_online.b_tab.value * 3500);
total += (document.donate_online.p_tab.value * 2500);
total += (document.donate_online.p_tic.value * 250);

total += (document.donate_online.sc_four.value * 7000);
total += (document.donate_online.sc_ind.value * 1750);
total += (document.donate_online.nc_four.value * 3500);
total += (document.donate_online.nc_ind.value * 875);

for(i=0;i<document.donate_online.champ_donation.length;i++){
if(document.donate_online.champ_donation[i].checked){
if(document.donate_online.champ_donation[i].value == 'other'){
total += parseInt(document.donate_online.champ_donation_other.value);
}else if(parseInt(document.donate_online.champ_donation[i].value) > 0){
	total += parseInt(document.donate_online.champ_donation[i].value);
}
}
}

for(i=0;i<document.donate_online.donation.length;i++){
if(document.donate_online.donation[i].checked){
if(document.donate_online.donation[i].value == 'other'){
total += parseInt(document.donate_online.donation_other.value);
}else if(parseInt(document.donate_online.donation[i].value) > 0){
total += parseInt(document.donate_online.donation[i].value);
}
}
}

//update the total form field
document.getElementById('total').value = total;
}
	
//******************************************************************************
// ONLOAD EVENTS
//******************************************************************************

		window.onload = function(){formEvents();navOver();}
		
//******************************************************************************