

//common images that are preloaded on all pages
if (document.images) 
{
	// start of site toolbar
    //behind = new Image();
    //behind.src = "../images/nav/01_behind_off.gif";
    //behind_on = new Image();
    //behind_on.src = "../images/nav/01_behind_on.gif";

	// end of site toolbar
};

// common functions included on each page
function OpenWindow( sURL, iHeight, iWidth, blnResizeable )
{
	var	objRet = window.open( sURL, '', 'height=' + iHeight + ',width=' + iWidth + 'location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=' + (blnResizeable ? 'yes' : 'no'), false );
	return objRet;
}

function setbg( oCtrl, sColor )
{
	if (oCtrl.style)
		oCtrl.style.backgroundColor = sColor;
}

function roll_over(current_name,new_state)
{
	if (document.images)
		document.images[current_name].src = eval(new_state + ".src");
}

function setFirstControlFocus()
{
	var i=0;

	if ( document.forms.length > 0 )
	{
		var frm=document.forms[0];
		if (frm.length > 0 )
		{
			var els = frm.elements;
			if (els != null && els.length)
				while (i < els.length ) 
				{
					switch (els[i].type)
					{
						case "text":
							els[i].focus();
							i=els.length;
					}
					i++;
				}
		}
	}
}



function hilite(e)
{
	if (window.event)	//ie
		e = window.event;

	if (e.type == "mouseover")
		setbg(this,'#ECECEC');
	else
		setbg(this,'#FFFFFF');
}

function pop(url, name, w, h, rs, sb, mn, st, oth) {
var resize = ((rs) ? "resizable="+rs+"," : "");
var scroll = ((sb) ? "scrollbars="+sb+"," : "");
var menu = ((mn) ? "toolbar="+mn+",location="+mn+",menubar="+mn+"," : "");
var sts = ((st) ? ",status="+st+"," : "");

     var popupWin = window.open(url, name, resize + scroll + menu + sts + "width=" + w + ",height=" + h + oth);
     if (document.layers) {
          popupWin.focus();
     }
}

function my_browser(){
	this.dom = (document.getElementById) ? true : false;
	this.ns4 = (document.layers) ? true : false;
	this.ie = (document.all) ? true : false;
	this.ns6 = this.dom && !this.ie
	this.ie4 = this.ie && !this.dom;
	this.opera = (navigator.userAgent.indexOf("Opera") != -1);
	this.mac = (navigator.appVersion.indexOf("Mac") != -1);
	this.macie4 = this.ie4 || this.mac;
	this.dhtml = (this.dom || this.ns4 || this.ie || this.ie4 || this.opera || !this.mac) ? true : false;
	this.dhtml = (this.mac)?false:true;
	return this;
}

var my_bw = new my_browser();

function toggleTable(el,st) {
	var myelement = document.getElementById(el);
	
	if(st == 1){
		if(my_bw.ie){
			myelement.style.display = "inline"
		}else{
			myelement.style.display = "table-cell"
		}
	}else{
		myelement.style.display = "none"	
	}	
}