var rules = {
	'div#warnJS' : function(element){
		element.style.display='none';
	},
	'.imgMO' : function(element){
		element.onmouseover = function () {
			imgMO(this);
		}
		element.onmouseout = function () {
			imgMO(this);
		}	
	},
	'input' : function(element){
		element.onmouseover = function () {
			this.style.backgroundColor='#f0f0f0';
		}
		element.onmouseout = function () {
			if (!this.hasFocus)	
				this.style.backgroundColor='#FFFFFF';
		}
		element.onfocus = function () {
			this.style.backgroundColor='#f0f0f0';
			this.hasFocus = true;
		}
		element.onblur = function () {
			this.style.backgroundColor='#FFFFFF';
			this.hasFocus = false;
		}		
	},	
	'textarea' : function(element){
		element.onmouseover = function () {
			this.style.backgroundColor='#f0f0f0';
		}
		element.onmouseout = function () {
			if (!this.hasFocus)	
				this.style.backgroundColor='#FFFFFF';
		}
		element.onfocus = function () {
			this.style.backgroundColor='#f0f0f0';
			this.hasFocus = true;
		}
		element.onblur = function () {
			this.style.backgroundColor='#FFFFFF';
			this.hasFocus = false;
		}		
	},	
	'.frmField' : function(element){
		element.onfocus = function () {
			if (!this.cleared) 
				clearField(this); 
			this.cleared=true;
			//this.style.backgroundColor = '#ffffff';
		}	
		element.onblur = function () {
			resetField(this);
			//this.style.backgroundColor = 'transparent';
		}
	}
};
for (selector in rules){
	Behavior.register(selector,rules[selector]);
}
