// JavaScript Document

function getURLParameter(name) {
    return unescape(
        (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
    );
}


function shareProduct(id){
	var group = getURLParameter('GroupID');
	var page = getURLParameter('ID');
	var url = location.host+'/default.aspx?ID='+page+'&GroupID='+group+'&ProductID='+id;
	var share = {
	  method: 'stream.share',
	  u: url
	};
        FB.ui(share);
}