function isPrefix(string1,string2) {for(i=0;i<string1.length;++i)	if(string1.charAt(i)!=string2.charAt(i)) {		return false;	}	return true;}function checkUpgrade(theValue) {	exampleKey1 = "*A 5BE2 3DED ED90 460F C7BD AF2A";	exampleKey2 = "*A 5BE2 3DED ED90 460F C7BD AF2A ... *";	exampleKey3 = "PAN0100005-BAT9-XR2Q-C3E4...";	if (isPrefix(theValue,exampleKey1) || isPrefix(theValue,exampleKey2) || isPrefix(theValue,exampleKey3)) {		alert("Please enter a valid license key in order to upgrade.");		return false;	}	else if (theValue == "") {		alert("You need to enter your license key!");		return false;	}	else if (!isPrefix("*A ", theValue ) && !isPrefix("*B ", theValue ) && !isPrefix("*C ", theValue ) && !isPrefix("PEN01000", theValue ) && !isPrefix("PAN01000", theValue )) {		alert("You need to enter a valid license key in order to update/upgrade.");		return false;	}	return true;}
