

var buttonBackgroundMouseOverColor	= "#999999";
var buttonBackgroundDefaultColor	= "#bbbbbb";
var buttonTextMouseOverColor 		= "black";
var buttonTextDefaultColor			= "black";

var buttonBorderWidth 				= "2px";
var buttonFontSize					= "8pt";
var buttonFontFamily				= "arial, helvetica";

var defaultFieldBorderColor 		= "#333333";
var defaultFieldBorderWidth 		= 1;
var defaultFieldBackgroundColor 	= "#eeeeee";
var defaultFieldMargin 				= 3;
var defaultFieldBorderStyle 		= "solid";

var fieldFontFamily					= "'lucida console',verdana, arial, helvetica";
var fieldFontColor					= "#000000";
var fieldFontSize					= "8pt";

var onFocusFieldBorderColor 		= "#666600";
var onFocusFieldBorderWidth 		= 2;
var onFocusFieldBackgroundColor 	= "#ffffff";
var onFocusFieldMargin 				= 2;
var onFocusFieldBorderStyle 		= "solid";

var onMouseOverFieldBorderColor 	= "#333333";
var onMouseOverFieldBorderWidth 	= 2;
var onMouseOverFieldBackgroundColor = "#f6f6f6";
var onMouseOverFieldMargin 			= 2;
var onMouseOverFieldBorderStyle 	= "solid";

function initForms() {
	var elementen = document.forms;
	for (var i=0; i<elementen.length; i++) {
		for (var x=0; x<elementen[i].length; x++) {
			var veldsoort = elementen[i][x].type;
			if ((veldsoort == "text") || (veldsoort == "password") || (veldsoort == "textarea")) {
				elementen[i][x].style.fontFamily = fieldFontFamily;
				elementen[i][x].style.fontSize = fieldFontSize;
				elementen[i][x].style.color = fieldFontColor;
				elementen[i][x].style.borderWidth = defaultFieldBorderWidth;
				elementen[i][x].style.borderColor = defaultFieldBorderColor;
				elementen[i][x].style.borderStyle = defaultFieldBorderStyle;
				elementen[i][x].style.margin = defaultFieldMargin;
				elementen[i][x].style.background = defaultFieldBackgroundColor;
				elementen[i][x].onfocus = fieldFocus;
				elementen[i][x].onblur = fieldBlur;
				elementen[i][x].onmouseover = fieldMouseOver;
				elementen[i][x].onmouseout = fieldMouseOut;
			}
			if ((veldsoort == "submit") || (veldsoort == "reset" || veldsoort == "button")) {
				elementen[i][x].style.background = buttonBackgroundDefaultColor;
				elementen[i][x].style.borderWidth = buttonBorderWidth;
				elementen[i][x].style.fontSize = buttonFontSize;
				elementen[i][x].style.fontFamily = buttonFontFamily;						
				elementen[i][x].style.color = buttonTextDefaultColor;		
				elementen[i][x].onmouseover = buttonMouseOver;
				elementen[i][x].onmouseout = buttonMouseOut;								
			}
			if ((veldsoort == "select-one")) {
					elementen[i][x].style.background = defaultFieldBackgroundColor;
					elementen[i][x].style.borderWidth = buttonBorderWidth;
					elementen[i][x].style.fontSize = buttonFontSize;
					elementen[i][x].style.fontFamily = buttonFontFamily;						
					elementen[i][x].style.color = buttonTextDefaultColor;		
					//elementen[i][x].onmouseover = fieldMouseOver;
					//elementen[i][x].onmouseout = fieldMouseOut;		
			}
		}		
	}
}

function buttonMouseOver() {
	this.style.background = buttonBackgroundMouseOverColor;
	this.style.color = buttonTextMouseOverColor;
}

function buttonMouseOut() {
	this.style.background = buttonBackgroundDefaultColor;
	this.style.color = buttonTextDefaultColor;
} 

function fieldFocus() {
	this.style.background = onFocusFieldBackgroundColor;
	this.style.borderColor = onFocusFieldBorderColor;
	this.style.borderWidth = onFocusFieldBorderWidth;
	this.style.borderStyle = onFocusFieldBorderStyle;
	this.style.margin = onFocusFieldMargin;
}

function fieldBlur() {
	this.style.background = defaultFieldBackgroundColor;
	this.style.borderColor = defaultFieldBorderColor;
	this.style.borderWidth = defaultFieldBorderWidth;
	this.style.borderStyle = defaultFieldBorderStyle;
	this.style.margin = defaultFieldMargin;
}

function fieldMouseOver() {
	if (this.style.background != onFocusFieldBackgroundColor) {	
		this.style.background = onMouseOverFieldBackgroundColor;
		this.style.borderColor = onMouseOverFieldBorderColor;
		this.style.borderWidth = onMouseOverFieldBorderWidth;
		this.style.borderStyle = onMouseOverFieldBorderStyle;
		this.style.margin = onMouseOverFieldMargin;
	}	
}

function fieldMouseOut() {
	if (this.style.background != onFocusFieldBackgroundColor) {
		this.style.background = defaultFieldBackgroundColor;
		this.style.borderColor = defaultFieldBorderColor;
		this.style.borderWidth = defaultFieldBorderWidth;
		this.style.borderStyle = defaultFieldBorderStyle;
		this.style.margin = defaultFieldMargin;
	}
}





