function pow(){
if(inputvalue.value.indexOf("^") != '-1'){

carrotlocation= inputvalue.value.indexOf("^");
firstlocation= carrotlocation;
lastlocation= carrotlocation;
acceptedpow=Array('0','1','2','3','4','5','6','7','8','9','-','x','.');

	while(firstlocation>=0){
	firstlocation--;
		if(!in_array(inputvalue.value.charAt(lastlocation),acceptedpow)){
		break;
		}
	}

	while(lastlocation<inputvalue.value.length){
	lastlocation++;
		if(!in_array(inputvalue.value.charAt(lastlocation),acceptedpow)){
		break;
		}
	}

firstlocation++;
lastlocation--;
firstpart= inputvalue.value.substr(firstlocation,carrotlocation);
secondpart= inputvalue.value.substr(carrotlocation+1,lastlocation);

	if(firstlocation != carrotlocation && lastlocation != carrotlocation){ ///need to replace entire sections
//	document.eq.result.value= Math.pow(firstpart,secondpart);

	powereq= inputvalue.value.substr(firstlocation,lastlocation-0+1);
	input=document.eq.data.value.replace(powereq, Math.pow(firstpart,secondpart));

	}

	else{
	input='error';
	}
}
}