// JavaScript Document

function CreateBookmarkLink(title) {

 //title = document.title; 

 url = self.location.href;

	if ((window.sidebar) && (window.sidebar.addPanel)) {
      try {
         window.sidebar.addPanel(title,url,''); 
      }
      catch (e) {
         alert(e+'An error occurred when trying to add our tab to your '+
               'Sidebar. This is most likely the result of a known bug '+
               '(see Bugzilla #97016) in some Netscape6/Mozilla versions. '+
               'You should be able to click the add tab link again now '+
               'and it should work properly.\n\n'+
               'If you continue to have problems, try opening your sidebar '+
               'first, and then click the add tab link.');
      }
  } else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		//return true; 
		}
}

function writeBookmarkLink (title) {

 if (window.external) {
  	document.write('&nbsp; &nbsp;  <img src="images/bookmark.gif" align="absmiddle"><a href ="javascript:CreateBookmarkLink(\'' + title + '\')");">add to favorites</a>  &nbsp; &nbsp; '); 
  } else  if (window.sidebar) {
  document.write('&nbsp; &nbsp;  <img src="images/bookmark.gif" align="absmiddle"><a href ="javascript:CreateBookmarkLink(\'' + title + '\')");">bookmark</a>  &nbsp; &nbsp; '); 
 } else if (window.opera && window.print) {	
   //document.write('<a href ="javascript:CreateBookmarkLink()");">Add Bookmark</a>');
 } 
}


function shgu (status) {
	var tmpObj;
	if (tmpObj = document.getElementById('showUrl')) tmpObj.style.display = status == 'show' ? 'none' : 'block';
	if (tmpObj = document.getElementById('hideUrl')) tmpObj.style.display = status == 'show' ? 'block' : 'none';
}

function writeHomePage() {
	if (document.all && navigator.userAgent.toLowerCase().indexOf('msie') != -1){
		
  		document.write('<img src="images/homepage.gif" align="absmiddle"><a href="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'' + self.location.href + '\');">');
  		document.write('make this your homepage</a>  &nbsp; &nbsp; ');
	}
	
}
