/*
 * Baynote Observer for btb.lithium.com
 * Last updated: September 2, 2009
 */
var bn_location_href = window.location.href;
function bn_isNotEmpty(name) {
	return (name != null) && (name != "");
}

function baynote_getUrlParam(name) {
	 var regexS = "[\\?&]"+name+"=([^&#]*)";
	 var regex = new RegExp( regexS, "i" );
	 var pageUrl = baynote_getPageUrl();
	 var results = regex.exec( pageUrl );
	 if( results == null )
	   return "";
	 else
	   return results[1];
}
function baynote_getPageUrl() {
	  var pageUrl = bn_location_href;
	  if ( (typeof(pageUrl) == "undefined") || (pageUrl == null) || (pageUrl == ""))
	    pageUrl = window.location.href;
	  return pageUrl;
}
function bn_setAttrs(){
	var boardName = baynote_getUrlParam("board.id");
	baynote_tag.docAttrs.boardId = boardName;
}
function bn_showObserver() {
	bn_customerId = "bt";
	bn_code = "community";
	var bn_locHref = window.location.href;
	if (bn_locHref.indexOf("https://") == 0) {
		baynote_tag.server = "https://" + bn_customerId + "-" + bn_code + ".baynote.net";
	} else {
		baynote_tag.server = "http://" + bn_customerId + "-" + bn_code + ".baynote.net";
	}
	baynote_tag.customerId = bn_customerId;
	baynote_tag.code = bn_code;
	bn_setAttrs();
	baynote_tag.type = "baynoteObserver";
	baynote_tag.show();
}
if (typeof(baynote_tag)!="undefined") {
	bn_showObserver();
}