// Copyright 2000 by CS Traducoes (TM)
// DO NOT use for any purpose without explicitly permit
// web site : http://www.cstraducoes.pt/

//---Reloads the window if Nav4 resized
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);


//------Manage the document elements  (compatible with all browser)
//"getElementById" compatible with all browser
function extGetElementById(elt_name,doc)
{	if(doc.layers) return doc.layers[elt_name];
	if(doc.all && !doc.getElementById) return doc.all[elt_name];
	if(doc.all && doc.getElementById) return doc.getElementById(elt_name);
	if(!doc.all && doc.getElementById) return doc.getElementById(elt_name);
	return false;
}
//change the Class of an element
function changeClassOfElementById(elt_name,doc,className)
{	var txtObj = extGetElementById(elt_name,doc);
	if (txtObj) txtObj.className = className;
}
//hide or unhide an element
function hideUnhideElementById(elt_mane,doc,hideShow)
{	var txtObj = extGetElementById(elt_mane,doc);
	if (txtObj && hideShow) txtObj.style.visibility = "hidden";
	if (txtObj && ! hideShow) txtObj.style.visibility = "visible";
}


//------New window
var newWinTemp = 0;
function openNewWindow(urlWin,nameWin,wi,he,tb,mb,sb,lo,st,di,rz,ch)
{	var pW = "toolbar="+((tb)?(tb):("0"))+",menubar="+((mb)?(mb):("0"))+",scrollbars="+((sb)?(sb):("0"))+",location="+((lo)?(lo):("0"))+",status="+((st)?(st):("0"))+",directories="+((di)?(di):("0"))+",resizable="+((rz)?(rz):("0"))+",copyhistory="+((ch)?(ch):("0"))+",width="+((wi)?(wi):("100"))+",height="+((he)?(he):("100"));
	newWinTemp = window.open(urlWin,nameWin,pW);
	newWinTemp.focus();
	return;
}
function closeNewWindow()
{	if (newWinTemp!="" && newWinTemp!=0 && newWinTemp.closed==false) newWinTemp.close();
	newWinTemp = 0;
	return true;
}
