function ajax_loader(el) { $j(el).html("
"); }
function log(msg){ }
function log_object(obj) { }
var unique_id = new function() { this.counter = 0; this.prefix = "uuid"; this.create = function() { return this.prefix + (++this.counter); }; };
function gg_trackEvent(category, action, label, value) { pageTracker._trackEvent(category,action,label,value); }
function is_valid_email(txt) {
var regex = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
regex = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(txt);
}
function fb_publish(prompt, msg, attached, actionlinks) {
FB.login(function(response) {
if (response.session) {
if (response.perms) {
var data = new Object();
data.method = 'stream.publish';
data.message = msg;
if (attached) {
data.attachment = attached;
}
if (actionlinks) {
data.action_links = actionlinks;
}
data.user_message_prompt = prompt;
FB.ui( data, function(response) {
}
);
} else {
// user is logged in, but did not grant any permissions
}
} else {
// user is not logged in
}
}, {perms:'publish_stream'});
}