// amended by Joseph Do, Phil Miller and Maeve Mc Donagh- WestLB Systems London]

	var nawNewWindow;
	var nawContentPopup;
	var currentNavPoint;

	  
   	/*
		Refresh the left navigation to the navigation point
	*/
	function refreshNav (vNavId) {
		if (parent.naw_nav) {
			parent.naw_nav.location = '/net_at_work/CDA/left_navigation/1,,' + vNavId + ',00.html';
		}
	}
	
	/*
		Load the navigation frame to the page
	*/
	function goto_navi(page, lastpoint) {
		parent.frames[1].location.href = page;
	}
	
	/*
		Load the content frame with the page
	*/
	function goto_content(page) {
		parent.frames[2].location.href = page;
	}
	
	/*
		Open a popup with this page
		set the focus to this popup
	*/
	function goto_content_frame(page) {

		nawContentPopup = window.open(page, '','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600');
		
		if(navigator.userAgent.indexOf("MSIE 4.0") == -1) {
  			nawContentPopup.focus();
		} 
	}
	
	/*
		Open a new window with this page
		set the focus to this window
	*/
	function goto_new_window(uri)
	{
		nawNewWindow = window.open(uri,'');
		
		if(navigator.userAgent.indexOf("MSIE 4.0") == -1) {
			nawNewWindow.focus();
		}
	}

	/*
		Expand the navigation with this nav point
		Open the content in the correct target
	*/
	function goto_frameset (left, right, navid, tnw) {
		ChangeImages(navid, 1);
		currentNavPoint=navid;
		goto_navi(left);
		CoreData(tnw, right);
		return;
	}


	/*
		open the content in the specified target (tnw)
	*/
	function CoreData(tnw, right) {
	
		if(tnw == "_nawnew")
		{
			goto_new_window(right);
		}
		else if (tnw != "") {
			goto_content_frame(right);
			return;
		} else {
			goto_content(right);
		}
	}

	/*
	
		Control of the bullet points.
		Look for a navigation point that has the image 
			c_nav_bullet_white.gif
		If there is a navigation point then change the image to
			/netatwork/images/c_nav_bullet_blue.gif
		Then change the image to a white bullet point
	
	*/
	function ChangeImages(navid, level) {
	
		re = /c_nav_bullet_white.gif/;
		for (var i = 0; i < document.images.length; i++) {
			imgvalue = document.images[i].src;
			if (re.test(imgvalue)) {
				document.images[i].src="/netatwork/images/c_nav_bullet_blue.gif";
			}
		}
		if (level != 1) {
			document.images[navid].src = "/netatwork/images/c_nav_bullet_white.gif";
		}
		
		return;
	
	
	}

	/*
		Level 3 navigation point
		Open the content
		Change the image to white for the navid
		set the currentnavpoint to this id
	*/
	function goto_level3(right, left, navid, tnw ){
		
		CoreData(tnw, right);
		var vNav = navid.split('N');
		ChangeImages(navid,0);
		currentNavPoint=vNav[0];
		
				
	}
	
	/*
	
	*/
	function goto_level2(right, left, navid, tnw, lastimage, reload){
		
		CoreData(tnw, right);
		var vNav = navid.split('N');
		
		if (reload !=1 ) {
			ChangeImages(navid,0);
			currentNavPoint=vNav[0];
		} else {
			currentNavPoint=vNav[0];
			var args = left.split('#');
			var leftquery=args[0]+'?reload=0&lastnavpoint='+navid+'#'+args[1];
			goto_navi(leftquery);
		}
				
		
	}

function goto_level3_more (right, left, navid, tnw){
	var vNav = navid.split('N');
	currentNavPoint=vNav[0];
	CoreData(tnw, right);	
	var args = left.split('#');
	var leftquery=args[0]+'?reload=1#'+args[1];
	goto_navi(leftquery);	
}

function trennlinie(){
	document.write("<tr>\n");
	document.write("\t<td colspan=\"2\" bgcolor=\"#000000\">");
	document.write("<img src=\"/netatwork/images/p.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\">");
	document.write("</td>\n");
	document.write("</tr>\n\n");
}

function empty_line(){
	document.write("<tr>\n");
	document.write("\t<td colspan=\"2\" height=\"10\"></td>\n");
	document.write("</tr>\n");
}





function entry_3rd_level_image(navid, label, url, url_navi, imagePath, tnw, language, desc){
	

	document.write("<tr width=100% >");
	document.write("<td>");
	document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" ");
	document.write("background=\"");
	document.write(imagePath);
	document.write("\">");
	document.write("\t<td width=\"100%\" border=\"0\"><nobr>&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"bodytextnav\">");
	document.write("<a href=\"JavaScript:goto_level3('");
	document.write(url); 
	document.write("','"); 
	document.write(url_navi); 
	document.write("','");   
	document.write(navid); 
	document.write("','");  
	document.write(tnw); 
	document.write("');\" class=\"bodytextnav\" title = "); 
	document.write(desc)
	document.write(">");  
	document.write("<img src=\"/netatwork/images/c_nav_bullet_blue.gif\" name=\"");   
	document.write(navid);
	document.write("\" width=\"7\" height=\"7\" alt=\"\" border=\"0\">"); 
	document.write("</a>");
	document.write("&nbsp;\n");
	document.write("\t<a href=\"JavaScript:goto_level3('");
	document.write(url); 
	document.write("','"); 
	document.write(url_navi); 
	document.write("','");   
	document.write(navid); 
	document.write("','");  
	document.write(tnw); 
	document.write("');\" class=\"bodytextnav\" title = "); 
	document.write(desc)
	document.write(">");  
	document.write(label);   
	document.write("</a>\n");
	document.write("\t</span></td></tr>\n");
	document.write("</table></td></tr>\n");
}

