
function inactiveLinks() {

    for (i=0;i<document.getElementsByName('mnuTop').length; i++) {
       document.getElementsByName('mnuTop')[i].className='inactive';
    }

}

function inactiveNotMarkedLinks() {
    var i;

    for (i=0;i<document.getElementsByName('mnuTop').length; i++) {
       if(document.getElementsByName('mnuTop')[i].className !='marked') { document.getElementsByName('mnuTop')[i].className='inactive'; }
    }

}
	
function handleClick(oLink, iMnuLayer) {
	var ret = true;
   	var i;
	inactiveLinks();
	inactiveLinks2();
	oLink.className = 'marked';
     
	for (i=0;i<document.getElementsByName('layermnuSec').length; i++) {
       	{document.getElementsByName('layermnuSec')[i].style.visibility='hidden';}
		}
       	if (iMnuLayer!=-1){
		  {document.getElementsByName('layermnuSec')[iMnuLayer].style.visibility='visible';}
       	}
	return ret;
}

function handleMIn(oLink) {
	inactiveNotMarkedLinks();
	if(oLink.className != 'marked') { oLink.className='active';}
}

var x_oLink = null

function handleMOut(oLink) {
	x_oLink = oLink;
	setTimeout(handleMOutX,200);
}

function handleMOutX() {
	if(x_oLink.className != 'marked') { 
	x_oLink.className='inactive';
	}
}

function inactiveLinks2() {

    for (i=0;i<document.getElementsByName('mnuSec').length; i++) {
       document.getElementsByName('mnuSec')[i].className='inactive2';
    }

}
	
function inactiveNotMarkedLinks2() {

    for (i=0;i<document.getElementsByName('mnuSec').length; i++) {
       if(document.getElementsByName('mnuSec')[i].className !='marked2') { document.getElementsByName('mnuSec')[i].className='inactive2'; }
    }

}

function handleClick2(oLink) {
	var ret = true;
	inactiveLinks2();
	oLink.className = 'marked2';
	return ret;
}

function handleMIn2(oLink) {
	inactiveNotMarkedLinks2();
	if(oLink.className != 'marked2') { oLink.className='active2';}
}

var x_oLink2 = null
function handleMOut2(oLink) {
	x_oLink2 = oLink;
	setTimeout(handleMOutX2,200);
}

function handleMOutX2() {
	if(x_oLink2.className != 'marked2') { 
	x_oLink2.className='inactive2';
	}
}
// laddar frameset
function handleURL(URL,target){
	if (target == '1') { 
		top.frames[1].location = URL 
		//top.frames[3].location = 'blank.asp';
	}
	if (target == '2') { 
		top.frames[2].frames[1].location = URL 
		//top.frames[3].location = 'blank.asp';
	}
	if (target == '3') { 
		top.frames[1].location = 'grey.asp';
		top.frames[2].location = URL;
		//top.frames[3].location = 'blank.asp';
	}
	if (target == '4') { 
		top.frames[1].location = URL
		top.frames[3].location = 'right_hand_toc.asp';
	}
        //Target = 5 used for Steel Reference DB Application
        if (target == '5') { 
                top.frames[1].location = URL
                top.frames[2].location = '../SteelRefDb/introduction.asp';
                top.frames[3].location = '../SteelRefDb/login.asp';
        }       
        //Target = 6 used for Corrosion Tables
        if (target == '6') { 
                top.frames[1].location = URL
                top.frames[2].location = '../corrosion/introduction.asp';
                top.frames[3].location = '../corrosion/right_hand_toc.asp';
        }               
        //Target = 7 used for Physical Tables
        if (target == '7') { 
                top.frames[1].location = URL
                top.frames[2].location = '../corrosion/physical_introduction.asp';
                top.frames[3].location = '../corrosion/right_hand_toc.asp';
        }
}

