// Bookmarks v1.0
	var bookmarkssidebar = "true";
	var titlebarspace = 20;
		
	function bookmarksite(title,url){
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
		else if(window.opera && window.print){ // opera
			var elem = document.createElement('a');
			elem.setAttribute('href',url);
			elem.setAttribute('title',title);
			elem.setAttribute('rel','sidebar');
			elem.click();
		} 
		else if(document.all)// ie
			window.external.AddFavorite(url, title);
	}

	function disableTitlebar(){
		titlebarspace = 0;
		doResize();
		var e = document.getElementById('displaytitlebar');
		e.innerHTML = '';
	}
	
	function enableTitlebar(){
		titlebarspace = 20;
		var e = document.getElementById('displaytitlebar');
		e.innerHTML = '<div style="height:20;width:100%;" id="Titlebar"><table style="width:100%;height:20px;" cellpadding="0" cellspacing="0" border="0"><tr><td id="titlebarIcon" width="22"><img src="assets/images/icon-flashb.gif" border="0"></td><td id="titlebarDisplay" class="titlebar">&nbsp;</td></tr></table></div>';
		doResize();
	}
	
	function setTitle(titleid, titlebarTitle, titlebarUrl){
		if (titlebarUrl){
			if (titlebarspace>0)
			{
				document.getElementById('titlebarDisplay').innerHTML = '<td><a href="javascript:bookmarksite(\'' + titlebarTitle + '\', \''+titlebarUrl+'\')" title="Add website \'' + titlebarTitle + '\' into your favorite bookmarks">' + titlebarTitle +'</a> - ' + '<a href=' + titlebarUrl + ' target="_blank" title="Open website \'' + titlebarTitle + '\' into a new window">'+titlebarUrl+'</a>';
				document.getElementById('titlebarIcon').innerHTML = '<td width="22"><a href="http://www.flashbookmarks.com/index.html?bookmarkid=' + titleid + '" target="_blank" title="Open website \'' + titlebarTitle + '\' into a new window to copy and paste the direct url"><img src="assets/images/icon-flashb.gif" border="0"></a></td>'
			}
		}
	}

	function setTitleBlog(titleid, titlebarTitle, titlebarUrl){
		if (titlebarUrl){
			if (titlebarspace>0)
			{
				document.getElementById('titlebarDisplay').innerHTML = '<td><a href="javascript:bookmarksite(\'' + titlebarTitle + '\', \''+titlebarUrl+'\')" title="Add website \'' + titlebarTitle + '\' into your favorite bookmarks">' + titlebarTitle +'</a> - ' + '<a href=' + titlebarUrl + ' target="_blank" title="Open website \'' + titlebarTitle + '\' into a new window">'+titlebarUrl+'</a>';
				document.getElementById('titlebarIcon').innerHTML = '<td width="22"><a href="http://www.flashbookmarks.com/index.html?bookmarkid=' + titleid + '" target="_blank" title="Open website \'' + titlebarTitle + '\' into a new window to copy and paste the direct url"><img src="assets/images/icon-flashb.gif" border="0"></a></td>'
			}
		}
	}

	function show(){
		var e = document.getElementById('overflowcontroler');
		e.style.width='270px';
		var f = document.getElementById('bottomIframe');
		f.style.left = '0px';
	}

	function hideit(){
		var e = document.getElementById('overflowcontroler');
		e.style.width = '20px';
		var f = document.getElementById('bottomIframe');
		f.style.left = '-250px';
	}

	function doSliderbarOnFromSettings() {
		setSidebar("true");
		var e = document.getElementById('overflowcontroler');
		e.style.width='270px'
		var f = document.getElementById('frameContent');
	    f.style.width = ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)-20)+'px';
	}

	function setSidebar(mysidebar){
		if (mysidebar=="true")	{ bookmarkssidebar = "true";} else { bookmarkssidebar = "false";}
	}

	function doSliderbarOn() {
		setSidebar("true");
		var g = document.getElementById('flashframe');
		g.style.width = '20px';
		var f = document.getElementById('frameContent');
		f.style.width = ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)-20)+'px';
		var e = document.getElementById('overflowcontroler');
		e.style.width = '20px';
		var h = document.getElementById('bottomIframe');
		h.style.left = '-250px';

	}

	function doSliderbarOff() {
		setSidebar("false");
		var e = document.getElementById('bottomIframe');
		e.style.left = '0px';
		var f = document.getElementById('frameContent');
	        f.style.width = ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)-270)+'px';
		resetSize();
	}

	function resetSize(){
		var e = document.getElementById('overflowcontroler');
		e.style.width = "270px";
		var f = document.getElementById('frameContent');
        f.style.width = ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)-270)+'px';
	}

	function doResize(){
		if (bookmarkssidebar=="true")
		{
			var f = document.getElementById('frameContent');
			f.style.width = ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)-20)+'px';
		}
		else
		{
			var f = document.getElementById('frameContent');
			f.style.width = ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)-270)+'px';
		}
	}

	window.onresize = doResize;