// JavaScript Document
Validator_engine = Class.create({
	initTime:	null,
	_keyStr : 'ab0defghijklmnopq3stuvwxyz7BCD5FGHIJKLMNOPQRSTUVWXYZc12r4E6A89+/=',

	initialize: function() {
		var m_start = new Date().getTime() / 1000;
		Element.select(document, 'form[validate]').each(this.presetForms.bind(this));
		var m_end = new Date().getTime() / 1000;
		this.initTime = (m_end - m_start);
	},
	fireEvent: function(element, event){
		if(document.createEventObject){
			var evt = document.createEventObject();
			return element.fireEvent('on'+event, evt);
		}else{
			var evt = document.createEvent('HTMLEvents');
			evt.initEvent(event, true, true);
			return !element.dispatchEvent(evt);
		}
	},
	callMessage: function(id, msg){
		var message = 'Not all required fields are entered!';
		if(msg){
			message += '\n\r\n\r' + msg;
		}
		try{
			new Ajax.Request('http://www.doepunt.nl/validator/getMessage/'+id+'/',{onSuccess:function(t){alert(t.responseText);}, onFailure:function(){alert(message);} });
		}catch(e){
			throw('Validator::callMessage: ' + e);
		}
	},
	findLabel: function(node){
		try{
			var nodeId = $(node).identify();
			var labelId  = $(node).readAttribute('image');
			if(labelId && $(labelId)){
				return $(labelId);
			}else if($('label_'+nodeId)){
				return $('label_'+nodeId);
			}else{
				var arrLabels = $(node).form.select('label[for="'+nodeId+'"]');
				if(arrLabels.first()){
					return arrLabels.first();
				}
				return false;
			}
		}catch(e){
			throw('Validator::findLabel: ' + e);
		}
	},
	getIcon: function(node){
		try{
			var nodeId 		= $(node).identify();
			if(labelId = $(node).readAttribute('image')){
				nodeId = labelId;
			}
			if($('img_'+nodeId)){
				return $('img_'+nodeId);
			}else{
				var val_img = new Element('IMG', {'id': 'img_'+nodeId});
				if(label = this.findLabel(node)){
					label.insert({after:val_img});
				}else{
					var val_parent	= node.parentNode;
					if(val_parent && (val_parent.tagName==='TD' || val_parent.tagName==='TH')){
						$(val_parent).writeAttribute('nowrap', 'nowrap');
					}
					$(node).insert({after:val_img});
				}
				return val_img;
			}
		}catch(e){
			throw('Validator::getIcon: ' + e);
		}
	},
	/************************************************************/
	encode: function(string){
		string = string.toString();
		var s 	= [];
		var l 	= string.length;
		var rm	= l % 3;
		var x	= l - rm;
		for (var i=0; i<x;){
			var t=string.charCodeAt(i++) << 16 | string.charCodeAt(i++) << 8 | string.charCodeAt(i++);
			s.push(this._keyStr.charAt((t >>> 18) & 0x3f));
			s.push(this._keyStr.charAt((t >>> 12) & 0x3f));
			s.push(this._keyStr.charAt((t >>> 6) & 0x3f));
			s.push(this._keyStr.charAt(t & 0x3f));
		}
		switch(rm){
			case 2:
					t=string.charCodeAt(i++) << 16|string.charCodeAt(i++) << 8;
					s.push(this._keyStr.charAt((t >>> 18) & 0x3f));
					s.push(this._keyStr.charAt((t >>> 12) & 0x3f));
					s.push(this._keyStr.charAt((t >>> 6) & 0x3f));
					s.push(this._keyStr.charAt(this._keyStr.length-1));
				break;
			case 1:
					t=string.charCodeAt(i++) << 16;
					s.push(this._keyStr.charAt((t >>> 18) & 0x3f));
					s.push(this._keyStr.charAt((t >>> 12) & 0x3f));
					s.push(this._keyStr.charAt(this._keyStr.length-1));
					s.push(this._keyStr.charAt(this._keyStr.length-1));
				break;
		}
		return s.join('');
	},
	_utf8_encode: function(string){
		string = string.replace(/\r\n/g,"\n");
		var utftext = '';
		for(var n=0; n<string.length; n++){
			var c = string.charCodeAt(n);
			if(c<128) {
				utftext += String.fromCharCode(c);
			}else if((c > 127) && (c < 2048)){
				utftext += String.fromCharCode((c >> 6) | 192);
				utftext += String.fromCharCode((c & 63) | 128);
			}else{
				utftext += String.fromCharCode((c >> 12) | 224);
				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
				utftext += String.fromCharCode((c & 63) | 128);
			}
		}
		return utftext;
	},

	/************************************************************/
	getFormSubElements: function(node) {
		var elements = $(node).getElementsByTagName('*'),
			element,
			arr = [ ],
			serializers = Form.Element.Serializers;
		for (var i = 0; element = elements[i]; i++) {
		  arr.push(element);
		}
		return arr.inject([], function(elements, child) {
		  if (serializers[child.tagName.toLowerCase()])
			elements.push(Element.extend(child));
		  return elements;
		})
	},
	updateDivElement: function(node){
		try{
			var nodeId = $(node).identify();
			this.getFormSubElements($(node)).each(this.presetInputs.bind(this));
		}catch(e){
			throw('Validator::updateElement: ' + e);
		}
	},
	/************************************************************/
	presetForms: function(node){
		try{
			var nodeId = $(node).identify();
			$(node).writeAttribute('autocomplete', 'off');
			$(node).setStyle({'display':'inline'});
			$(node).getElements().each(this.presetInputs.bind(this));
			if(r = $(node).readAttribute('validate')){
				this.formnode_setValidateSettings(node, r);
			}else{
				this.formnode_setSubmitSettings(node);
			}
		}catch(e){
			throw('Validator::presetForms: ' + e);
		}
	},
	presetInputs: function(node){
		try{
			if(r = $(node).readAttribute('required')){
				this.inputnode_setRequiredSettings(node, r);
			}
			if(r = $(node).readAttribute('require')){
				this.inputnode_setRequireSettings(node, r);
			}
			if(r = $(node).readAttribute('validate')){
				this.inputnode_setValidateSettings(node, r);
			}
			if(r = $(node).readAttribute('lookup')){
				this.inputnode_setLookupSettings(node, r);
			}
			if(r = $(node).readAttribute('populate')){
				this.inputnode_setPopulateSettings(node, r);
			}
			if(r = $(node).readAttribute('identical')){
				this.inputnode_setIdenticalSettings(node, r);
			}
			if(r = $(node).readAttribute('default')){
				this.inputnode_setDefaultSettings(node, r);
			}
		}catch(e){
			throw('Validator::presetInputs: ' + e);
		}
	},
	/************************************************************/
	formnode_setValidateSettings: function(node, type){
		$(node).observe('submit',
			(function(event){
				var element = event.element();
				if(element.readOnly){
					return;
				}
				element.focus();
				var all_required = true;
				if($(node).onsubmit){
					all_required=eval($(node).onsubmit());
				}		
				var _msg = '';
				try{
					$(element).getElements().each(function(inputnode){
						try{
							if(snode = $(inputnode).readAttribute('require')){
								var disabledElement = $(inputnode).readAttribute('disabled');
								var skip 			= $(inputnode).readAttribute('skiprequire');
								if(disabledElement){
									$(inputnode).setStyle({'borderColor':''});
									if(label = this.findLabel(inputnode)){
										label.setStyle({'color':''});
									}
								}else if(skip!='yes' && this.inputnode_checkRequiredData(inputnode, false)){
									all_required = false;
									$(inputnode).setStyle({'border':'#FF0000 1px solid'});
									if(label = this.findLabel(inputnode)){
										label.setStyle({'color':'#FF0000'});
										_msg+= '-'+label.innerHTML+'\r\n';
									}
								}else if(skip!='yes'){
									$(inputnode).setStyle({'borderColor':''});
									if(label = this.findLabel(inputnode)){
										label.setStyle({'color':''});
									}
								}
							}
						}catch(e){
							throw('Validator::formnode_setValidateSettings::inputs:: ' + e);
						}
					}.bind(this));
					if(!all_required){
						this.callMessage(1, _msg);
						Event.stop(event);
					}else{
						//element.select('INPUT[type="submit"]', 'BUTTON[type="submit"]').each(function(snode){$(snode).writeAttribute('disabled', 'disabled');});
					}
				}catch(e){
					throw('Validator::formnode_setValidateSettings: ' + e);
				}
			}.bind(this))
		);
	},
	inputnode_checkRequiredData: function(node, prev){
		var state = (false || prev);
		try{
			if($(node)){
				var snode = $(node).readAttribute('require');
				if(this.isEmptyObjectValue($(node))){
					if(snode && snode!='required' && snode!='noimages'){
						if($(snode) && !$(snode).readAttribute('skiprequire')){
							$(snode).writeAttribute('skiprequire', 'yes');
						}
						state = this.inputnode_checkRequiredData(snode, state);
					}else{
						state = true;
					}
				}else{
					if(snode){
						if($(snode) && !$(snode).readAttribute('skiprequire')){
							$(snode).writeAttribute('skiprequire', 'yes');
						}
						this.inputnode_checkRequiredData(snode, state);
					}
				}
			}
		}catch(e){
			throw('Validator::inputnode_checkRequiredData: ' + e);
		}
		return state;
	},
	formnode_setSubmitSettings: function(node){
		$(node).observe('submit',
			(function(event){
				var element = event.element();
				if(element.readOnly) return;
				try{
					element.select('INPUT[type="submit"]', 'BUTTON[type="submit"]').each(function(snode){
																		if(r = $(snode).readAttribute('block')){
																			$(snode).writeAttribute('disabled', 'disabled');
																		}
																});
				}catch(e){
					throw('Validator::formnode_setSubmitSettings: ' + e);
				}
			}.bind(this))
		);
	},
	/************************************************************/
	inputnode_setRequiredSettings: function(node, type){
		try{
			/* HTML5 bugfix */
			$(node).writeAttribute('require', $(node).readAttribute('required'));
			$(node).removeAttribute('required');
			var noimages = $(node.form).readAttribute('validate');
			if( (type !== 'noimage') && (noimages !== 'noimages') ){
				this.getIcon(node).src = 'http://www.doepunt.nl/validator/Icons/required.png';
			}
		}catch(e){
			throw('Validator::inputnode_setRequiredSettings: ' + e);
		}
	},
	inputnode_setRequireSettings: function(node, type){
		try{
			/* alternative HTML5 bugfix */
			var noimages = $(node.form).readAttribute('validate');
			if( (type !== 'noimage') && (noimages !== 'noimages') ){
				this.getIcon(node).src = 'http://www.doepunt.nl/validator/Icons/required.png';
			}
		}catch(e){
			throw('Validator::inputnode_setRequireSettings: ' + e);
		}
	},
	inputnode_setValidateSettings: function(node, type){
		try{
			$(node).observe('blur',
			(function(event){
				var element = event.element();
				if(element.readOnly) return;
				try{
					var ajaxOptions = {
					  method:		'get',
					  encoding:     this.encoding,
					  parameters:   {},
					  evalJSON:     false,
					  evalJS:       false
					};
					var depending	= element.readAttribute('depend');
					var tofill		= element.readAttribute('fill');
					if(depending){
						depending = depending.split(';');
						var arrDep = Array();
						$A(depending).each( function(elm, idx){
							arrDep.push(this.encode($F($(elm))));
						}.bind(this));
						Object.extend(ajaxOptions.parameters, {data: arrDep.join('|')});
					}
					Object.extend(ajaxOptions.parameters, {value: this.encode($F(element))});
					ajaxOptions.onSuccess	= (function(transport){this.inputnode_updateValidate(transport, node)}.bind(this));
					//
					if(ajaxOptions.parameters.value!==''){
						var myAjax = new Ajax.Request('http://www.doepunt.nl/validator/validateInput/' + type, ajaxOptions);
					}
				}catch(e){
					throw('Validator::inputnode_setValidateSettings2: ' + e);
				}
			}.bind(this)));
			if(backupValue = $F(node)){
				$(node).writeAttribute({'backupValue': backupValue});
				this.fireEvent($(node), 'blur');
			}
		}catch(e){
			throw('Validator::inputnode_setValidateSettings: ' + e);
		}
	},
	inputnode_setLookupSettings:function(node, type){
		try{
			var eventAction = 'blur';
			if($(node).tagName == 'SELECT'){
				eventAction = 'change'
			}
			$(node).observe(eventAction,
			(function(event){
				var element = event.element();
				if(element.readOnly) return;
				try{
					var ajaxOptions = {
					  method:		'get',
					  encoding:     this.encoding,
					  parameters:   {},
					  evalJSON:     false,
					  evalJS:       false
					};
					var depending	= element.readAttribute('depend');
					var tofill		= element.readAttribute('fill');
					if(depending){
						depending = depending.split(';');
						var arrDep = Array();
						$A(depending).each( function(elm, idx){
							arrDep.push(this.encode($F($(elm))));
						}.bind(this));
						Object.extend(ajaxOptions.parameters, {data: arrDep.join('|')});
					}
					Object.extend(ajaxOptions.parameters, {value: this.encode($F(element))});
					ajaxOptions.onSuccess	= (function(transport){this.inputnode_updateLookup(transport, node, tofill)}.bind(this));
					if(ajaxOptions.parameters.value!==''){
						var myAjax = new Ajax.Request('http://www.doepunt.nl/validator/lookupInput/' + type, ajaxOptions);
					}
				}catch(e){
					throw('Validator::inputnode_setLookupSettings2: ' + e);
				}
			}.bind(this)));
		}catch(e){
			throw('Validator::inputnode_setLookupSettings: ' + e);
		}
	},
	inputnode_setPopulateSettings: function(node, type){
		try{
			var eventAction = 'blur';
			if($(node).tagName == 'SELECT'){
				eventAction = 'change'
			}
			$(node).observe(eventAction,
			(function(event){
				var element = event.element();
				if(element.readOnly) return;
				try{
					var ajaxOptions = {
					  method:		'get',
			 		  asynchronous: false,
					  encoding:     this.encoding,
					  parameters:   {},
					  evalJSON:     false,
					  evalJS:       false
					};
					var tofill		= element.readAttribute('fill');
					Object.extend(ajaxOptions.parameters, {value: this.encode($F(element))});
					ajaxOptions.onSuccess	= (function(transport){this.inputnode_updatePopulate(transport, node, tofill)}.bind(this));
					if(ajaxOptions.parameters.value!==''){
						var myAjax = new Ajax.Request('http://www.doepunt.nl/validator/populateInput/' + type, ajaxOptions);
					}
				}catch(e){
					throw('Validator::inputnode_setPopulateSettings2: ' + e);
				}
			}.bind(this)));
			if(backupValue = $F(node)){
				$(node).writeAttribute({'backupValue': backupValue});
				this.fireEvent($(node), eventAction);
			}
		}catch(e){
			throw('Validator::inputnode_setPopulateSettings: ' + e);
		}
	},
	inputnode_setIdenticalSettings: function(node, value){
		var eventAction = 'blur';
		if($(node).tagName == 'SELECT'){
			eventAction = 'change'
		}
		$(node).observe(eventAction,
		(function(event){
			var element = event.element();
			try{
				if($F(value)===$F(element)){
					this.getIcon(element).src = 'http://www.doepunt.nl/validator/Icons/ok.png';
				}else{
					this.getIcon(element).src = 'http://www.doepunt.nl/validator/Icons/nok.png';
				}
			}catch(e){
				throw('Validator::inputnode_setIdenticalSettings: ' + e);
			}
		}.bind(this)));
	},
	inputnode_setDefaultSettings: function(node, value){
		if($(node).getValue()===''){
			$(node).setValue(value);
		}
		$(node).observe('focus',
		(function(event){
			var element = event.element();
			try{
				if((element.nodeName==='INPUT') && ($(element).readAttribute('type')==='text') && ($(element).readAttribute('changetype')==='password')){
					if(Prototype.Browser.IE){
						var newobj = new Element('INPUT');
						var nameobj = $(element).readAttribute('name');
						var classobj = $(element).readAttribute('class');
						var requiredobj = $(element).readAttribute('require');
						$(newobj).writeAttribute({'type': 'password'});
						if(requiredobj)	$(newobj).writeAttribute({'require': 'require'});
						if(nameobj)		$(newobj).writeAttribute({'name': nameobj});
						if(classobj)	$(newobj).writeAttribute({'class': classobj});
						$(element.parentNode).insert({top:newobj});
						$(element).remove();
						newobj.focus();
						element = newobj;
					}else{
						$(element).writeAttribute({'type': 'password'});
					}
				}
				$(element).setValue('');
			}catch(e){
				throw('Validator::inputnode_setDefaultSettings::observe_focus: ' + e);
			}
		}.bind(this)));
	},
	/************************************************************/
	handle_nodeEvents: function(node){
		try{
			if($(node).onchange){
				eval($(node).onchange());
			}
			if($(node).onblur){
				eval($(node).onblur());
			}
		}catch(e){
			throw('Validator::handle_nodeEvents: ' + e);
		}
	},
	/************************************************************/
	inputnode_updateValidate: function(transport, node){
		try{
			var xmldoc		= transport.responseXML;
			if(xmldoc){
				var xmlroot 	= xmldoc.getElementsByTagName('data').item(0);
				if(xmlroot){
					for(var iNode=0; iNode<xmlroot.childNodes.length; iNode++){
						var xmlnode = xmlroot.childNodes.item(iNode);
						var xmlsibl = xmlnode.childNodes.item(0);
						if(xmlsibl){
							if(xmlnode.nodeName === 'valid'){
								this.getIcon(node).src = xmlsibl.nodeValue.match('true') ? ('http://www.doepunt.nl/validator/Icons/ok.png') : ('http://www.doepunt.nl/validator/Icons/nok.png');
							}else if(xmlnode.nodeName === 'value'){
								$(node).setValue(xmlsibl.nodeValue);
							}else if(xmlnode.nodeName === 'level'){
								$(node).setStyle({'borderColor': 'rgb('+Math.floor( ( 255 * parseInt(xmlsibl.nodeValue)) / 100 )+', '+Math.floor((255 * ( 100 - parseInt(xmlsibl.nodeValue))) / 100)+', '+Math.floor(0)+')'});
							}else if(xmlnode.nodeName === 'alert'){
								alert(xmlsibl.nodeValue);
							}
							this.handle_nodeEvents(node);
						}
					}
				}
			}
		}catch(e){
			throw('Validator::inputnode_updateValidate: ' + e);
		}
	},
	inputnode_updateLookup: function(transport, node, tofill){
		try{
			var arrfill		= tofill.split(';');
			var xmldoc		= transport.responseXML;
			if(xmldoc){
				var xmlroot = xmldoc.getElementsByTagName('data').item(0);
				if(xmlroot){
					var nodeLength = xmlroot.childNodes.length;
					if(200 == transport.status){
						for(var iNode=0; iNode < nodeLength; iNode++){
							var xmlnode = xmlroot.childNodes.item(iNode);
							var xmlsibl = xmlnode.childNodes.item(0);
							var xnode	= $(arrfill[iNode]);
							if(xmlsibl && xnode){
								$(xnode).setValue(xmlsibl.nodeValue);
								$(xnode).focus();
								this.handle_nodeEvents(xnode);
								$(xnode).readOnly=true;
								this.getIcon(xnode).src = 'http://www.doepunt.nl/validator/Icons/ok.png';
							}
						}
					}else if(201 == transport.status){
						for(var iNode=0; iNode < nodeLength; iNode++){
							var xmlnode = xmlroot.childNodes.item(iNode);
							var xnode	= $(arrfill[iNode]);
							if(xnode){
								var backupValue = null;
								if($('tmp_'+arrfill[iNode])){
									backupValue = $F('tmp_'+arrfill[iNode]);
									Element.remove($('tmp_'+arrfill[iNode]));
									$(xnode).disabled=false;
									$(xnode).setStyle({'display':''});
								}
								//
								if(xmlnode.childNodes.length>1){
									var listContainerObject = new Element('SELECT').writeAttribute({'id':'tmp_'+arrfill[iNode], 'class':'text', 'required':'required', 'name':arrfill[iNode]});
									var listObject = new Element('OPTION').writeAttribute({'value':'', 'selected':'selected'}).update('Please select your address...');
									$(listContainerObject).insert({bottom: listObject});
									var listgroupObject = new Element('OPTGROUP');
									$(listContainerObject).insert({bottom: listgroupObject});
									for(var aNode=0; aNode < xmlnode.childNodes.length; aNode++){
										var xmlsibl = xmlnode.childNodes.item(aNode);
										if(xmlsibl.childNodes.length>0){
											var listObject = new Element('OPTION').writeAttribute({'value':xmlsibl.childNodes.item(0).nodeValue}).update(xmlsibl.childNodes.item(0).nodeValue);
											listObject.observe('click', (function(event){
												var element = event.element();
												try{
													this.disabled=true;
													this.setStyle({'display':'none'});
												}catch(e){
													throw('Validator::alternative addressfield: ' + e);
												}
											}).bind($(xnode)));
											listgroupObject.insert({bottom: listObject});
										}
									}
									var listotherObject = new Element('OPTION').writeAttribute({'value':'', 'style':'font-weight:bold;'}).update('Not listed... (enter manually) &gt;&gt;');
									listotherObject.observe('click', (function(event){
										var element = event.element();
										try{
											this.readOnly=false;
											this.disabled=false;
											this.setStyle({'display':'', 'marginLeft':'1px'});
										}catch(e){
											throw('Validator::alternative addressfield: ' + e);
										}
									}).bind($(xnode)));
									$(listContainerObject).insert({bottom: listotherObject});
									$(xnode).insert({before: listContainerObject});
									$(xnode).disabled=true;
									$(xnode).setStyle({'display':'none'});
									$(listContainerObject).focus();
									if(backupValue){
										$(listContainerObject).setValue(backupValue);
									}
								}else{
									var xmlsibl = xmlnode.childNodes.item(0);
									$(xnode).setValue(xmlsibl.nodeValue);
									$(xnode).focus();
									this.handle_nodeEvents(xnode);
									if(xmlsibl.nodeValue!=''){
										$(xnode).readOnly=true;
									}else{
										$(xnode).readOnly=false;
									}
									this.getIcon(xnode).src = 'http://www.doepunt.nl/validator/Icons/ok.png';
								}
							}
						}
					}
				}
			}
		}catch(e){
			throw('Validator::inputnode_updateLookup: ' + e);
		}
	},
	
	inputnode_updatePopulate: function(transport, node, tofill){
		try{
			var arrfill		= tofill.split(';');
			var xmldoc		= transport.responseXML;
			if(xmldoc){
				var xmlroot = xmldoc.getElementsByTagName('data').item(0);
				if(xmlroot){
					if(200 == transport.status){
						for(var iNode=0; iNode < xmlroot.childNodes.length; iNode++){
							var xnode	= $(arrfill[iNode]);
							if(xnode){
								var backupValue = $F(xnode);
								var xmlnode = xmlroot.childNodes.item(iNode);
								if(xmlnode.childNodes.length>0){
									if($(xnode).tagName=='SELECT'){
										while($(xnode).firstChild) {
											$(xnode).removeChild($(xnode).firstChild);
										} 
									}else{
										$(xnode).clear();
									}
									for(var jNode=0; jNode < xmlnode.childNodes.length; jNode++){
										var xmlsubnode = xmlnode.childNodes.item(jNode);
										var xmlsibl = xmlsubnode.childNodes.item(0);
										if(xmlsibl){
											var optionValue = xmlsubnode.getAttribute('value');
											var newOptionElement = new Element('OPTION').writeAttribute({'value':optionValue}).update(xmlsibl.nodeValue);
											$(xnode).insert(newOptionElement);
										}
									}
								}else{
									var xmlsibl = xmlnode.childNodes.item(0);
									if(xmlsibl){
										$(xnode).update(xmlsibl.nodeValue);
									}
								}
								if(backupValue){
									$(xnode).setValue(backupValue);
								}
								$(xnode).focus();
								this.handle_nodeEvents(xnode);
							}
						}
						this.getIcon(node).src = 'http://www.doepunt.nl/validator/Icons/ok.png';
					}
				}
			}
		}catch(e){
			throw('Validator::inputnode_updatePopulate: ' + e);
		}
	},
	/************************************************************/
	isEmptyObjectValue: function(edtId){
		try{
			if($(edtId)){
				if(editorType = $(edtId).readAttribute('editor')){
					var instanceName = $(edtId).identify();
					CKEDITOR.instances[instanceName].updateElement();
				}
				var data = $(edtId).getValue();
				if(data){
					data = data.replace(/^\s+/,'');
					data = data.replace(/\s+$/,'');
				}
				if(		(data === null) ||
						(data === '') ||
						(data === 0) ||
						(data === $(edtId).readAttribute('default')) ||
						(escape(data) === '%3Cbr%20/%3E') ||
						(escape(data) === '%3Cp%3E%0A%09%26nbsp%3B%3C/p%3E')
				  ){
					return true;
				}
			}
		}catch(e){
			throw('Validator::isEmptyObjectValue: ' + e);
		}
		return false;
	}
});
document.observe('dom:loaded', function(){window.Validator = new Validator_engine();});
