// JavaScript Document

function addBookmark(title,url) {
if (window.sidebar) { 
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}


var opened = new Array();

function showhide(id){
	var e = document.getElementById(id);
	if (e && e.style) {
		var s = e.style;
		if(s.display=='none') {
			s.display = 'block';
			opened[opened.length] = id;
		} else {
			s.display = 'none';
			for(x=0; x < opened.length; x++) {
				if(opened[x] == id) {
					delete opened[x];
				}
			}
		}
		
		document.cookie = "opened=" + escape(opened);
	}
}

function GetCookie(sName)
{
  // cookies are separated by semicolons
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    // a name/value pair (a crumb) is separated by an equal sign
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }

  // a cookie with the requested name does not exist
  return null;
}
