/****************************************
|
| A-Line / Muru
| http://www.a-linetool.com
|
| Created by: Kevin Biskaborn
| Copyright 2010 ScriptReaction
| http://www.scriptreaction.com
|
*****************************************
| Load Dependencies	: None
| Run Dependencies	: Global{}
****************************************/

var formHandler = {
	launch: function (){
		var formHolder = document.getElementById( "dataForm" );
		var formTypes = new Array( "input", "select", "textarea" );
		
		for(var typeCount=0; typeCount<formTypes.length; typeCount++){
			var whichType = formTypes[typeCount];
			var typeArray = formHolder.getElementsByTagName(whichType);
			
			for(var itemCount=0; itemCount<typeArray.length; itemCount++){
				var whichItem = typeArray[itemCount];
				
				whichItem.onfocus = function (){
					with(this.style){
						backgroundColor	= "#ececec";
						borderColor		= "#000000";
					}
				}
					
				whichItem.onblur = function (){
					with(this.style){
						backgroundColor	= "";
						borderColor		= "";
					}
				}
			}
			
		}
	},
	clear: function (){
		if( confirm( "**** Confirm Form Reset ****\n All data entered in the fields will be erased !\n\nProceed with reset ?\n" ) )
			top.location.href = top.location;
	}
}