
-----------------------------------
guttface
Mon Apr 04, 2005 6:52 pm

error detection javascript/html
-----------------------------------
this is a javascript question but i didnt no where else to put it. i keep getting an error that a function is expected on line 72. i've spent 4 hours on it and cant find an answer. plz help.



function PRIME(max,p1){
	while(true){
		var prime = Math.floor(Math.random() * max) ; 
		var factor=2; 
 		while (factor < prime && (prime%factor)!=0){
			factor++;             		  
	       		if (factor==prime && factor!=p1 ) return prime;
        	}
	}
}

function GCD(a,b){
	while(c != 0){
		var c = a % b;
		a = b;
		b = c;
	}
	return a;
}

function E(phi){
	var e=3;
	while(GCD(phi,e)!=1){
     		e+=2;
   	}
	return e;
}

function D(S,L) {
a = new Array();
q = new Array();
x = new Array();

   a[0]=L; a[1]=S; i=0;
   while(a[i]%a[i+1]!=0)
     {
       a[i+2]=a[i]%a[i+1];
       q[i+1]=Math.floor(a[i]/a[i+1]);
       i++;
     }
   var n=i+1; x[n]=0; x[n-1]=1;
   for(j=n-2;j>=0;j--)  x[j] = x[j+1] * q[j+1] + x[j+2];
   if (a[n] != 1) return "No Inverse";
   if((x[1]*a[0])>(x[0]*a[1])) return L - x[0];
   else return x[0];
}

function NUMLET(str){
	var numstr="";
	for(i=0;i