function initSwapField(obj, entered_bg_img, empty_bg_img) {

	obj.setAttribute('empty_bg_img', empty_bg_img);
	obj.setAttribute('entered_bg_img', entered_bg_img);
	
	obj.onfocus = function () {
		this.style.background = "transparent url('" + 
						obj.getAttribute('entered_bg_img') + "')";
	};
	
	obj.onblur = function() {
		if (this.value!=null && this.value!='') {
			this.style.background = "transparent url('" + 
						obj.getAttribute('entered_bg_img') + "')";
			//alert('entered' + this.style.background);
		} else {
			this.style.background = "transparent url('" + 
						obj.getAttribute('empty_bg_img') + "')";	
		    //alert('empty' + this.style.background);	
		}
	};
	
	obj.onchange = function() {
		if (this.value!=null && this.value!='') {
			this.style.background = "transparent url('" + 
						obj.getAttribute('entered_bg_img') + "')";
			//alert('entered' + this.style.background);
		} else {
			this.style.background = "transparent url('" + 
						obj.getAttribute('empty_bg_img') + "')";	
		    //alert('empty' + this.style.background);	
		}
	};
	
	if (obj.value!=null && obj.value!='') {
		obj.style.background = "transparent url('" + 
					obj.getAttribute('entered_bg_img') + "')";
	} else {
		obj.style.background = "transparent url('" + 
					obj.getAttribute('empty_bg_img') + "')";		
	}
	
}
