// Texto Status
window.status=document.title;

// Determina o browser
NS6 = (document.getElementById&&!document.all);
IE = (document.all);
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4");

var objeto = null;
// Caça Objeto pelo nome (div, img etc)
function GetObject(nome){
 if (NS6){objeto=document.getElementById(nome);}
 else if (IE) {objeto=document.all(nome);}
 else if (NS) {objeto=document.layers[nome];}
 return objeto;
}

// Desativa um layer pelo nome
function desativa(nome){
 GetObject(nome);
 if (IE||NS6) {objeto.style.visibility = "hidden";}
 if (NS) {objeto.style.visibility = "hide";}
 return true;
}

// Ativa um layer pelo nome
function ativa(nome){
 GetObject(nome);
 if (IE||NS6) {objeto.style.visibility = "visible";}
 if (NS) {objeto.style.visibility = "show";}
 return true;
}


function bookmarks(tipo){
     var title = document.title;
	 var url = document.location;
	 switch (tipo) {
		case "favoritos":
			if (window.sidebar) window.sidebar.addPanel(title, url,"");
			else if(window.opera && window.print){
				var mbm = document.createElement('a');
				mbm.setAttribute('rel','sidebar');
				mbm.setAttribute('href',url);
				mbm.setAttribute('title',title);
				mbm.click();
			}
			else if(document.all){window.external.AddFavorite(url, title);}

            break;
		case "delicious":
            window.open("http://del.icio.us/post?url=" + url + "&title=" + title, "_blank");
            break;
		case "google":
            window.open("http://www.google.com/bookmarks/mark?op=edit&bkmk=" + url + "&title=" + title, "_blank");
            break;
		case "windowslive":
            window.open("https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url=" + url + "&title=" + title, "_blank");
            break;
		case "myspace":
            window.open("http://www.myspace.com/Modules/PostTo/Pages/?u=" + url +"&t=" +title, "_blank");
            break;
		case "digg":
            window.open("http://digg.com/submit?phase=2&url=" + url + "&title=" + title, "_blank");
            break;
		case "facebook":
            window.open("http://www.facebook.com/sharer.php?u=" + url + "&t=" + title, "_blank");
            break;
		case "yahoo":
            window.open("http://buzz.yahoo.com/submit?submitUrl=" + url + "&submitHeadline=" + title, "_blank");
            break;
		case "twitter":
            window.open("http://twitter.com/home?status=" + title + ":" + url, "_blank");
            break;
		case "gostei":
            window.open("http://gostei.abril.com.br/post/new?u=" + url + "&t=" + title, "_blank");
            break;
        case "blogblogs":
            window.open("http://blogblogs.com.br/my/bookmarks/add?bookmark_url[url]=" + url + "&bookmarking=" + title, "_blank");
            break
    }

}

  
