	//Init Variables
	
	var NS4, IE4, NS6, doc, doc2, doc3, sty, NSoffset;
	
	//Browser Check
	
	if(document.layers) {
	  doc = "document.";
	  doc2 = ".document";
	  doc3 = "";
	  sty = "";
	  NS4 = true;
	  }
	else if (document.all) {
	  doc = "document.all.";
	  doc2 = "";
	  doc3 = "";
	  sty = ".style";
	  IE4 = true;
	}
	else if (document.getElementById) {
	  doc = "document.getElementById('";
	  doc2 = "')";
	  doc3 = "')";
	  sty = "').style";
	  NS6 = true;
	  NSoffset = 8;
	}	
	
	function getDocObj(elem) {
		var thisObj = eval(doc + elem + doc3);
		return thisObj;
	}	
	
	function showCoords(elem) {
		var thisObj = getDocObj(elem);
		}
//Relate Elements to Page

function placeIt(parent,elem,Loffset,Toffset) {
  var docObj = getDocObj(elem);
  var parentObj = getDocObj(parent);
      
  if (NS4 || NS6) {
    docObj.style.left = ( parseInt(parentObj.offsetLeft) + Loffset + NSoffset) + 'px';
   	docObj.style.top = ( parseInt(parentObj.offsetTop) + Toffset) + 'px';
  } 
  else if(IE4) {
    docObj.style.left = parentObj.offsetLeft + Loffset;
    docObj.style.top = parentObj.offsetTop + Toffset;
  }
}

//mouseover and mouseout color values
var oncolor = "#eeeeee";
var offcolor = "#ffffff";
var linkcolor = '#000000';
var linkoffcolor = '#999999';

function changecolor(divname,idname,state) {
	stopall();
	if (!NS4) {
		var menuObj = eval(doc + divname + sty);
		var menuObj_p1 = eval(doc + divname + '_p1' + sty);
		var idObj = eval(doc + idname + sty);
		if (state == 'on') {
			menuObj.backgroundColor = oncolor;
			menuObj_p1.backgroundColor = oncolor;
			idObj.color = linkcolor;
			menuObj.cursor = "hand";
			menuObj_p1.cursor = "hand";
			window.status = getDocObj(idname).href;			
		} else {
			menuObj.backgroundColor = offcolor;
			menuObj_p1.backgroundColor = offcolor;
			idObj.color = linkoffcolor;
			window.status = '';			
		}
	}
}

function showhide(elem,state,xpos) {
  docObj = eval(doc + elem + sty);
  if (xpos != null) {
  	docObj.left = xpos;
	}
  docObj.visibility = state;
}

var active_sub1 = null;
var active_sub2 = null;
var active_topelem = null;
var active_menuelem = null;

function closeallmenus() {
  if (active_sub1 != null) {
    	showhide(active_sub1,'hidden',null);
  }
  if (active_sub2 != null) {
    	showhide(active_sub2,'hidden',null);
  }
  if(active_menuelem != null) {
	changecolor(active_menuelem,active_menuelem,offcolor);
  }
}

// Menu Close Timeout Variable
var menu_close_timeout = 0;

//Menu Delay
var delay = 200;

//Calls closeallmenus() after delay
function closeall() {
  menu_close_timeout = setTimeout('closeallmenus()',delay);
}

//Stop all timeout functions
function stopall() {
  clearTimeout(menu_close_timeout);
}

function controlSubs(sub1,sub2,menuelem,topelem,xpos) {
  stopall();
  closeallmenus();
  if (sub1 != null) {
    showhide(sub1,'visible',xpos);
    active_sub1 = sub1;
  }
  if (sub2 != null) {
    showhide(sub2,'visible',xpos);
    active_sub2 = sub2;
  }
  if (menuelem != null) {
	changecolor(menuelem,menuelem,oncolor);
	active_menuelem = menuelem;
  }
}

function cellOver(elId,hrefId,bgc,tc) {
  stopall();
  getDocObj(elId).style.background = bgc;
  getDocObj(hrefId).style.color = tc;
  parent.status = getDocObj(hrefId).href;
  getDocObj(elId).style.cursor = 'hand';
}

function cellOff(elId,hrefId,bgc,tc) {
  getDocObj(elId).style.background = bgc;
  getDocObj(hrefId).style.color = tc;
  getDocObj(hrefId).style.textDecoration = 'none';
  parent.status = '';
}

function DL_GetElementLeft(eElement)
{
    if (!eElement && this)                       // if argument is invalid
    {                                            // (not specified, is null or is 0)
        eElement = this;                         // and function is a method
    }                                            // identify the element as the method owner
    
    var nLeftPos = eElement.offsetLeft;          // initialize var to store calculations
    var eParElement = eElement.offsetParent;     // identify first offset parent element  
    while (eParElement != null)
    {                                            // move up through element hierarchy
        nLeftPos += eParElement.offsetLeft;      // appending left offset of each parent
        eParElement = eParElement.offsetParent;  // until no more offset parents exist
    }
    return nLeftPos;                             // return the number calculated
}


function DL_GetElementTop(eElement)
{
    if (!eElement && this)
    {
        eElement = this;
    }

    var nTopPos = eElement.offsetTop;
    var eParElement = eElement.offsetParent;
    while (eParElement != null)
    {
        nTopPos += eParElement.offsetTop;
        eParElement = eParElement.offsetParent;
    }
    return nTopPos;
}	
	
function setColorOn(objName, objNameA, subFlag)
{
  if (subFlag == null) {	
	 var fg = "#ededed";
	 var bg = "#FFFFFF";
  } else {
  	  var fg = "#666666";
	  var bg = "#EDEDED";
	 }

  obj = MM_findObj(objName);
  objA = MM_findObj(objNameA);   
  if (obj.style)
  {
    obj.style.color = fg;
    obj.style.backgroundColor = bg;
  }
  objA = MM_findObj(objNameA);
  if (objA.style)
  {
    objA.style.color = fg;
    objA.style.backgroundColor = bg;
  }  
  obj.style.cursor = "hand";
}		
		
function setColorOff(objName, objNameA, subFlag)
{
  if (subFlag == null) {	
	 var fg = "#ededed";
	 var bg = "#FFFFFF";
  } else {
  	  var fg = "#666666";
	  var bg = "#EDEDED";
	 }
	
  obj = MM_findObj(objName);
  objA = MM_findObj(objNameA);  
  if (obj.style)
  {
    obj.style.color = fg;
    obj.style.backgroundColor = bg;
  }
  objA = MM_findObj(objNameA);
  if (objA.style)
  {
    objA.style.color = fg;
    objA.style.backgroundColor = bg;
  }
}		

function menuLink(objName)
{
  obj = MM_findObj(objName);
  obj.click();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}