function PCase(STRING){
	var strReturn_Value = "";
	var iTemp = STRING.length;
	if(iTemp==0){
	return"";
	}
	var UcaseNext = false;
	strReturn_Value += STRING.charAt(0).toUpperCase();
	for(var iCounter=1;iCounter < iTemp;iCounter++){
			if(UcaseNext == true){
				strReturn_Value += STRING.charAt(iCounter).toUpperCase();
			}
			else{
				strReturn_Value += STRING.charAt(iCounter).toLowerCase();
			}
		var iChar = STRING.charCodeAt(iCounter);
		if(iChar == 32 || iChar == 45 || iChar == 46){
			UcaseNext = true;
		}
		else{
			UcaseNext = false
		}
		if(iChar == 99 || iChar == 67){
			if(STRING.charCodeAt(iCounter-1)==77 || STRING.charCodeAt(iCounter-1)==109){
				UcaseNext = true;
			}
		}

	} //End For

return strReturn_Value;
} //End Function
function clearInput(){
   objForm=document.forms[0];
   for(x=0; x<objForm.elements.length;x++){
      if(objForm.elements[x].type != "reset" && objForm.elements[x].type !="submit"  && objForm.elements[x].type !="button"){
         objForm.elements[x].value="";
      }
   }
}

function checkPw(memberapp) {
	pw1 = document.memberapp.pass1.value;
	pw2 = document.memberapp.pass2.value;
	
	if (pw1 != pw2) {
	alert ("\nYou did not enter the same new password twice. Please re-enter your password.")
	return false;
	}
	else if (pw1.length < 6){
			alert("\n Your password is too short. \n It must be at least 6 characters long.");
			return false;
		 }
		 else return true;
}

function hidesp(x){
	if (x==1){
		document.forms[0].spfirst_name.disabled = true;
		document.forms[0].splast_name.disabled = true;
		document.forms[0].spbirthday.disabled = true;
		document.forms[0].spfirst_name.className = 'inputdisabled';
		document.forms[0].splast_name.className = 'inputdisabled';
		document.forms[0].spbirthday.className = 'inputdisabled';
		document.forms[0].spfirst_name.value = '';
		document.forms[0].splast_name.value = '';
		document.forms[0].spbirthday.value = '';
	}
	if (x==2){
		document.forms[0].spfirst_name.disabled = false;
		document.forms[0].splast_name.disabled = false;
		document.forms[0].spbirthday.disabled = false;
		document.forms[0].spfirst_name.className = 'inputsection';
		document.forms[0].splast_name.className = 'inputsection';
		document.forms[0].spbirthday.className = 'inputsection';
	}
}

function extracheck(obj){
	return !obj.disabled;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

