/* >>>>>>>>>>>>>>>>>>>>>> tabbed functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>> */
			function tabbedCtl_onload(){
				collecttablinks()
				if(typeof tabobjlinks=="undefined") return;
				expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1].id)
			}
			function expandcontent(cid, aobject){
				if (disabletablinks==1) aobject.onclick=new Function("return false")
				if (document.getElementById){
					highlighttab(aobject)
					if (turntosingle==0){
						if (previoustab!="") 															document.getElementById(previoustab).style.display="none"
						//alert(cid);
						//alert(aobject)
						document.getElementById(cid).style.display="block"
						previoustab=cid
					}
					//alert(document.getElementById(aobject).className);
				}
			}
			function highlighttab(aobject){
				if (typeof tabobjlinks=="undefined") collecttablinks()
				if(typeof tabobjlinks=="undefined") return;
				for (i=0; i<tabobjlinks.length; i++)
					tabobjlinks[i].className=""
				
				//aobject.className="current"
				if (document.getElementById){
					//if(document.getElementById(aobject))
					var x = document.getElementById(aobject).id;  												var mObj = document.getElementById(aobject);
					mObj.className="current";
				}
			}
			function collecttablinks(){
				var tabobj=document.getElementById("tabNav")
				if (tabobj!=null){
					 tabobjlinks=tabobj.getElementsByTagName("A")
						for(i=1;i<=tabobjlinks.length;i++){
							document.getElementById('tab' + i).style.display="none";
						}

				}
				else {
					if (document.getElementById('tab1') ) document.getElementById('tab1').style.display="block"
				}				
			}
			function SetTimerForexpandcontent(cid, aobject){
				timerID=setTimeout("expandcontent('" + cid + "', '" + aobject + "')",200);
			}
			function killTabTimer(){
				clearTimeout(timerID);
				timerID=null;
				//alert('kill')
			}


/* >>>>>>>>>>>>>>>>>>>>>> end tabbed functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>> */

function PopUp(URL)
{
	var day = new Date();
	var id = day.getTime();

	var winl = (screen.width - 500) / 2;
	var wint = (screen.height - 375) / 2;

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375,left =" +  winl + ",top = " + wint + "');");

}
function elementContains(elmOuter, elmInner)
{
  while (elmInner && elmInner != elmOuter)
  {
    elmInner = elmInner.parentNode;
  }
  if (elmInner == elmOuter)
  {
    return true;
  }
  return false;
}

function getPageXY(elm)
{
  var point = { x: 0, y: 0 };
  while (elm)
  {
    point.x += elm.offsetLeft;
    point.y += elm.offsetTop;
    elm = elm.offsetParent;
  }
  return point;
}

function setPageXY(elm, x, y)
{
  var parentXY = {x: 0, y: 0 };

  if (elm.offsetParent)
  {
    parentXY = getPageXY(elm.offsetParent);
  }

  elm.style.left = (x - parentXY.x) + 'px';
  elm.style.top  = (y - parentXY.y) + 'px';
}
