function facebookShare(siteTitle) {
    u = location.href.split('.com');
    var mine  = window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u[0]+ '.com') + '&t=' + encodeURIComponent(siteTitle), 'sharer', 'toolbar=0,status=0,width=626,height=436');

    if (!mine) {alert('You have a pop-up blocker that is preventing the share link from opening. Please disable the pop-up blocker and try again');}
	
}

function twitterShare(siteTitle) {
	//u = location.href;
    u = location.href.split('.com');
    var mine = window.open('http://twitter.com/home?status=' + encodeURIComponent(siteTitle) + ' ' + encodeURIComponent(u[0] + '.com'), 'sharer', 'toolbar=1,status=1,width=626,height=436');

    if (!mine) { alert('You have a pop-up blocker that is preventing the share link from opening. Please disable the pop-up blocker and try again'); }
}

function myspaceShare(siteTitle) {
    //u = location.href;
    u = location.href.split('.com');
    var mine = window.open('http://www.myspace.com/Modules/PostTo/Pages/?u=' + encodeURIComponent(u[0] + '.com') + '&t=' + encodeURIComponent(siteTitle), 'sharer', 'toolbar=1,status=1,width=626,height=436');

    if (!mine) { alert('You have a pop-up blocker that is preventing the share link from opening. Please disable the pop-up blocker and try again'); }
}

function triggerShareOmnitureEvent(site, eventName, pageName) {
    //s.pageName = '';
    //s.channel = '';
    s.prop1 = '';
    s.prop2 = '';
    s.prop3 = '';
    s.prop6 = pageName;
    s.events ='event' + eventName;

    s.linkTrackVars = 'events,prop6';
    s.linkTrackEvents = 'event' + eventName;    
    void (s.tl(this, 'o', site));
}

function triggerShareOmnitureEventWithPageName(site, channel, prop_3, prop_4, eventNum) {
    s.pageName =  site;
    s.channel = channel;
    s.prop1 = '';
    s.prop2 = '';
    s.prop3 = prop_3;
    s.prop4 = prop_4;
	s.prop6 = '';
    s.events = eventNum;

    s.linkTrackVars = 'events,prop3,prop4';
    s.linkTrackEvents = eventNum;
    //void (s.tl(this, 'o', site));
	void (s.t());
    s.pageName = '';
    s.channel = '';
    s.prop1 = '';
    s.prop2 = '';
    s.prop3 = '';
    s.prop4 = '';
    s.events = '';

    s.linkTrackVars = '';
    s.linkTrackEvents = '';
}

function verifyPopUp() {
    var mine = window.open('', '', 'width=1,height=1,left=0,top=0,scrollbars=no');
    return setTimeout(checkOpen(mine), 500);
  
}

function checkOpen(mine){
    var popUpsBlocked;
    
    if (mine) {
        mine.close();
        popUpsBlocked = false;
    } 
    else
    {
        popUpsBlocked = true;
    }

    return popUpsBlocked;
}
