if(top.frames.length > 0) top.location.href=self.location;

// CLIENT
var N4 = false; 
var IE = false; 
var W3C = false;
var init = false;

// change the classes
function doBorder(box,rand)
	{
	// alert(box);
	if(IE && document.all[box])
		{
		if(rand < 1) document.all[box].style.borderBottom ="1px solid #B80F24";
		else document.all[box].style.borderBottom ="1px solid #B80F24";
		}
	if(W3C && document.getElementById(box))
		{
		if(rand < 1) document.getElementById(box).style.borderBottom ="1px solid #B80F24";
		else document.getElementById(box).style.borderBottom ="1px solid #B80F24";
		}
	}
	
var cSection = null;
var cSubsection = null;

var pn = document.location.pathname.substr(1);
var splittedPath = pn.split("/");
cDoc = splittedPath[splittedPath.length-1];
cName = cDoc.split(".");
cSection = cName[0];

function chBg() 
	{
	if(document.layers) 
		{
		N4=true;
		//writetext="";
		}
	if(document.all)
		{
		IE=true;
		}
	if(document.getElementById("menu"))
		{
		W3C=true;
		}
	if(IE && W3C && !document.getElementById("menu"))
		{
		W3C = false;
		}
	else if(IE && W3C && document.getElementById("menu"))
		{
		IE = false;
		}
	//alert(IE +"/"+ W3C +"/"+ N4);
	if((W3C && document.getElementById(cSection)) || (IE && document.all[cSection]))
		{
		doBorder(cSection,0);
		}
	}