var ns=window.navigator.appName == "Netscape";
var ie=window.navigator.appName == "Microsoft Internet Explorer";
var nAppVersion = parseFloat(window.navigator.appVersion);
var lIsNS = ns;
if((ns)&&(nAppVersion > 4.9)){
  ie = true;
  ns = false;
}
var result =0;
var nMidInnerWin = 0;
var nMaxWidth = 760;
var nPosition = 0;
var nMenuPosition = 0;
var lFirst = 1;
var aLeftBorder = new Array(4);
var aCenterWidth = new Array(4);
var aHeight = new Array(4);
var result =0;
var nLayer = 0;

aHeight[0] = 228;
aHeight[1] = 247;
aHeight[2] = 186;
aHeight[3] = 205;


aLeftBorder[0] = 213;
aLeftBorder[1] = aLeftBorder[0];
aLeftBorder[2] = aLeftBorder[0];
aLeftBorder[3] = aLeftBorder[0];



aCenterWidth[0] = 181;
aCenterWidth[1] = aCenterWidth[0];
aCenterWidth[2] = aCenterWidth[0];
aCenterWidth[3] = aCenterWidth[0];


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function tmt_findObj(n){
 var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
 x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
 }else{x=document.getElementById(n)}return x;
}
 
 
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;
}


function tmt_DivAlign(nElement,theDiv,nPage){
    //alert('Width :'+document.body.clientWidth+' Height:'+document.body.clientHeight);
	var obj,fun,dw,dh,lw,lh,x,y;
	fun = (document.getElementById) ? "document.getElementById" : "MM_findObj";
	obj = (document.getElementById) ? document.getElementById(theDiv) : MM_findObj(theDiv);
	if(obj){if(document.all){
	dw = document.body.clientWidth;dh = document.body.clientHeight;}
	else{dw = innerWidth;dh = innerHeight;}
	x = (document.layers) ? ".left" : ".style.left";
	y = (document.layers) ? ".top" : ".style.top";
	if ((dw/2) < 330 || nPage == 1)
    {
     hPx = aLeftBorder[nElement];
	 if(lIsNS){
	   hPx = hPx-2;
	 }	
    }else
    {
     nMenuPosition = aCenterWidth[nElement];
     nPosition = (dw/2);
	 hPx=(nPosition-nMenuPosition);
	 if(lIsNS){
	   hPx = hPx-7;
	 }	
    }
	vPx = aHeight[nElement];
	eval(fun+"('"+theDiv+"')"+x+"="+hPx);
	eval(fun+"('"+theDiv+"')"+y+"="+vPx);
	}
}

var ns=window.navigator.appName == "Netscape";
var ie=window.navigator.appName == "Microsoft Internet Explorer";
var nAppVersion = parseFloat(window.navigator.appVersion);

if((ns)&&(nAppVersion > 4.9)){
  ie = true;
  ns = false;
}
var nLayer = "vide";
function show(cLayer,DoIt) { //v3.0
  if(DoIt || ns){
    clearTimeout(result);
    var obj = MM_findObj(cLayer);
    nLayer = cLayer;
    if(ie){
      obj.style.visibility="visible";
    }else{
      obj.visibility="show";
	}
  }
}

function hide() { //v3.0
clearTimeout(result);
  var obj = MM_findObj(nLayer);
  if(ie){
    obj.style.visibility="hidden"; 
  }else{
    obj.visibility="hide";
	}	
}

function closeItTime(DoIt)
{
  if(DoIt || ns){
    result = setTimeout("hide()",1000);
  }
}

function ColorTd(id) 
{
	document.getElementById(id).style.backgroundColor = "#353C91";
	document.getElementById(id).style.color = "#ffffff";
}

function ResetColorTd(id) 
{
	document.getElementById(id).style.backgroundColor = "";
	if(id > 10)
	{
		document.getElementById(id).style.color = "#90C6FB";
	}
}
