function setupBanner()
{
	//var uri = 'http://impit.tradedoubler.com/imp/img/1034855/1201952?' + new String (Math.random()).substring (2, 11);
	//document.getElementById('trade-doubler').innerHTML = '<a href="http://clk.tradedoubler.com/click?p=21663&amp;a=1201952&amp;g=1034855" target="_blank"><img src="'+uri+'" border="0" alt="" /></a>';
}

function setupSideBar(current_page) // da testare su tutti i browser!!1
{	
	// prendi la prima parte dell'url
	var the_host = location.host;
	var current_href = document.location.href;
	
	// fai un fix per le pagine help
	
	var mode = 2; // subdomains
	if (the_host == "www.palple.net"){
		mode = 1;
	} else if (the_host == "localhost"){
		mode = 3;
	} else if (the_host == ""){
		mode = 4;
	}
	
	// aggiungila agli elementi della sidebar
	var all_the_nodes = document.getElementById("side_bar_list").childNodes;
	var newString = document.getElementById("side_bar_list").innerHTML;
	var new_link;
	
	var path_to_uri = current_href.replace(current_page,"");
	var current_href_normalized = current_href.replace("help","index");
	
	var splitted_href;
	var to_be_splitted_href;
	var sublink;
	
	var toDisable;
	
	for (var j=0;j<all_the_nodes.length;j++){
		try {all_the_nodes[j].className} catch(ex) {continue;}
		
		if (all_the_nodes[j].className == "side_bar_list_element_link"){
			if (mode == 2) {to_be_splitted_href = all_the_nodes[j].getAttribute("href",2); splitted_href = to_be_splitted_href.split("/",1); sublink = to_be_splitted_href.replace(splitted_href[0],""); new_link = "http://" + splitted_href[0] + ".palple.net" + sublink;}
			else {new_link = path_to_uri + all_the_nodes[j].getAttribute("href",2);}
			
			all_the_nodes[j].setAttribute("href",new_link);
			
			// vedo se è pagina attuale, allora disabilito il link
			if (current_href_normalized == all_the_nodes[j].getAttribute("href",2)){toDisable = j;}
		}
	}
	
	var disabled_element = document.createElement('span');
	disabled_element.className = "side_bar_list_element_selected";
	disabled_element.innerText = all_the_nodes[toDisable].firstChild.innerHTML;
	
	document.getElementById("side_bar_list").replaceChild(disabled_element,document.getElementById("side_bar_list").childNodes[toDisable]);
}
