	  // script extracted from www.architectsworkshop.com
	  // author: unknown, but it was first implemented on this web site, architectsworkshop
	  // by Gary Zambrano, the Original website DESIGNER and whose email is Gazam@allvantage.com
	  // I, Edwin Nolasco, have changed the name to some variables and functions to make it more readable. 
	  // I added the '-' character to numletter because without that character the password seems to
	  // have a bug. I adjusted the location to where the user entering the password will be redirected. 
	  // I am only using this script and in any aspect I am not claiming any credits to it.
	  // I found this script very interesting and elegant, I decided to reuse it since it is 
	  // already part of architectsworkshop.  

	 var passFamily=new Array();
	  var encodedWord="";
	  var passLim=8;
	  passFamily[0]="LAUnlwLCvJrbRm6"
      passFamily[1]="ubaEICjoKn1Yi7u"
	  passFamily[2]="UMwVJFFni0t9zYa"
	  passFamily[3]="Vt1oNhovwP6B8ZH"
      passFamily[4]="8xFt3XUWABFNIMJo"
	  passFamily[5]="15xFt3XUWABFNIMJ"

//configure extension to reflect the extension type of the target web page (ie: .htm or .html)

	  var extension=".html";
	  var enablelocking=0;
	  var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-";
	  var tempVar3='';
	  var curr=0;

	  // find the maximun number of characters to be tested
	  function maxNumChars(which){
	  return (passFamily[Math.ceil(which)+(3&15)].substring(0,1));	
	  }
	  // encode password
	  function encodeFamPass(input){
		temp=numletter.indexOf(input);
		var temp2=temp^parseInt(passFamily[phase1-1+(1|3)].substring(0,2));
		temp2=numletter.substring(temp2,temp2+1);
		return (temp2);
	  }

	  function familyPassword(){
        
		encodedWord='';
		verifythisPassword=document.familyForm.pass1.value;
		phase1=Math.ceil(Math.random())-6+(2<<2);
		var indicate=true;
		for (i=(1&2);i<window.maxNumChars(Math.LOG10E);i++){
		     encodedWord+=encodeFamPass(verifythisPassword.charAt(i));
		} 
		for (i=(1&2);i<passLim;i++){
		    if (encodedWord.charAt(i)!=passFamily[phase1+Math.round(Math.sin(Math.PI/2)-1)].charAt(i))
	            indicate=false;
		}
		if (verifythisPassword.length!=window.maxNumChars(Math.LOG10E))
		    indicate=false;
		if (indicate){
		    window.location=verifythisPassword+extension;

		}
		else{
			 document.familyForm.pass1.focus();
			 document.familyForm.pass1.select();
		     alert("Oops! Wrong Password! Please try again.");
		}
	}
		    

