function Round(num, prec)
// This function was created by Yi-Tao. Feel free to use it without my permission.
// As long as you leave these two comments here.
{ 
	// convert num to string 
	num = "" + num;
	prec = parseInt(prec); 

	var num2 = "" + Math.round(num* Math.pow(10, prec)); 

	// find decimal point
	var prec2 = num2.length - prec; 

	if(prec2 != 0) 
	{ 
	//Merging the left and right part to the decimal together 
		value = num2.substring(0, prec2); 
		value += "."; // Without this, there is no other side of decimal
		value += num2.substring(prec2, num2.length); 
	} 
	else 
	{ value = num2; 
	} 
	
	return value; 
}
