	function subscribe(form){
//If Unsubscribe Button is checked
		if((document.frmSubscribe.rdoUnsubscribe.checked == 1) || (document.frmSubscribe.rdoUnsubscribe.checked == "True"))
	//Send Unsubscribe Email
			{location = "mailto:unsubscribe@bisok.com?subject=Unsubscribe%20from%20the%20BIS%20Bulletin%20-%20"+document.frmSubscribe.txtEmail.value;}

//Else, if Subscribe Button is checked, or if neither radio button is checked
		else
			{

	//Check if value is entered in Email field
		//If nothing entered, abort.
				if((document.frmSubscribe.txtEmail.value.length < 1) || (document.frmSubscribe.txtEmail.value==""))
					{
						alert("Please enter your email address, and click submit again.");
						return(false);
					}
		//If length is greater than 0, continue
				else
					{
				//If there are other issues with the email address formatting, show error and abort.


						//NEED TO INSERT ALL CHECKS FROM echeck FUNCTION, and SCRIPT WILL BE COMPLETE

						if(document.frmSubscribe.txtEmail.value.length == 3)
							{
								document.frmSubscribe.txtEmail.value=""
								document.frmSubscribe.txtEmail.focus()
								return(false);
							}


				//Else, if the email address is formatted correctly, send email.
						else
							{location = "mailto:subscribe@bisok.com?subject=Subscribe%20to%20the%20BIS%20Bulletin%20-%20"+document.frmSubscribe.txtEmail.value;}
					}
			}

		return(true);
	}


/*

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}



*/
