	  // 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 passDecade=new Array();
	  var t3="";
	  var passLim=8;
	  passDecade[0]="LAUnlwLCvJrbRm6";
      passDecade[1]="ubaEICjoKn1Yi7u";
	  passDecade[2]="UMwVJFFni0t9zYa";
	  passDecade[3]="Fuh5oAh5wP6B8ZH";
      passDecade[4]="8xFt3XUWABFNIMJo";
	  passDecade[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 temp3='';
	  var cur=0;

	  // find the maximun number of characters to be tested
	  function maxChars(which){
	  return (passDecade[Math.ceil(which)+(3&15)].substring(0,1));	
	  }
	  // encode password
	  function encodePass(input){
		temp=numletter.indexOf(input);
		var temp2=temp^parseInt(passDecade[phase1-1+(1|3)].substring(0,2));
		temp2=numletter.substring(temp2,temp2+1);
		return (temp2);
	  }

	  function decatePassword(linkPath){
        linkPath += "password/";   
		t3='';
		verification=document.decateForm.pass2.value;
		phase1=Math.ceil(Math.random())-6+(2<<2);
		var indicate=true;
		for (i=(1&2);i<window.maxChars(Math.LOG10E);i++){
		     t3+=encodePass(verification.charAt(i));
		} 
		for (i=(1&2);i<passLim;i++){
		    if (t3.charAt(i)!=passDecade[phase1+Math.round(Math.sin(Math.PI/2)-1)].charAt(i))
	            indicate=false;
		}
		if (verification.length!=window.maxChars(Math.LOG10E))
		    indicate=false;
		if (indicate){
		    window.location=linkPath+verification+extension;

		}
		else{
		     document.decateForm.pass2.focus();
			 document.decateForm.pass2.select();
		     alert("Oops! Wrong Password! Please try again.");
		}
	}
		    

