﻿// 
function Twitter() 
{
    u = location.href;
    t = document.title;
    window.open("http://twitter.com/home?status=" + encodeURIComponent(u));
 }

function Facebook() 
{
    u = location.href;
    t = document.title;
    window.open("http://www.facebook.com/share.php?u=" + encodeURIComponent(u) + "&t=" + encodeURIComponent(t));
}
function Banbe() 
{
    u = location.href;
    t = document.title;
    window.open("http://plugins.banbe.net/share/post?href=" + encodeURIComponent(u) + " &title=" + encodeURIComponent(t) + "&amp;feed_img=http://bacsigiadinh.com/Content/Images/Sys/Logo.png");
}
function linkhay() 
{
    window.open('http://linkhay.com/submit?link_url='+location.href);
}

function ZingMe() 
{
    u = location.href;
    t = document.title;
    window.open("http://link.apps.zing.vn/pro/view/conn/share?u=" + encodeURIComponent(u) + "&amp;t=" + encodeURIComponent(t) + "&amp;desc=Tá»« laisuat.vn");
}
function MySpace() 
{
	u = location.href;
    window.open('http://www.myspace.com/Modules/PostTo/Pages/?u='+encodeURIComponent(u));
}
function Google() 
{
    u = location.href;
    t = document.title;
    window.open("http://www.google.com/bookmarks/mark?op=edit&bkmk=" + encodeURIComponent(u) + "&title=" + t + "&annotation=" + t);
 }
 
function Buzz() 
{
    u = location.href;
    t = document.title;
    window.open("http://buzz.yahoo.com/buzz?publisherurn=DanTri&targetUrl=" + encodeURIComponent(u));
}

function setHomepage()
{
     if (document.all)
        {
            document.body.style.behavior='url(#default#homepage)';
            document.body.setHomePage('http://www.laisuat.vn');
        }
        else if (window.sidebar)
        {
//            if(window.netscape)
//            {
//                 try
//                 {  
//                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
//                 }  
//                 catch(e)  
//                 {  
//                    alert(" 1 Trình duyệt này không hỗ trợ đặt làm trang chủ");  
//                 }
//            } 
            var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
            prefs.setCharPref('browser.startup.homepage','http://www.laisuat.vn');
        }
}
//javascript:setDefaultHomePage()
