function spodelime(url, title) {
	var h=220;
	var w=315;
	var t=screen.height/2-h/2-60;
	var l=screen.width/2-w/2;
	url=encodeURIComponent(url);
	title=encodeURIComponent(title);
	window.open("http://spodelime.com/buttons.php?url="+url+"&title="+title, "_blank", "height="+h+",width="+w+",top="+t+",left="+l+",status=0,toolbar=0,menubar=0,scrollbars=1,location=0,resizable=0");
}

var as=document.getElementsByTagName("a");
for(var i=0; i<as.length; i++) {
	if(as[i].getAttribute("class")=="spodelime" || as[i].getAttribute("id")=="spodelime" || as[i].className=="spodelime") { // IE
		if(as[i].getAttribute("href")!="http://spodelime.com/" || as[i].getAttribute("rel")) alert("spodelime.com: Invalid code!");

		if(typeof(tmp)=="undefined") tmp=as[i].textContent;
		as[i].removeChild(as[i].firstChild);

		if(typeof(s_url)!="undefined") as[i].setAttribute("data-url", s_url); // old API support
		if(typeof(s_title)!="undefined") as[i].setAttribute("data-title", s_title);
		

		var url=(as[i].getAttribute("data-url") ? as[i].getAttribute("data-url") : document.location);
		var title=(as[i].getAttribute("data-title") ? as[i].getAttribute("data-title") : document.title);
		

		as[i].setAttribute("onclick", "spodelime('"+url+"','"+title+"');return(false);");
		if(navigator.userAgent.indexOf("MSIE")!=-1) as[i].onclick=function(){spodelime(url, title);return(false);} 

		
	}
}

