 $(document).ready(function(){ 	
	
});

function regenerateCaptcha(name,val) 
{	
	$('img#captcha').attr('src','plugins/secureimage/show.php?'+name+'='+val+'&u='+Math.random())
}
function regenerateCaptcha2(name,val) 
{	
	$('img#captcha2').attr('src','plugins/secureimage/show.php?'+name+'='+val+'&u='+Math.random())
}
function addCommas(nStr)
{
	 nStr += '';
	 x = nStr.split('.');
	 x1 = x[0];
	 x2 = x.length > 1 ? '.' + x[1] : '';
	 var rgx = /(\d+)(\d{3})/;
	 while (rgx.test(x1)) {
	   x1 = x1.replace(rgx, '$1' + ',' + '$2');
	 }
	 return x1 + x2;
}

Number.prototype.toFixedTruncate= function(n){
var N= this;
N= Math.floor(N*Math.pow(10,n));
N/=Math.pow(10,n);
return(N.toFixed(n));
}
Number.prototype.toFixedRound= function(n){
var N= this;
N= Math.round(N*Math.pow(10,n));
N/=Math.pow(10,n);
return(N.toFixed(n));
}

$.strPad = function(i,l,s) {
	var o = i.toString();
	if (!s) { s = '0'; }
	while (o.length < l) {
		o = s + o;
	}
	return o;
};
