function text_mouseover() {
	var obj = this;
	obj.style.borderColor = '#d55658';
}
function text_mouseout() {
	var obj = this;
	obj.style.borderColor = '#a5acb2';
}
function text_focus() {
	var obj = this;
	obj.style.borderColor = '#d55658';
	obj.style.backgroundColor = '#fef7e3';
}
function text_blur(){
	var obj = this;
	obj.style.fontSize = '12px';
	obj.style.borderWidth = '1px';
	obj.style.borderStyle = 'solid';
	obj.style.borderColor = '#a5acb2';
	obj.style.backgroundColor = '#ffffff';
}
// SELECT:
function select_mouseover() {
	var obj = this;
	var parent = obj.parentNode;
	if (obj.row_color != 'none') {
		parent.style.borderColor = '#d55658';
	}
}
function select_mousedown() {
	var obj = this;
	obj.style.backgroundColor = '#fef7e3';
}
function select_mouseout() {
	var obj = this;
	var parent = obj.parentNode;	
	if (!obj.isfocus) {
		obj.style.backgroundColor = '#ffffff';
		if (obj.row_color != 'none') {
			parent.style.borderColor = obj.row_color;
		}
	}
}
function select_focus() {
	var obj = this;
	obj.isfocus = true;
	obj.style.backgroundColor = '#fef7e3';
}
function select_blur() {
	var obj = this;
	var parent = obj.parentNode;
	obj.isfocus = false;
	obj.style.backgroundColor = '#ffffff';
	if (obj.row_color != 'none') {
		parent.style.borderColor = obj.row_color;
	}
}
function create_border(obj) {
	var parent = obj.parentNode;
	var row_classname = parent.parentNode.parentNode.parentNode.parentNode.parentNode.className;
	
	parent.style.borderWidth = '1px';
	parent.style.borderStyle = 'solid';
	
	if (row_classname == 'form_even_type') {
		parent.style.borderColor = '#ffffff';
		obj.row_color = '#ffffff';
	} else if (row_classname == 'form_odd_type') {
		parent.style.borderColor = '#f0f0f0';
		obj.row_color = '#f0f0f0';
	} else {
		obj.row_color = 'none';
	}
}
function form_display() {
	var input = document.getElementsByTagName("input");
	var select = document.getElementsByTagName("select");
	var textarea = document.getElementsByTagName("textarea");
	if (input) {
		for (var i = 0; i < input.length; i++) {
			if (input[i].type == "text" || input[i].type == "password" || input[i].type == "button" || input[i].type == "submit" || input[i].type == "reset" || input[i].type == "file") {
				input[i].style.fontSize = '12px';
				input[i].style.borderWidth = '1px';
				input[i].style.borderStyle = 'solid';
				input[i].style.borderColor = '#a5acb2';
				if (input[i].type == "text" || input[i].type == "password" || input[i].type == "file") {
					if (input[i].className != 'wickEnabled') {
						input[i].onfocus = text_focus;
						input[i].onblur = text_blur;
					}
					input[i].onmouseover = text_mouseover;
					input[i].onmouseout = text_mouseout;
				}
			}
		}
	}
	if (select) {
		for (var i = 0; i < select.length; i++) {
			if (select[i].className && select[i].className == 'no_form_display') {
				continue;
			}
			create_border(select[i]);
			select[i].onmouseover = select_mouseover;
			select[i].onmouseout = select_mouseout;
			select[i].onfocus = select_focus;
			select[i].onblur = select_blur;
			select[i].onmousedown = select_mousedown;
		}
	}
	if (textarea) {
		for (var i = 0; i < textarea.length; i++) {
			textarea[i].style.fontSize = '12px';
			textarea[i].style.borderWidth = '1px';
			textarea[i].style.borderStyle = 'solid';
			textarea[i].style.borderColor = '#a5acb2';
			textarea[i].onmouseover = text_mouseover;
			textarea[i].onmouseout = text_mouseout;
			textarea[i].onfocus = text_focus;
			textarea[i].onblur = text_blur;
		}
	}
}