/*Parse number to currency format:
By Website Abstraction (www.wsabstract.com)
and Java-scripts.net (www.java-scripts.net)
*/

//Remove the $ sign if you wish the parse number to NOT include it

function parseelement(thisone){
	var prefix=arguments[1]!=null?arguments[1]:'';
	var wd;
	thisone=String(thisone);
	if (thisone.charAt(0)=="$")
		return
	wd="w"
	var tempnum=thisone;
	for (i=0;i<tempnum.length;i++){
		if (tempnum.charAt(i)=="."){
			wd="d"
			break
		}
	}
	if (wd=="w")
		thisone=prefix+tempnum+".00"
	else{
		tempnum=Math.round(tempnum*100)/100;
		if (String(tempnum).charAt(String(tempnum).length-2)=="."){
			thisone=prefix+tempnum+"0"
		}else{
			
			thisone=prefix+tempnum
		}
	}
	return thisone;
}