	/*Begin custom login AJAX functionality.*/
		function registerNewUser() {
		document.getElementById('registerUserNameIncorrect').style.display='none';
		document.getElementById('userRegisterNameField').style.backgroundColor = "";
		document.getElementById('registerUserPasswordIncorrect').style.display='none';
		document.getElementById('userRegisterPasswordField').style.backgroundColor = "";
		document.getElementById('registerUserEmailIncorrect').style.display='none';
		document.getElementById('userRegisterEmailField').style.backgroundColor = "";
		document.getElementById('registerUserCellPhoneIncorrect').style.display='none';
		document.getElementById('userRegisterCellPhoneField').style.backgroundColor = "";
		document.getElementById('registerUserCellCarrierIncorrect').style.display='none';
		document.getElementById('userRegisterCellCarrierField').style.backgroundColor = "";
		document.getElementById('userRegisterNameDuplicateText').style.display="none";
	
		var randomnumber=Math.floor(Math.random()*10000);
		var userName = document.getElementById('userRegisterNameField').value;
		var userPassword = document.getElementById('userRegisterPasswordField').value;
		var userEmail = document.getElementById('userRegisterEmailField').value;
		var userCellNumber = document.getElementById('userRegisterCellPhoneField').value;
		var userCellCarrier = document.getElementById('userRegisterCellCarrierField').value;
		for (i = 0; i < document.userRegisterForm.elements['userRegisterEmailNotificationField'].length; i++) {
			  if (document.userRegisterForm.elements['userRegisterEmailNotificationField'][i].checked) {
			  	var userEmailUpdates = document.userRegisterForm.elements['userRegisterEmailNotificationField'][i].value;
			}
		}
		for (i = 0; i < document.userRegisterForm.elements['userRegisterSMSNotificationField'].length; i++) {
			  if (document.userRegisterForm.elements['userRegisterSMSNotificationField'][i].checked) {
			  	var userSMSUpdates = document.userRegisterForm.elements['userRegisterSMSNotificationField'][i].value;
			}
		}
		
		if(document.getElementById('userSectionSpecialActions')) {
			var userSectionSpecialActions = document.getElementById('userSectionSpecialActions').value;
		}
		else
		{
			var userSectionSpecialActions = "";
		}
		
		if(document.getElementById('appIDInField')) {
			var appIDInField = document.getElementById('appIDInField').value;
		}
		else
		{
			var appIDInField = "";
		}
		
		//Spry.Debug.trace("/register_user_Action2.cfm?userName=" + encodeURIComponent(userName) + "&userPassword=" + encodeURIComponent(userPassword) + "&userEmail=" + encodeURIComponent(userEmail) + "&userCellNumber=" + encodeURIComponent(userCellNumber) + "&userCellCarrier=" + encodeURIComponent(userCellCarrier) + "&userEmailUpdates=" + encodeURIComponent(userEmailUpdates) + "&userSMSUpdates=" + encodeURIComponent(userSMSUpdates) + "&userSectionSpecialActions=" +"&app_ID=" + appIDInField + encodeURIComponent(userSectionSpecialActions) + "&cacheBuster=" + encodeURIComponent(randomnumber));
		Spry.Utils.loadURL("GET","/common_includes/login_AJAX_pages/register_user_Action.cfm?userName=" + encodeURIComponent(userName) + "&userPassword=" + encodeURIComponent(userPassword) + "&userEmail=" + encodeURIComponent(userEmail) + "&userCellNumber=" + encodeURIComponent(userCellNumber) + "&userCellCarrier=" + encodeURIComponent(userCellCarrier) + "&userEmailUpdates=" + encodeURIComponent(userEmailUpdates) + "&userSMSUpdates=" + encodeURIComponent(userSMSUpdates) + "&userSectionSpecialActions=" +"&app_ID=" + appIDInField + encodeURIComponent(userSectionSpecialActions) + "&cacheBuster=" + encodeURIComponent(randomnumber), false, ajaxPageRequestResult);
	}
	
	function loginTheUser() {
		var randomnumber=Math.floor(Math.random()*10000);
		document.getElementById('loginUserHandleIncorrect').style.display='none';
		document.getElementById('userLoginNameField').style.backgroundColor = "";
		document.getElementById('loginUserPasswordIncorrect').style.display='none';
		document.getElementById('userLoginPasswordField').style.backgroundColor = "";
	
	
		var userName = document.getElementById('userLoginNameField').value;
		var userPassword = document.getElementById('userLoginPasswordField').value;
		if(document.getElementById('userSectionSpecialActions')) {
			var userSectionSpecialActions = document.getElementById('userSectionSpecialActions').value;
		}
		else
		{
			var userSectionSpecialActions = "";
		}
		
		if(document.getElementById('appIDInField')) {
			var appIDInField = document.getElementById('appIDInField').value;
		}
		else
		{
			var appIDInField = "";
		}
//Spry.Debug.trace("/login_user_Action4.cfm?userName=" + encodeURIComponent(userName) + "&userPassword=" + encodeURIComponent(userPassword) + "&userSectionSpecialActions=" + encodeURIComponent(userSectionSpecialActions) + "&cacheBuster=" + encodeURIComponent(randomnumber));
		Spry.Utils.loadURL("GET","/common_includes/login_AJAX_pages/login_user_Action.cfm?userName=" + encodeURIComponent(userName) + "&userPassword=" + encodeURIComponent(userPassword) + "&userSectionSpecialActions=" + encodeURIComponent(userSectionSpecialActions) + "&app_ID=" + appIDInField + "&cacheBuster=" + encodeURIComponent(randomnumber), false, ajaxPageRequestResult);
	}
	
	function logoutTheUser() {
		Spry.Utils.loadURL("GET","/common_includes/login_AJAX_pages/logout.cfm", false, ajaxPageRequestResult);
	}
	
	function ajaxPageRequestResult(request) {
		var result = request.xhRequest.responseText;
		eval(trim(result));
	}
	/* End of AJAX login stuff.*/


