function get_available_offers(btn, msisdn){
	if (msisdn.match(/^\d+$/ )){
		$.ajax({
			url: "/sms/get_available_offers/"+msisdn+"/",
			type: "POST",
			dataType: "json",
		
			success: function(data){
				if(data.offer_list.length > 0){
					$.each(data.offer_list, function(i,item){
						var cost = new Number(item.PRICEPOINT);
						var offer = '<div class="SubChkCtn"><div class="Chk"><input type="radio" name="offer_id" id="offer_id" value="'+item.OFFERID+'"></div></div><div class="SubDescCtn">'+item.OFFERDISPLAYNAME+'<br>'+item.OFFERDESCRIPTION+'<br>Price : $'+cost.toFixed(2)+' /'+item.CREDITS+' Credits <input type="hidden" name="credits" id="credits" value="'+item.CREDITS+'"></div><div style="clear:both"></div>';
						$("#offer_list").append(offer);
					});
					$("#loading_ajax").hide();
					$(".step2").show("slow");
					$("input:radio").bind("click", function(e){
						$(".Signup").show("slow");
					});
				}else{
					alert("We were unable to find any offers for your cell number.\nPlease verify your phone number.")
					$("#loading_ajax").hide();
					btn.show();
				}
			}
		});
    }else{
        alert("You must enter a valid cell number");
		$("#loading_ajax").hide();
        btn.show();
    }
}	
function valid_phone(phone){
	value = new String(phone);
	return value.replace(/[^0-9]/g, '');
}
function sub_service(service_id){
	return $.ajax({
		url: "/sms/sub_text_service/"+service_id+"/",
		async: false,
		data:"html"
	}).responseText;
}
function unsub_service(service_id){
	return $.ajax({
		url: "/sms/unsub_text_service/"+service_id+"/",
		async: false,
		data:"html"
	}).responseText;
}