var Location = new function() {
	var urlmodulo="/index.php?mod=location";
	
	this.save = function() {
		var url = urlmodulo+"&exec=submit";
		try {
			var params = Form.serialize("frmMain");
		} catch(e){
			var params = jQuery('#frmMain').serialize();
		}
		var target = 'locationError';

		var ajax = new Ajax.Updater(
			{success: target},
			url,
			{	method: 'post', 
				parameters: params,
				evalScripts: true,
				onComplete: function(res) { 
				},
				onLoading: function(res) { 
					//$(target).innerHTML = "<img src='images/loading.gif'/>"; 
				},
				onFailure: function() { 
					$(target).innerHTML = "An error occurred"; 
				} 
			});
	};
	
	this.newsletter_submit = function(email) {
		//alert("You have successfully subscribed to email messages from Dealtificate.");
		
		try {
		document.singupEmail.newsletter_email.value="";
		} catch(e){
		}
		try {
		document.howworkEmail.newsletter_email.value="";
		} catch(e){
		}
		
		//$("1564").value=email;
		$("Email Address").value=email;
		document.form_newsletter.submit();
	};
	
}
