// JavaScript Document
jQuery(document).ready(function(event) {
		
	jQuery("#cancelbtn").click(function(event) {
		window.history.back();									
	});
	
	jQuery(".numericfield").keyup(function(event) {
		this.value = this.value.replace(/[^0-9.]+/i, "");
	});
	
	jQuery(".currencyfield").keyup(function(event) {
		this.value = GabeUtil.currencyOnly(this.value);
	});
	
	jQuery(".alphanumericfield").keyup(function(event) {
		this.value = GabeUtil.alphanumericOnly(this.value);
	});
	
	jQuery("input[name='firstname'], input[name='lastname']").focus(function(event) {
		if(this.value == 'First name' || this.value == 'Last name') {
			this.value = '';
		}
	});
	
	jQuery(".datepickerfld").datepicker({
		dateFormat : 'yy-mm-dd'
	});
	
	jQuery.each(jQuery("select.selectinstrument"), function(i, val) {
		B2Bach.initSelectInstrument(val);
	});
	
});
