<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML>
<Head>
<Title> new document </title>
<Meta name = "generator" content = "editplus">
<Meta name = "author" content = "">
<Meta name = "keywords" content = "">
<Meta name = "Description" content = "">
</Head>
<Body>
<Script language = "JavaScript">
<! --
Function AddFavorite (Surl, stitle)
{
Try
{
Window. External. AddFavorite (Surl, stitle );
}
Catch (E)
{
Try
{
Window. Sidebar. addpanel (stitle, Surl ,"");
}
Catch (E)
{
Alert ("failed to add to favorites, please add with Ctrl + D ");
}
}
}
Function sethome (OBJ, VRL ){
Try {
OBJ. style. Behavior = 'url (# default # homepage) '; obj. setHomePage (VRL );
}
Catch (e ){
If (window. Netscape ){
Try {
Netscape. Security. privilegemanager. enableprivilege ("universalxpconnect ");
}
Catch (e ){
Alert ("this operation is rejected by the browser! \ N enter "about: config" in the address bar of the browser, press enter \ n, and then
[Signed. Applets. codebase_principal_support] is set to 'true '");
}
VaR prefs =
Components. classes ['@ mozilla.org/preferences-service%1'%.getservice (components. Interfaces. nsiprefbranch );
Prefs. setcharpref ('browser. startup. homepage', VRL );
}
}
}
// -->
</SCRIPT>
<A onclick = "AddFavorite (window. Location, document. Title)"> Add to favorites </a>
<A onclick = "sethome (this, window. Location)"> set as homepage </a>