/* Browser Sniffer   -  for rollover script */
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion; this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Macin")>-1
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom)
	return this
}
var bw=new lib_bwcheck() //Making browsercheck object

/* Sets defualt status bar message*/
window.defaultStatus="Make-A-Wish Christmas Extravaganza 2004";


/* Preload Rollover images */
function tocItem (name) {
	this.on = new Image();
	this.on.src = "images/" + name + "_o.gif"
	this.off = new Image();
	this.off.src = "images/" + name + ".gif"
}
function toc_new (name) {
	tocItem[name] = new tocItem(name);
}
if (document.images != null) {
	toc_new('bt_make');
	toc_new('bt_ente');
	toc_new('bt_fund');
	toc_new('bt_main_auction');
	toc_new('bt_silent_auction');
	toc_new('bt_ball_2008');
}

/* Rollover functions */
function act (imgName){
	if (document.images) {
		if ((bw.ie4) || (bw.ns6) || (bw.ie5))
			document[imgName].src = tocItem[imgName].on.src
		else{
			image= eval("document.images['"+imgName+"']");
			image.src = tocItem[imgName].on.src;}
	}
}
function inact (imgName){
	if (document.images) {
		if ((bw.ie4) || (bw.ns6) || (bw.ie5))
    		document[imgName].src = tocItem[imgName].off.src
		else{
			image= eval("document.images['"+imgName+"']");
			image.src = tocItem[imgName].off.src;}
	}
}
function xGetElementById(e) {
  if(typeof(e)!="string") return e;
  if(document.getElementById) e=document.getElementById(e);
  else if(document.all) e=document.all[e];
  else if(document.layers) e=xLayer(e);
  else e=null;
  return e;
}


