function mouseOver()
	{
		document.getElementById("b1").src="../images/access_gin_button_alt.gif";
		document.getElementById("button").src="../images/access_gin_button_alt.gif";
	}
	function mouseOut()
	{
		document.getElementById("b1").src="../images/access_gin_button.gif";
		document.getElementById("button").src="../images/access_gin_button.gif";
	}
	
	function login_mouseOver_home()
	{
		document.getElementById("login_button").src="images/login_button_small.gif";
	}
	
	function login_mouseOut_home()
	{
		document.getElementById("login_button").src="images/login_button_small_alt.gif";
	}
	
	function login_mouseOver()
	{
		document.getElementById("login_button").src="../images/login_button_small.gif";
	}
	
	function login_mouseOut()
	{
		document.getElementById("login_button").src="../images/login_button_small_alt.gif";
	}
	
	function click()
	{
		document.getElementById("b1").src="../images/access_gin_button_alt_offset.gif";
		document.getElementById("button").src="../images/access_gin_button_alt_offset.gif";
	}
	function release()
	{
		document.getElementById("b1").src="../images/access_gin_button_alt.gif";
		document.getElementById("button").src="../images/access_gin_button_alt.gif";
	}
	function formShowHide(id)
	{
			if(id == "referred")
			{
			document.getElementById("input_text").style.visibility = "visible";
			document.getElementById("gin_button").style.visibility = "hidden";
			}
			else if(id == "notReferred")
			{
			document.getElementById("input_text").style.visibility = "hidden";
			document.getElementById("gin_button").style.visibility = "visible";
			}
	}
	function enableSubmit()
	{
		if (document.inputs.aCode.value=='')
		                               		
		{
			document.inputs.submit_button.disabled=true;
		}
		else
		{
			document.inputs.submit_button.disabled=false;
		}
	}
	function enableSubmit2()
	{
		if (document.inputs.mail1.value=='')
		                               		
		{
			document.inputs.submit_button.disabled=true;
		}
		else
		{
			document.inputs.submit_button.disabled=false;
		}
	}

	function disableEmailFields()
	{
		if (document.inputs.aCode.value!='')                              		
		{
			document.inputs.mail1.disabled=true;
		}
		else if (document.inputs.aCode.value=='')
		{
			document.inputs.mail1.disabled=false;
		}
	}

	function disableReferralField()
	{
		if (document.inputs.mail1.value!='')
		{
			document.inputs.aCode.disabled=true;
		}
		else if (document.inputs.mail1.value=='')
		{
			document.inputs.aCode.disabled=false;
		}	
	}

	function enableConfirmEmail()
	{
		if (document.inputs.mail1.value!='')
		{
			document.inputs.mail2.disabled=false;
		}	
		else if (document.inputs.mail1.value=='')
		{
			document.inputs.mail2.disabled=true;
		}	
	}

	function showRadio()
	{
		var re = new RegExp('affiliateCode' + "=([^;]+)");
	    var value = re.exec(document.cookie);
	    if (value != null) 
		    {
	    	window.location='http://www.globalinformationnetwork.com/?affiliatecode='+unescape(value[1]);	
		    }

	    else
	    	{		        
		    document.getElementById("radio1").style.visibility="visible";
			document.getElementById("b1").style.visibility="hidden";
	    	}    
			
	}


	function checkForm()
	{
		var emailOne = document.inputs.mail1;
		var emailTwo = document.inputs.mail2;

		if (document.inputs.aCode.value.length < '4')
		{
			if (document.inputs.aCode.disabled == false)

			{
				alert("Referral codes must be at least 4 characters in length.  Please re-enter the referral code.");
				document.inputs.aCode.focus();
				return false;
			}
		}

		if (emailOne.value.length>'0')
		{
			if (emailTwo.value == '')
			{
				alert("Please re-enter the e-mail address in the \"Confirm E-mail\" field.");
				document.inputs.mail2.focus();
				return false;
			}
		}

		if (emailOne.value != emailTwo.value)
		{
			if (emailOne.value.length > '0')
			{
				alert("The e-mail addresses do not match.  Please re-enter.");
				document.inputs.mail1.focus();
				return false;				
			}	
		}

		else return true;
	}	

	function validateEmail()
	{
		var emailAddress=(document.inputs.mail1.value);
		var emailAddress=emailAddress.toLowerCase();
		if (emailAddress.search(/^[a-zA-Z]+([_\.-]?[a-zA-Z0-9]+)*@[a-zA-Z0-9]+([\.-]?[a-zA-Z0-9]+)*(\.[a-zA-Z]{2,4})+$/)==-1)
		{
			if (emailAddress!='')
			{
				alert ("A valid e-mail address is required.  Please check you have entered your details correctly.");
				setTimeout("document.inputs.mail1.focus();",0);
			}
		}	
		else return true;
	}	
	
	function lost_password()
	{
		document.getElementById("lost_password_form").style.display = "block";
	}
	
	function associate_welcome_mouseout()
	{
		document.getElementById("welcome_white").src="../images/welcome_white.gif";
	}
	
	
	function associate_welcome_mouseon()
	{
		document.getElementById("welcome_white").src="../images/welcome_yellow.gif";
	}
	

	function associate_my_account_mouseout()
	{
		document.getElementById("my_account_white").src="../images/my_account_white.gif";
	}

	
	function associate_my_account_mouseon()
	{
		document.getElementById("my_account_white").src="../images/my_account_yellow.gif";
	}
	
	function associate_my_account_mouseout()
	{
		document.getElementById("my_account_white").src="../images/my_account_white.gif";
	}
	
	function associate_getting_started_mouseon()
	{
		document.getElementById("getting_started_white").src="../images/getting_started_yellow.gif";
	}
	
	function associate_getting_started_mouseout()
	{
		document.getElementById("getting_started_white").src="../images/getting_started_white.gif";
	}
	
	function associate_banners_mouseon()
	{
		document.getElementById("banners_white").src="../images/banners_yellow.gif";
	}
	
	function associate_banners_mouseout()
	{
		document.getElementById("banners_white").src="../images/banners_white.gif";
	}
	
	function associate_scripts_mouseon()
	{
		document.getElementById("scripts_white").src="../images/scripts_yellow.gif";
	}
	
	function associate_scripts_mouseout()
	{
		document.getElementById("scripts_white").src="../images/scripts_white.gif";
	}
	
	function associate_audios_mouseon()
	{
		document.getElementById("audios_white").src="../images/audios_yellow.gif";
	}
	
	function associate_audios_mouseout()
	{
		document.getElementById("audios_white").src="../images/audios_white.gif";
	}
	
	function associate_videos_mouseon()
	{
		document.getElementById("videos_white").src="../images/videos_yellow.gif";
	}
	
	function associate_videos_mouseout()
	{
		document.getElementById("videos_white").src="../images/videos_white.gif";
	}
	
	function associate_for_advisors_mouseon()
	{
		document.getElementById("for_advisors_white").src="../images/for_advisors_yellow.gif";
	}
	
	function associate_for_advisors_mouseout()
	{
		document.getElementById("for_advisors_white").src="../images/for_advisors_white.gif";
	}
