
function load_script(url) {

	var head=document.getElementsByTagName('head').item(0);
	var old=document.getElementById('last_id');
	if (old)head.removeChild(old);
	script=document.createElement('script');
	script.src=url;
	script.type='text/javascript';
	script.defer=true;
	script.id='last_id';
	void(head.appendChild(script));
	}

function putcompstat(xdomain) {

	document.write('<a href="http://siteanalytics.compete.com/'+xdomain+'/?metric=uv" target="_blank"><img src="http://grapher.compete.com/'+xdomain+'_uv_310.png" width="310" height="170" /></a>');
/*
	document.write('<h3>Alexa</h3><img src="http://traffic.alexa.com/graph?c=1&u='+xdomain+'&r=6m&y=r&z=3&h=170&w=310&b=FFFFFF" width="310" height="170" />');
*/
	}


function putthmb(xdomain) {
/*
	document.write('<img src="http://images.websnapr.com/?url='+escape('http://'+xdomain)+'&size=S" width="202" height="152" /></a>');
*/
/*
	document.write('<img src="http://images.websnapr.com/?url='+escape('http://'+xdomain)+'&size=T" width="90" height="70" /></a>');
*/

	document.write('<img src="http://open.thumbshots.org/image.pxf?url='+escape('http://'+xdomain)+'" width="120" height="90" /></a>');

	}

function domainvote(id,vote) {

	load_script('/_data/clscripts/domainvote.php?id='+id+'&set='+vote);
	}

function puthsta() {

	tmp=Math.round(Math.random()*1);
	if (tmp==1) {

		document.write('<div class="hsta"><a href="/_data/clscripts/hsta.php"><img src="/_data/img/hm_720x90_02.gif" width="720" height="90" /></a></div>');
		}
	else {

		document.write('<div class="hsta"><a href="/_data/clscripts/hstahg.php"><img src="/_data/img/hostgator754b.gif" width="697" height="55" /></a></div>');
		}


/*
	document.write('<h3>Alexa</h3><img src="http://traffic.alexa.com/graph?c=1&u='+xdomain+'&r=6m&y=r&z=3&h=170&w=310&b=FFFFFF" width="310" height="170" />');
*/
	}

var showprhtmlf=0;
function showprhtml(xdomain) {

	tmp=document.getElementById('xhtmlfs');

	if (showprhtmlf==0) {

		showprhtmlf=1;

		tmp.innerHTML='<textarea rows="3" cols="30" id="xhtmlfsta">&lt;a href="http://www.pagesinventory.com/domain/'+xdomain+'.html"&gt;\n&lt;img src="http://www.pagesinventory.com/pr/'+xdomain+'.png" width="80" height="15" alt="Pagerank" /&gt;\n&lt;/a&gt;</textarea>';

		tmp=document.getElementById('xhtmlfsta');
		tmp.focus();
		tmp.select();
		}
	else {

		showprhtmlf=0;

		tmp.innerHTML='';

		tmp=document.getElementById('xhtmlfsta');
		tmp.focus();
		tmp.select();
		}

	}

function domainstat(id,time,spr,si,sg,ip,xdomain,xlnkin,xlnkout,xhash) {

	load_script('/_data/clscripts/domainstat.php?id='+id+'&time='+time+'&spr='+spr+'&si='+si+'&sg='+sg+'&ip='+ip+'&xdomain='+xdomain+'&xlnkin='+xlnkin+'&xlnkout='+xlnkout+'&hash='+xhash);

	}
