function ShowHelp(img, title, desc){
	div = document.createElement('div');
	div.id = 'help';
	div.style.display = 'inline';
	div.style.position = 'absolute';
	div.style.width = '300';
	div.style.backgroundColor = '#CFF4FF';
	div.style.border = 'solid 1px #008ACF';
	div.style.padding = '10px';
        div.style.zIndex = '100';
        div.innerHTML = '<div style="padding-left:10; padding-right:5; padding-top:5px;" class="help">' + desc + '</div>';
        if (title)
                div.innerHTML = '<span class="help" style="font-weight:bold;">' + title + '</span>' + div.innerHTML;

	var parent = img.parentNode;
	if(img.nextSibling)
		parent.insertBefore(div, img.nextSibling);
	else
		parent.appendChild(div)
}

function ShowHelp2(img, title, desc){
	div = document.createElement('div');
	div.id = 'help';
	div.style.display = 'inline';
	div.style.position = 'absolute';
	div.style.width = '300';
	div.style.backgroundColor = '#f4f4f4';
	div.style.border = 'solid 1px #ddd';
	div.style.padding = '5px';
        div.style.zIndex = '100';
        div.innerHTML = '<div class="help">' + desc + '</div>';
        if (title)
                div.innerHTML = '<span class="help" style="font-weight:bold;">' + title + '</span>' + div.innerHTML;

	var parent = img.parentNode;
	if(img.nextSibling)
		parent.insertBefore(div, img.nextSibling);
	else
		parent.appendChild(div)
}

function HideHelp(img){
	if ($("#help").length) {
		$("#help").css('display','none');
		setTimeout('RemoveHelp()', 1);
	}
}

function RemoveHelp(){
	$("#help").remove();
}

function socialcommerce_load_image(id, title, url) {
    var img = new Image();

  // wrap our new image in jQuery, then:
  $(img)
    // once the image has loaded, execute this code
    .load(function () {
      // set the image hidden by default
      $(this).hide();

      // with the holding div #loader, apply:
      $('#'+id)
        // remove the loading class (so no background spinner),
        .removeClass('ajax_loader')
        // then insert our image
        .append(this);

      // fade our image in to create a nice effect
      $(this).fadeIn();
    })

    // *finally*, set the src attribute of the new image to our image
    .attr('title', title)
    .attr('src', url);
}