//Preload the images into memory.
function preloader() 
{
     var i = 0;
     imageObj = new Image();
     images = new Array();     
	 images[0]="/site_images/nav/Games_over.jpg";    
	 images[1]="/site_images/nav/Books_over.jpg";    
	 images[2]="/site_images/nav/Other_over.jpg";    
	 images[3]="/site_images/nav/About_over.jpg";
	 images[4]="/site_images/nav/Forums_over.jpg";
     
	 for(i=0; i<=4; i++) 
	 {   
	 	imageObj.src=images[i];     
	 }

} 


	/************************************************************************************************************
	(C) www.dhtmlgoodies.com, September 2005
	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	See http://www.dhtmlgoodies.com/index.html?page=termsOfUse
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland
	
	************************************************************************************************************/		
	
		var slideDownInitHeight = new Array();
	var slidedown_direction = new Array();
	var browserName=navigator.appName; 


	var slidedownActive = false;
	var contentHeight = false;
	if(browserName=="Microsoft Internet Explorer")
	{
		var slidedownSpeed = 15; 	// Higher value = faster script
	}
	else
	{
		var slidedownSpeed = 21; 	// Higher value = faster script
	}
	
	var slidedownTimer = 7;	// Lower value = faster script
	function slidedown_showHide(boxId)
	{
		if(!slidedown_direction[boxId])slidedown_direction[boxId] = 1;
		if(!slideDownInitHeight[boxId])slideDownInitHeight[boxId] = 0;
		
		if(boxId == 'box1')
		{
			document.getElementById('box1').style.zIndex = 2;
			document.getElementById('box2').style.zIndex = 0;
		}
		else if(boxId == 'box2')
		{
			document.getElementById('box1').style.zIndex = 0;
			document.getElementById('box2').style.zIndex = 2;
		}
		
		if(slideDownInitHeight[boxId]==0)slidedown_direction[boxId]=slidedownSpeed; else slidedown_direction[boxId] = slidedownSpeed*-1;
		
		slidedownContentBox = document.getElementById(boxId);
		var subDivs = slidedownContentBox.getElementsByTagName('DIV');
		for(var no=0;no<subDivs.length;no++){
			if(subDivs[no].className=='dhtmlgoodies_content')slidedownContent = subDivs[no];	
		}

		contentHeight = slidedownContent.offsetHeight;
	
		slidedownContentBox.style.visibility='visible';
		slidedownActive = true;
		slidedown_showHide_start(slidedownContentBox,slidedownContent);
	}
	
	//NOTE:NOT WORKING
	function slidedown_HideItOnly(boxId)
	{
		if(!slidedown_direction[boxId])slidedown_direction[boxId] = 1;
		if(!slideDownInitHeight[boxId])slideDownInitHeight[boxId] = 0;
		
		if(slideDownInitHeight[boxId]!=0)
		{ 
		
			slidedown_direction[boxId] = slidedownSpeed*-1; 
			slidedownContentBox = document.getElementById(boxId);
			var subDivs = slidedownContentBox.getElementsByTagName('DIV');
			for(var no=0;no<subDivs.length;no++){
				if(subDivs[no].className=='dhtmlgoodies_content')slidedownContent = subDivs[no];	
			}
	
			contentHeight = slidedownContent.offsetHeight;
		
			slidedownContentBox.style.visibility='visible';
			slidedownActive = true;
			slidedown_showHide_start(slidedownContentBox,slidedownContent);
		}
	}
	
	function slidedown_showHide_start(slidedownContentBox,slidedownContent)
	{

		if(!slidedownActive)return;
		slideDownInitHeight[slidedownContentBox.id] = slideDownInitHeight[slidedownContentBox.id]/1 + slidedown_direction[slidedownContentBox.id];
		if(slideDownInitHeight[slidedownContentBox.id] <= 0){
			slidedownActive = false;	
			slidedownContentBox.style.visibility='hidden';
			slideDownInitHeight[slidedownContentBox.id] = 0;
		}
		if(slideDownInitHeight[slidedownContentBox.id]>contentHeight){
			slidedownActive = false;	
		}
		slidedownContentBox.style.height = slideDownInitHeight[slidedownContentBox.id] + 'px';
		slidedownContent.style.top = slideDownInitHeight[slidedownContentBox.id] - contentHeight + 'px';

		setTimeout('slidedown_showHide_start(document.getElementById("' + slidedownContentBox.id + '"),document.getElementById("' + slidedownContent.id + '"))',slidedownTimer);	// Choose a lower value than 10 to make the script move faster
	}
	
	function setSlideDownSpeed(newSpeed)
	{
		slidedownSpeed = newSpeed;
		
	}
	/*End slide down javascript*/
	/**************************/

	
	function trim(stringToTrim) {
		return stringToTrim.replace(/^\s+|\s+$/g,"");
	}
	
	function NewWindow(mypage, myname, w, h, scroll, enableLinkable) 
		{
			var winl = (screen.width - w) / 2;
			var wint = (screen.height - h) / 2;
			if(enableLinkable == 0)
			{
				winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=0';
			}
			else
			{
				winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=1,toolbar=1,menubar=1,location=1,statusbar=1';
			}
			win = window.open(mypage, myname, winprops)
			if (parseInt(navigator.appVersion) >= 4) 
			{
				win.window.focus(); 
			}
		}