
	queue(function()
	{
		// init tabs
		var els = document.getElementsByTagName('div') ;
		for(var i=0, l=els.length; i<l; i++){
			if(els[i].className.indexOf('tabs') != -1) tabset_init(els[i]) ;
		}
	}) ;
		
	function send_article(title)
	{
		var body	= 'I thought you might be interested in this article on Italia! Magazine:\n\n' + title + ' - ' + location.href + '\n\n' ;
		var subject	= 'Italia! Magazine - ' + title ;	
		location.href = 'mailto:?subject=' + escape(subject) + '&body=' + escape(body) ;
	}

	function write_bookmark_link()
	{		
		if(window.external || window.sidebar){
			document.write('<a href="#" onclick="bookmark();return false;">Bookmark</a>') ;
		}
	}
	
	function bookmark()
	{
		if(window.external.AddFavorite)	window.external.AddFavorite(location.href, document.title) ;
		else if(window.sidebar)		window.sidebar.addPanel(document.title, location.href, '') ; //ff
	}

	function bookmark_with(a)
	{
		window.focus() ; // so not to leave focus on link
		if(window.open){
			try {
				var url		= a.href ;
				var width	= 600 ;
				var height	= 450 ;
				var name	= 'bookmark' ;
				var left		= (screen.width - width)/2 ;
				var top		= (screen.height - height - 100)/2 ;
				var tools	= 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',resizable=yes,scrollbars=yes,toolbar=no,location=no' ;
				var popup	= window.open(url, name, tools) ;
				popup.focus() ;
				return false ;
			} catch(e){}
		}
		return true ;
	}

	function show_map()
	{
		Dialog.info($('map-overlay-contents').innerHTML, {width:415, height:440});
	}
