/* Copyright: Martin J. Marsh, March/Jun 2006 - www.ecomarshosgame.com - This version updated May 2007. Individual use permissions only. */ var Tagno=new String() var repeatno=Tagno var countem=-1 var sumrykeys=new String() sumrykeys.length=5 var storeNos=new Array(6) storeNos[0]="" storeNos[1]="" storeNos[2]="" storeNos[3]="" storeNos[4]="" storeNos[5]="" var arrraYone=new Array(6) arrraYone[0]="4" arrraYone[1]="2" arrraYone[2]="5" arrraYone[3]="1" arrraYone[4]="3" arrraYone[5]="5" var arrraYtwo=new Array(7) arrraYtwo[0]="3" arrraYtwo[1]="1" arrraYtwo[2]="2" arrraYtwo[3]="5" arrraYtwo[4]="4" arrraYtwo[5]="5" arrraYtwo[6]="3" var sumrypass=new String(arrraYtwo[4]+arrraYone[1]+arrraYone[4]+arrraYtwo[0]+arrraYtwo[3]) function StringSort() { countem++ switch(Tagno) { case"1": storeNos[countem]="1" break; case"2": storeNos[countem]="2" break; case"3": storeNos[countem]="3" break; case"4": storeNos[countem]="4" break; case"5": storeNos[countem]="5" break; case"6": storeNos[countem]="6" break; default:return } } function Arrchck() { if ((countem<4)||(countem+parseInt(Tagno)==10)) {alert('No chance without pass number!'); return} if((countem>4)&(Tagno!=6)) {alert('Too many figures');return} sumrykeys=storeNos[0]+storeNos[1]+storeNos[2]+storeNos[3]+storeNos[4]+storeNos[5] if (sumrykeys==sumrypass) {document.location.href="CVxmlMJM2.html"} else {alert('There is one chance in 3125.'); return} } function clearstore() { Tagno=0 countem=-1 storeNos[0]="" storeNos[1]="" storeNos[2]="" storeNos[3]="" storeNos[4]="" storeNos[5]="" }