function diIt(el)
{
	if(document.getElementById(el+'_abstract'))
		document.getElementById(el+'_abstract').style.display='none';
	if(document.getElementById(el+'_description'))
		document.getElementById(el+'_description').style.display='block';
}

function PopUp(url,name,width,height)
{
	var WindowX = Math.ceil((window.screen.width  - width)/2);
	var WindowY = Math.ceil((window.screen.height - height)/2);
	var extra="toolbar=0,status=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1,width="+width+",height="+height+",left="+WindowX+",top="+WindowY;
	var w=window.open(url,name,extra);
	w.focus();
	return w;
}

function viewPrivacy()
{
	PopUp('http://it.100links.com/privacy_global.php','Privacy',500,300);
}

function viewTerms()
{
	PopUp('http://it.100links.com/terms_global.php','Terms',500,300);
}

function isIE() {
	return (navigator.userAgent.indexOf("MSIE") > -1);
}

function add_bookmark() {
	if (window.sidebar)
		window.sidebar.addPanel(document.title, location.href, '');		// versione FF
	else if (document.all)
		window.external.AddFavorite(location.href, document.title);		// versione IE
	else if (window.opera)												// versione Opera
	{
		var a = document.createElement("A");
		a.rel = "sidebar";
		a.target = "_search";
		a.title = document.title;
		a.href = location.href;
		a.click();
	}
}

function set_homepage(obj) {
	obj.style.behavior = 'url(#default#homepage)';
	if (isIE())
		obj.setHomePage(location.href);
	return false;
}

function pxt(rmx_id)
{
	if( rmx_id )
	{
		var ifr=document.getElementById('ifr_pxt');
		if(ifr)
		{
			var rand=Math.floor(Math.random()*1000000);
			ifr.src='/pxt_redir.php?rmx_id='+rmx_id+'&nocache='+rand;
		}
	}
}
