function inputVal(obj){
	if(obj.defaultValue==obj.value){obj.value=''};
}

NewsLetter = {
	
	request : null,
	
	cadastraEmail : function(email){
		this.requet = new Ajax.Request('./index.php',
					  {
					    method:'post',
					    parameters: {
								email: email, 
								action: 'PER', 
								output: 'PER',
								perAction: 'cadastraNewsLetter'
						},
					    onSuccess:  this.AjaxCadastraOnSuccess,
					    onFailure: this.AjaxCadastraOnFailure
					  });
	},
	
	removeEmail : function(email){
		this.requet = new Ajax.Request('./index.php',
		  {
		    method:'post',
		    parameters: {
					email: email, 
					action: 'PER',
					output: 'PER',
					perAction: 'removeNewsLetter'
			},
		    onSuccess:  this.AjaxRemoveOnSuccess,
		    onFailure: this.AjaxRemoveOnFailure
		  });
	},
	
	AjaxCadastraOnSuccess : function(transport){
		var response = transport.responseText;
		if(response != ''){
			alert(response);
		}
	},
	
	AjaxCadastraOnFailure : function(){
		Alert('Não foi possivel cadastrar seu email, por favor tente mais tarde.');
	},
	
	AjaxRemoveOnSuccess : function(transport){
		var response = transport.responseText;
		if(response != ''){
	    	alert(response);
	    }
	},
	
	AjaxRemoveOnFailure : function(){
		Alert('Não foi possivel remover seu email, por favor tente mais tarde.');
	}
}


if(typeof sIFR == "function"){
//    sIFR.bHideBrowserText = false;
//    sIFR.bFixFragIdBug = false; // not recommended!
//    sIFR.setup();
};

