// JavaScript Document

var a_fields = {
	'memberid' : {
		'l': 'User Name',  // label
		'r': true,    // required
		't': 't_memberid',// id of the element to highlight if input not validated
		
		'm': null,     // must match specified form field
		'mn': 2,       // minimum length
		'mx': null       // maximum length
		
	},	
	'password' : {'l':'Password','r':true,'t':'t_password'}

},
o_config = {
	'to_disable' : ['btnSubmit'],
	// 1 - fill error dialog,
	// 2 - fill error HTML box,
	// 4 - debug alert,
	// 8 - submit ok HTML box
	// 16 - submit confirmation dialog,
	// function - custom function(array of messages)
	'alert' : 1 + 2 + 8 ,
	'alert_class' : ['inputHighlighted', 'inputNormal'],
	'messages' : {
		'boxes' : [	'<table cellpadding="0" align="center" class ="showError" cellspacing="0" border="0" width="100%">'
					+'<tr><td align="center"><font color=RED>'
					+'%error%'
					+'</font></td></tr></table>']
	}
}
var v = new validator('login', a_fields, o_config)

