document.write('<script language="JavaScript"> \n');
document.write('window.onerror=function(){clickURL=document.location.href;return true;} \n');
document.write('if(!self.clickURL) clickURL=parent.location.href; \n');
document.write('<\/script> \n');

var popWin="width=530,height=400,resizable=1,scrollbars=1";
var commonLoc="&url="+escape(getClickURL())+"&title="+escape(getClickTitle())+"&image="+escape(getClickImage())+"&random="+Math.random()+"&expire="+escape(getClickExpire());


function sendToFriend () {
	window.open('/?action=sendtofriend'+commonLoc+'&image='+escape(getClickImage()),'click',popWin);
	return false;
}

function getClickImage() {
	if (self.clickImage) return clickImage; 
	return "";
}

function getClickURL() {
        if (self.clickURL) return clickURL;
        return document.location.href;
}

function getClickTitle() {
	if (self.clickTitle) return clickTitle;
	return document.title;
}
function getClickExpire() {
	if (self.clickExpire) return clickExpire; 
	return "";
}