

function InjectFunctions()
{
	if (document.getElementById("breadCrumbs"))
	{
		var body = document.getElementById("breadCrumbs");
		var node = document.createElement("DIV");
		node.id = "pageFunctions";
		node.innerHTML = "<a onclick=\"wopen('/content/printpreview.aspx', 'popup', 575, 700); return false;\" href=\"/content/printpreview.aspx\"><img src=/img/printthis.gif /></a><a onclick=\"wopen('/content/emailpage.aspx', 'popup', 575, 620); return false;\" href=\"/content/emailpage.aspx\"><img src=/img/emailthis.gif /></a>";

		body.parentNode.insertBefore(node, body.nextSibling);
	}
}




var browser = 3;
	if (document.all) browser = 1;	
	if (document.all && document.getElmentById) browser = 3;	

function GetObj(id)
{
	switch(browser)
	{
		case 0:
		case 1:
			return document.all[id];
		break;
		case 2:
			return document[id];
		break;
		case 3:
			return document.getElementById(id);
		break;
	}
}




function ParentGetObj(id)
{
	switch(browser)
	{
		case 0:
		case 1:
			return window.opener.document.all[id];
		break;
		case 2:
			return window.opener.document[id];
		break;
		case 3:
			return window.opener.document.getElementById(id);
		break;
	}
}







/*--------------------------------------------------------------------------*/
/*  Cookie Functions */
/*--------------------------------------------------------------------------*/
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);
}
function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}
function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}
function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function SimpleSetCookie(key, value)
{
	var expdate = new Date ();
	FixCookieDate (expdate); // Correct for Mac date bug - call only once for given Date object!
	expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000));
		SetCookie(key, value, expdate);		
	return true;
}
function SimpleGetCookie(key)
{
	return GetCookie(key);
}





















 function CreateBookmarkLink() {

 title = document.title; 
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

 url = document.location.href + "";
  // Blogger - Replace with <$BlogItemPermalinkURL$> 
  // MovableType - Replace with <$MTEntryPermalink$>
  // WordPress - <?php bloginfo('url'); ?>

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }













function wopen(url, name, w, h)
{
w += 32;
h += 96;
 var win = window.open(url,
  name, 
  'width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=no, ' +
  'status=no, toolbar=no, scrollbars=yes, resizable=yes');
 win.resizeTo(w, h);
 win.focus();
}