	/**
	* Find a member
	*/
	function find_username(url)
	{
		popup(url, 760, 570, '_usersearch');
		return false;
	};

	/**
	* New function for handling multiple calls to window.onload and window.unload by pentapenguin
	*/
	window.onload = function()
	{
		for (var i = 0; i < onload_functions.length; i++)
		{
			eval(onload_functions[i]);
		};
	};

	window.onunload = function()
	{
		for (var i = 0; i < onunload_functions.length; i++)
		{
			eval(onunload_functions[i]);
		};
	};

	/**
	* Add-topic Jumpbox Handlers
	*/
	function addtopic_jumpbox_onsubmit(){
		var obj_f=document.forms['addtopicjumpbox'].f_atjb_select;
		var xf=parseInt(obj_f.options[obj_f.selectedIndex].value);
		if(xf==-1){
			document.forms['addtopicjumpbox'].action=location.href;
			return false;
		}else if(xf==4||xf==5||xf==6||xf==7||xf==8||xf==9){
			document.forms['addtopicjumpbox'].action='http://www.annunci-firenze.it/viewforum.php?f='+xf;
		}else{
			document.forms['addtopicjumpbox'].action='http://www.annunci-firenze.it/posting.php?mode=post&f='+xf;
		};
		document.forms['addtopicjumpbox'].submit();
	};

	function addtopic_jumpbox_onchange(forum_id){
		addtopic_jumpbox_onsubmit();
	};

	/**
	* Add-topic Jumpbox Handlers
	*/
	function share_on_fb(){
		var u=location.href;
		var t=document.title;
		window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
		return false;
	};

	/**
	* Google Search Handlers
	*/
	function google_search_onsubmit(){
		var u='http://www.google.it/cse?' + 
			'cx=' + document.forms['cse-search-box'].cx.value + 
			'&ie='+ document.forms['cse-search-box'].ie.value + 
			'&q='+ document.forms['cse-search-box'].q.value + 
			'&sa='+ document.forms['cse-search-box'].sa.value;
		window.open(u,'google_search','');
		return false;
	};

	/**
	* AddThis Settings
	*/
	var addthis_config = {   
		ui_click: true
	};

	/**
	* Print Topic function
	*/
	function print_page(u){
		//var u=location.href;
		//var t=document.title;
		window.open(u,'wprint','toolbar=0,status=0,width=626,height=436');
		return false;
	};

	/**
	* AddTopicBox functions
	*/
	var addtopicbox_loaded = false;
	function showAddTopicBox() {
		if(addtopicbox_loaded == false){
			var oXMLHttpRequest	= new XMLHttpRequest;
			oXMLHttpRequest.open("GET", "http://www.annunci-firenze.it/aggiungi-annuncio-links.html", false); //Synchronous GET XMLHttpRequest
			oXMLHttpRequest.onreadystatechange	= function() {
				if (this.readyState == XMLHttpRequest.DONE) {
					document.getElementById("topicboxcontent").innerHTML = oXMLHttpRequest.responseText;
					document.getElementById('addtopicbox').style.display='block';
					addtopicbox_loaded = true;
				};
			};
			oXMLHttpRequest.send(null);
		}else{
			document.getElementById('addtopicbox').style.display='block';
		};
		return false;
	};
	function old_showAddTopicBox() {
		document.getElementById('addtopicbox').style.display='block';
		return false;
	};
	function hideAddTopicBox(){
		document.getElementById('addtopicbox').style.display='none';
		return false;
	};
