var curTD = null;
var curBTN = null;

tabImg = new Object();

tabImg.OFF_LEFT = new Image();
tabImg.OFF_LEFT.src = "images/menu/tab_std-lft.jpg";
tabImg.OFF_MID = new Image();
tabImg.OFF_MID.src = "images/menu/tab_std-bgrnd.jpg";
tabImg.OFF_RIGHT = new Image();
tabImg.OFF_RIGHT.src = "images/menu/tab_std-rgt.jpg";

tabImg.OV_LEFT = new Image();
tabImg.OV_LEFT.src = "images/menu/tab_rol-lft2.jpg";
tabImg.OV_MID = new Image();
tabImg.OV_MID.src = "images/menu/tab_rol-bgrnd2.jpg";
tabImg.OV_RIGHT = new Image();
tabImg.OV_RIGHT.src = "images/menu/tab_rol-rgt2.jpg";

tabImg.DN_LEFT = new Image();
tabImg.DN_LEFT.src = "images/menu/tab_sel-lft.jpg";
tabImg.DN_MID = new Image();
tabImg.DN_MID.src = "images/menu/tab_sel-bgrnd.jpg";
tabImg.DN_RIGHT = new Image();
tabImg.DN_RIGHT.src = "images/menu/tab_sel-rgt.jpg";

mnuImg = new Object();

mnuImg.OFF_LEFT = new Image();
mnuImg.OFF_LEFT.src = "images/menu/sub/tab_std-lft.gif";
mnuImg.OFF_MID = new Image();
mnuImg.OFF_MID.src = "images/menu/sub/tab_std-bgrnd.gif";
mnuImg.OFF_RIGHT = new Image();
mnuImg.OFF_RIGHT.src = "images/menu/sub/tab_std-rgt.gif";

mnuImg.OV_LEFT = new Image();
mnuImg.OV_LEFT.src = "images/menu/sub/tab_rl-lft.gif";
mnuImg.OV_MID = new Image();
mnuImg.OV_MID.src = "images/menu/sub/tab_rl-bgrnd.gif";
mnuImg.OV_RIGHT = new Image();
mnuImg.OV_RIGHT.src = "images/menu/sub/tab_rl-rgt.gif";

mnuImg.DN_LEFT = new Image();
mnuImg.DN_LEFT.src = "images/menu/sub/tab_sel-lft2.gif";
mnuImg.DN_MID = new Image();
mnuImg.DN_MID.src = "images/menu/sub/tab_sel-bgrnd2.gif";
mnuImg.DN_RIGHT = new Image();
mnuImg.DN_RIGHT.src = "images/menu/sub/tab_sel-rgt2.gif";

function tab_Ov(obj) {
	if (tabImg && obj) {
		if (obj.className != "tab_sel") {
			TL = EBI("TL_" + obj.id);
			TR = EBI("TR_" + obj.id);
			TM = obj;
			TL.src = tabImg.OV_LEFT.src;
			TR.src = tabImg.OV_RIGHT.src;
			TM.style.background = "url(" + tabImg.OV_MID.src + ")  bottom repeat-x";
		}
	}
}
function tab_Out(obj) {
	if (tabImg && obj) {
		if (obj.className != "tab_sel") {
			TL = EBI("TL_" + obj.id);
			TR = EBI("TR_" + obj.id);
			TM = obj;
			TL.src = tabImg.OFF_LEFT.src;
			TR.src = tabImg.OFF_RIGHT.src;
			TM.style.background = "url(" + tabImg.OFF_MID.src + ")  bottom repeat-x";
		}
	}
}
function tabS_Ov(obj) {
	if (tabSImg && obj) {
		if (obj.className != "tab_sel") {
			TL = EBI("TSL_" + obj.id);
			TR = EBI("TSR_" + obj.id);
			TM = obj;
			TL.src = tabSImg.OV_LEFT.src;
			TR.src = tabSImg.OV_RIGHT.src;
			TM.style.background = "url(" + tabSImg.OV_MID.src + ")  bottom repeat-x";
		}
	}
}
function tabS_Out(obj) {
	if (tabSImg && obj) {
		if (obj.className != "tabS_sel") {
			TL = EBI("TSL_" + obj.id);
			TR = EBI("TSR_" + obj.id);
			TM = obj;
			TL.src = tabSImg.OFF_LEFT.src;
			TR.src = tabSImg.OFF_RIGHT.src;
			TM.style.background = "url(" + tabSImg.OFF_MID.src + ")  bottom repeat-x";
		}
	}
}
function tab_Dn(obj) {
	if (tabImg && obj) {
		TL = EBI("TL_" + obj.id);
		TR = EBI("TR_" + obj.id);
		TM = obj;
		TL.src = tabImg.DN_LEFT.src;
		TR.src = tabImg.DN_RIGHT.src;
		TM.style.background = "url(" + tabImg.DN_MID.src + ")  bottom repeat-x";
		
		EBI("AHREF_"+obj.id).className = "tab_href_sel"
		obj.className = "tab_sel";
	}
}
function mnu_Dn(obj) {
	if (obj) {
		obj.className = "mnu_btn_sel";
	}
}
function tab_Click(obj) {
	tabLoc = EBI(obj.id).getAttribute("link");
	if (tabLoc!="") {
		document.location = tabLoc;
	}
}
function EBI(objID) {
	if (document.getElementById(objID)) {
		return document.getElementById(objID);
	} else {
		return false;
	}
}
function XMLHttp(formFields, strUrl, httpGET) {
	 var strText = "";
	 var getorpost=(typeof(httpGET)!="undefined" && httpGET==true)? "GET" : "POST";
	 xmlhttp = GetXmlHttpObject();
	 try {
		 if (xmlhttp != null) {
			 xmlhttp.open(getorpost, strUrl, false);
			 xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			 xmlhttp.send(formFields);
			 strText = xmlhttp.responseText;
		 }
	 }catch(ex){}
	 return strText;
}
function GetXmlHttpObject() {
	var xmlHttp;
	if (!window.XMLHttpRequest) {
		try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP.4.0"); return xmlHttp; } catch (ex) {}
		try { xmlHttp = new ActiveXObject("MSXML2.XMLHTTP"); return xmlHttp; } catch (ex){}
		try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); return xmlHttp; } catch (ex) {}
		return null;
	} else	{
		try {xmlHttp = new XMLHttpRequest(); return xmlHttp;} catch(ex) {}
		return null;
	}
}
function setLink(objID) {
    EBI(objID).className = 'rl';
    EBI(objID).onmouseover = null;
}
