var checkForm = function(frmName)
{
	this.frm = frmName;
	this.msgError = '';
	this.lstField = new Array();
	this.lstValue = new Array();
}
checkForm.prototype.addField = function(fieldName)
{
	field = $('form[name='+this.frm+'] [name='+fieldName+']');
	field.attr({ temp : field.val() });
	field.bind("click",function(){
		if( $(this).attr('temp') == $(this).val() )	$(this).val('');
	});
	field.bind("blur",function(){
		if( $(this).attr('temp') == $(this).val() || $(this).val() == "")
			$(this).val( $(this).attr('temp') );
	});
	this.lstField.push(field);
	this.lstValue.push(field.val());
}
checkForm.prototype.errorMsg = function(idBadMessage)
{
	this.msgError = $('#'+idBadMessage).val();
}
checkForm.prototype.message = function()
{
	alert( this.msgError );
}
checkForm.prototype.send = function()
{
	error = 0;
	for(i=0;i<this.lstField.length;i++)
		if( this.lstField[i].val() == this.lstValue[i] )
			error++;
	if( error > 0 )
		return false;
	else
		return true;
}