//JavaScript - All rights reserved - Copyright by mediaLINK - v5.31/31.05.2004


//-----default-settings
//following if-query to prevent ev. location-attaches on netscape (to adjust, if location-attaches can contain slashes)
if (self.location.href.indexOf("?") > -1){
	filename=self.location.href.substring(self.location.href.lastIndexOf("/")+1,self.location.href.lastIndexOf("?"));
}else{
	filename=self.location.href.substring(self.location.href.lastIndexOf("/")+1,self.location.href.length);
}

rubric = filename.substring(0,2);
subStart = 1;
subEnd = 0;
if (rubric == "EI"){
	subEnd = 4;
}
if (rubric == "BE"){
	subEnd = 9;
}
if (rubric == "DV"){
	subEnd = 3;
}
if (rubric == "WE"){
	subEnd = 4;
}
if (rubric == "ME"){
	subEnd = 1;
}
if (rubric == "IM"){
	subEnd = 4;
}



//-----frame-functions
framesetroot = rubric+".htm";
if (self == top){
	top.location.href = framesetroot;
}



//-----rollover section
if (document.images){
	var imageov = new Array();
	var imageof = new Array();
	
	var subPosOp = new Image ();
	subPosOp.src = "../../any/graphsub/sub_lineOption.gif"
	var subPosOn = new Image ();
	subPosOn.src = "../../any/graphsub/sub_lineSelected.gif"
	
	var subPosBuf = "S00";
	
	//nav sub
	for (var z=subStart; z<=subEnd; z++){
		zz = "0"+z;
		zz = zz.substring(zz.length-2,zz.length);
		imageov['S'+zz] = new Image();
		imageov['S'+zz].src = "../graphsub/sub" + rubric + zz + "ov.gif";
		imageof['S'+zz] = new Image();
		imageof['S'+zz].src = "../graphsub/sub" + rubric + zz + "of.gif";
	}
}


function imgov(i){
	if (document.images){
		document.images[i].src=imageov[i].src;
	}
}

function imgof(i){
	if (document.images){
		if ((i != subPosBuf) || (subPosBuf == "S00")){
			document.images[i].src = imageof[i].src;
		}
	}
}


function imgon(i){
	if (document.images){
		for (var y=subStart; y<=subEnd; y++){
			yy = "0"+y;
			yy = yy.substring(yy.length-2,yy.length);
			if (subPosBuf != "S00"){
				document.images['subP'+subPosBuf].src = subPosOp.src;
				document.images[subPosBuf].src = imageof[subPosBuf].src;
			}
		}
		document.images['subP'+i].src = subPosOn.src;
		document.images[i].src=imageov[i].src;
		subPosBuf = i;
	}
	
}



//------various function
function defocus(t){
	if (t.blur){t.blur()}
}


function initSubMenu(){
	//Standardframeset (no reconstruction)
	if (top.location.href.indexOf(rubric+'.htm') > -1){
		if (filename != "BEsub.htm"){  //not for movie-section
			imgon('S01');
		}
	}
}


function setBEsubMenu(subrubric){
	top.sub.location.href = rubric + subrubric + "sub.htm";
}



