﻿// JavaScript Document
if (!SubmissionFormsBehaviorsLoaded){
var SubmissionFormsBehaviorsLoaded

function SubmissionFormsBehaviorsObj(){
	this.initForm = function(fObj){
		//trace($)
		switch(fObj.name){
			case 'f1':
				fObj.init = smallContactInit
				fObj.init()
			default:
				//trace(fObj.name)
		}//switch
	}//initForm
	var bgBehavior = function(bg) {
		bg = bg?bg:"#FFF"
		this.onfocus = function() {
			this.style.backgroundColor = bg
		}	
		this.onblur=function(){
			this.style.backgroundColor = this.value.length==0? '':bg;
		}
		this.onblur()
		//trace(this.hasFocus )
	} //bgBehavior	
	
	var smallContactInit = function(){
		var ME = this
		for (var n = 0; n < ME.length; n++) {
			if (/text|textarea/.test(ME[n].type)) {
				ME[n].init = bgBehavior
				ME[n].init("#FFF")
			}
		}
	} //smallContactInit
		
SubmissionFormsBehaviorsLoaded = true	
return this
}// SubmissionFormsBehaviorsObj
SubmissionFormsBehaviors = new SubmissionFormsBehaviorsObj()
}