function entry_2nd_level_image(navid, label, url, url_navi, imagePath, tnw, language, desc, bullet_image, prevImage, reload){
	
	document.write("<tr width=100% >");
	document.write("<td>");
	document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" ");
	document.write("background=\"");
	document.write(imagePath);
	document.write("\">");
	document.write("\t<td width=\"100%\" border=\"0\" valign=\"middle\" ><nobr>&nbsp;");	
	document.write("<a href=\"JavaScript:goto_level2('");
	document.write(url); 
	document.write("','"); 
	document.write(url_navi); 
	document.write("','");   
	document.write(navid); 
	document.write("','"); 
	document.write(tnw); 
	document.write("','");   
	document.write(prevImage); 
	document.write("','");   
	document.write(reload); 
	if (language == 3){
		document.write("');\" class=\"bodytextnavjp\" title = ");  
	} else {
		document.write("');\" class=\"bodytextnav\" title = ");  
	}
	document.write(desc)
	document.write(">");
	document.write("<img src=\"");
	document.write(bullet_image);
	document.write("\" name=\"");   
	document.write(navid);
	document.write("\" width=\"7\" height=\"7\" alt=\"\" border=\"0\">"); 
	document.write("</a>");	
	document.write("&nbsp;\n"); 
	if (language == 3){
		document.write("<span class=\"bodytextnavjp\">");
	} else {
		document.write("<span class=\"bodytextnav\">");
	}
	document.write("\t<a href=\"JavaScript:goto_level2('");
	document.write(url); 
	document.write("','"); 
	document.write(url_navi); 
	document.write("','");   
	document.write(navid); 
	document.write("','"); 
	document.write(tnw); 
	document.write("','");   
	document.write(prevImage); 
	document.write("','");   
	document.write(reload); 
	if (language == 3){
		document.write("');\" class=\"bodytextnavjp\" title = ");  
	} else {
		document.write("');\" class=\"bodytextnav\" title = ");  
	}
	document.write(desc)
	document.write(">");
	document.write(label);   
	document.write("</a>\n");
	document.write("\t</span></td></tr>\n");
	document.write("</table></td></tr>\n");
}

function entry_2nd_level_more_image(navid, label, url, url_navi, imagePath, tnw, language, desc, bullet_image){
	
	document.write("<tr width=100% >");
	document.write("<td>");
	document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" ");
	document.write("background=\"");
	document.write(imagePath);
	document.write("\">");
	document.write("\t<td width=\"100%\" border=\"0\" valign=\"middle\"><nobr>&nbsp;");	
	document.write("<a href=\"JavaScript:goto_level3_more('");
	document.write(url); 
 	document.write("','");  
	document.write(url_navi);
	document.write("','");   
	document.write(navid); 
	document.write("','");   
	document.write(tnw); 
	if (language == 3){
		document.write("');\" class=\"bodytextboldnavjp\" title = ");   
	} else {
		document.write("');\" class=\"bodytextboldnav\" title = ");  
	}
	document.write(desc)
	document.write(">");
	document.write("<img src=\"");
	document.write(bullet_image);
	document.write("\" name=\"");   
	document.write(navid);
	document.write("\" width=\"7\" height=\"7\" alt=\"\" border=\"0\"></a>&nbsp;\n"); 
	if (language == 3){
		document.write("<span class=\"bodytextboldnavjp\">");
	} else {
		document.write("<span class=\"bodytextboldnav\">");
	}
	document.write("\t<a href=\"JavaScript:goto_level3_more('");
	document.write(url); 
 	document.write("','");  
	document.write(url_navi);
	document.write("','");   
	document.write(navid); 
	document.write("','");   
	document.write(tnw); 
	if (language == 3){
		document.write("');\" class=\"bodytextboldnavjp\" title = ");   
	} else {
		document.write("');\" class=\"bodytextboldnav\" title = ");  
	}
	document.write(desc)
	document.write(">");
	document.write(label);   
	document.write("\n</a>");
	document.write("\t</span></td></tr>\n");
	document.write("</table></td></tr>\n");
}




function entry_1st_level_image(navid, label, url_navi, url_content, imagePath, tnw, language, desc){
	
	document.write("<tr>\n");
	if (language == 3){
		document.write("\t<td height=\"20\" background=\"");
	} else {
		document.write("\t<td height=\"20\" background=\"");
	}
	document.write(imagePath);
	document.write("\">");
	if (language == 3){
		document.write("<nobr><span class=\"nav1jp\"><b>");
	} else {
		document.write("<nobr><span class=\"nav1text\"><b>");
	}
	if (url_navi != "" && url_content != "") {
		document.write("&nbsp;&nbsp;&nbsp;&nbsp;");	
		document.write("<a name=\"" + navid + "\" href=\"JavaScript:goto_frameset('");  
		document.write(url_navi);
		document.write("','");   
		document.write(url_content); 
		document.write("','");  
		document.write(navid); 
		document.write("','");    
		document.write(tnw); 
		if (language == 3){
			document.write("');\" class=\"nav1jp\" title = ");
			
		} else {
			document.write("');\" class=\"nav1text\" title = ");
		}
		document.write(desc)
		document.write(">");

	}
	document.write(label);  
	document.write("</a>");
	document.write("</b></span></nobr></td>\n");
	document.write("</tr>\n");
	
}

