/********************************************************************
* refreshes captcha incase unreadable
********************************************************************/
function refreshCaptcha(img,w,b){
	
	if(typeof(w) == 'undefined'){
		
		w = 200;
		
	}
	
	if(typeof(b) == 'undefined'){
		
		b = 'g';
		
	}
	
	img.src = '/includes/captcha/display.php?w=' + w + '&b=' + b + '&a=' + Math.floor(Math.random()*5000000+1);
	
}

/********************************************************************
* makes field only accept numbers
********************************************************************/
function onlyNumbers(src){
	
	src.value = src.value.replace(/[^0-9]/g, '');
	
}

/********************************************************************
* confirmation dialogue making sure player wants to do
* a specific action
********************************************************************/
function confirmIt(msg){
	
	var agree = confirm(msg);
	
	if(agree){
		
		return true;
		
	} else {
		
		return false;
		
	}
	
}