
//set the bookmark link, where you want(topright,topleft,bottomright,bottomleft)  
var url = window.location;
var title = document.title;

var corner = "norbi";

var os;
if(document.layers)
 os = "n4";
else if(document.getElementById&&!document.all)
 os = "n6";
else if(document.all)
 os = "ie";

function wri()
{
document.write('<div id=ddd style="position: absolute; visibility: visible; top: 5px; left:5px;">');
document.write('<a style="font-size:14px; text-decoration: none;" href="javascript:bookmark(title, url)" title="click here to bookmark this page"><img src="hbookmark/book.gif" alt="Bookmark" border=0"><sup><span style="background-color:seashell; font-size:10px;">H</span></sup></a></div>');
}

function run()
{
 if(os == "ie"){
   pwidth = window.document.body.offsetWidth;
   pheight = window.document.body.offsetHeight;
   stop = document.body.scrollTop;
   sleft = document.body.scrollLeft;
 }else{
   pwidth = window.innerWidth;
   pheight = window.innerHeight;
   stop = window.pageYOffset;
   sleft = window.pageXOffset;
 }

  var dda = document.getElementById('ddd');
  if(corner == "topleft"){
    dda.style.top = (stop+15)+"px";
    dda.style.left = (sleft+15)+"px";  
  }else if(corner == "topright"){
    dda.style.top = (stop)+"px";
    dda.style.left = (sleft+pwidth-70)+"px";  
  }else if(corner == "bottomleft"){
    dda.style.top = (stop+pheight-43)+"px";
    dda.style.left = (sleft+15)+"px";  
  }else if(corner == "bottomright"){
    dda.style.top = (stop+pheight-40)+"px";
    dda.style.left = (sleft+pwidth-110)+"px";
  }else if(corner == "norbi"){
    dda.style.top = (stop+195)+"px";
    dda.style.left = (sleft+238)+"px";  
  }
  setTimeout('run()',5);
}

function bookmark(title,url){
	if(window.sidebar) 
          window.sidebar.addPanel(title,url,"");
  else if(window.sidebar&&window.sidebar.addPanel)
    			window.sidebar.addPanel(title,url,"");
	else if(window.opera && window.print){
          var elem = document.createElement('a');
          elem.setAttribute('href',url);
          elem.setAttribute('title',title);
          elem.setAttribute('rel','sidebar');
          elem.click();
	}
	else if(os == "ie")
          window.external.AddFavorite(url,title);
}
//document.onload = run();
