FC = {
	addEvent : function (obj, evt, fn){
		if (obj.addEventListener) 
			obj.addEventListener(evt, fn, false);
		else if (obj.attachEvent) 
			obj.attachEvent('on' + evt, fn);
		
		if (obj.getAttribute)
			if (obj.getAttribute('href')) obj.onclick = function(){return false}
			else if (obj.getAttribute('href') && !obj.getAttribute('onclick')) {
				var func = obj.onclick;
				obj.onclick = function(){
					func();
					return false;
			}
		}
	},
	
	addFBLike: function () {
		var parent, div;
		if (parent = document.getElementById("CTAbar")) {
			div = document.createElement('div');
			div.style.cssText = "float:right; padding: 0 0 0 45px; height:40px; margin-top:10px; position:relative; right:20px;";
			div.innerHTML =	'<iframe src="http://www.facebook.com/plugins/like.php?href='+ location.href 
			+'&amp;layout=standard&amp;show_faces=false&amp;width=300&amp;action=recommend&amp;font&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:80px;" allowTransparency="true"></iframe>'
			parent.appendChild(div)
		}
	}
}

FC.addEvent(window, 'load', FC.addFBLike);

