var thisWin;
function newWin(obj,wide,high){
var sw = screen.width;
var sh = screen.height;
var winOpt = "width="+wide+",height="+high+",left=" + 0 + ",top=" + 0 ;
if (thisWin){
		thisWin.close()
	}
thisWin = window.open(obj.href,obj.target,winOpt);
}

function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
} 
function addbookmark() {
	if (document.all && !window.opera) {
		window.external.AddFavorite(location.href, document.title);
		return false;
	} else {
		this.title = document.title;
	}
}
//<![CDATA[
  var addBookmarkObj = {
	init:function() {
	  if(!document.getElementById || !document.createTextNode) return;
	  var cont=document.getElementById('addBookmarkContainer');
	  if(!cont) return;
	  var a=document.createElement('a');
	  a.href=location.href;
	  if(!window.opera) {
		a.onclick=function() {
		  addBookmarkObj.exec(this.href,this.title);
		  return false;
		}
	  }
	  a.rel='sidebar';
	  a.title=document.title;
	  a=cont.appendChild(a);
	  a.appendChild(document.createTextNode('Bookmark This Page'));
	},
	exec:function(url, title) {
	  var isKonq=(isLikelyKonqueror3 && isLikelyKonqueror3());
	  var isMac=(navigator.userAgent.toLowerCase().indexOf('mac')!=-1);
	  var buttonStr = isMac?'Command/Cmd':'CTRL';

	  if(window.external && (!document.createTextNode ||
		(typeof(window.external.AddFavorite)=='unknown'))) {
		  window.external.AddFavorite(url, title); // IE/Win
	  } else if(isKonq) {
		alert('You need to press CTRL + B to bookmark our site.');
	  } else if((window.sidebar &&
		 (navigator.userAgent.toLowerCase().indexOf('firefox')!=-1)) ||
		 (window.opera && opera.buildNumber && !isNaN(opera.buildNumber()))) {
		   void(0); // do nothing here (Firefox or Opera 7+)
	  } else if(window.opera) { // older Opera
		alert('You need to press '+buttonStr+' + T to bookmark our site.');
	  } else if(window.home) { // Netscape, iCab
		alert('You need to press '+buttonStr+' + D to bookmark our site.');
	  } else if(!window.print || isMac) { // IE5/Mac and Safari 1.0
		alert('You need to press Command/Cmd + D to bookmark our site.');    
	  } else {
		alert('In order to bookmark this site you need to do so manually '+
		  'through your browser.');
	  }
	}
  }

  function isLikelyKonqueror3() {
	if(!document.getElementById) return false;
	if(document.defaultCharset || window.opera || !window.print) return false;
	if(window.home) return false;
	if(document.all) return true;
	var likely = 1;
	eval("try{var str=document.all[0].tagName;}catch(err){likely=0;}");
	return likely;
  }

  function dss_addEvent(el,etype,fn) {
	if(el.addEventListener && (!window.opera || opera.version) &&
	(etype!='load')) {
	  el.addEventListener(etype,fn,false);
	} else if(el.attachEvent) {
	  el.attachEvent('on'+etype,fn);
	} else {
	  if(typeof(fn) != "function") return;
	  var tempFunc = el['on'+etype];
	  el['on'+etype] = function() {
		if(typeof(tempFunc) == "function") tempFunc();
		fn();
	  }
	}
  }

  dss_addEvent(window,'load',addBookmarkObj.init);
//]]>
