<!--
// -----------------------------------------------------------------------------------------
// NavigateCommon.js: Common part of right-hand navigation bar builders
//
// author: Jan Torres        21.08.2002 created for [Integrated Solutions and] Consulting
// update: Heinz Reutersberg 29.09.2005 trimmed down to codebuilding part for all navs
// -----------------------------------------------------------------------------------------

// -- NO EDITING BEYOND THIS LINE -- PLEASE
var bulletLoc = "/sharedfile/image/snbullet.gif";
var spacerLoc = "/sharedfile/image/spacer.gif";
var prevLevel = 0;

NI = N[thisLanguage];

document.write(
  '<table width="100%" border="0" cellspacing="0" cellpadding="0">\n' +
  ' <tr>\n' +
  '   <td><img src="' + spacerLoc + '" border="0" height="1" width="5"></td>\n' +
  '		<td>\n');

for(var i = 0; i < NI.length; i++) {
  iSpacerHeight = 3; // the default
  sHiliteRow = (NI[i].name == thisNaviScreen)? ' bgcolor="#ffffff"': '';
  sLink = containsProtocol(NI[i].link)? NI[i].link:
  				isProduction? ('/page/0,,ref=' + NI[i].link + ',00.html'):
  											('/page/1,,ref=' + NI[i].link + ',00.html');
  if (NI[i].link == "" || NI[i].name == thisNaviScreen) {
  	sLinkOpen  = '';
  	sLinkClose = '';
  }
  else {
  	sLinkOpen  = '<A class="URLMedium" HREF="' + sLink + '" class="textWhatsNew">';
  	sLinkClose = '</A>';
  }


  switch (NI[i].level) {
  case 0:
    if (prevLevel!=0)
      document.write(
        ' <tr>\n' +
        '   <td colspan=3><img src="' + spacerLoc + '" border="0" height="6" width="1"></td>\n' +
        ' </tr>\n' +
        '</table>\n');
    document.write(
      '<table width="100%" border="0" cellspacing="0" cellpadding="4">\n' +
      ' <tr bgcolor="#12569B"><td><font class="ReverseURLLarge" style="font-weight:bold;">' + NI[i].caption + '</font></td></tr>\n' +
      '</table>\n');
    break;

  case 1:
    if (prevLevel==2)
      iSpacerHeight = 6;
    else if (prevLevel==0)
      document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');

    document.write(
      ' <tr>\n' +
      '   <td colspan=3><img src="' + spacerLoc + '" border="0" height="' + iSpacerHeight + '" width="1"></td>\n' +
      ' </tr>\n');

    document.write(
      ' <tr' + sHiliteRow + '>\n' +
      '   <td valign="top">&#160;<img src="' + bulletLoc + '" border="0" height="8" width="8"></td>\n' +
      '   <td colspan="2" border="0" class="textWhatsNew">' +
      		sLinkOpen +
       		'<font style="font-size:9pt; font-weight:' +
        	nullValue(NI[i].style, 'normal') + ';">' + NI[i].caption +
        	'</font>' +
        	sLinkClose +
        	'</td>\n' +
      ' </tr>');
    break;

  default:
    if (prevLevel==0)
      document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
    document.write(
      ' <tr>\n' +
      '   <td colspan="3"><img src="' + spacerLoc + '" border="0" height="' + iSpacerHeight + '" width="1"></td>\n' +
      ' </tr>\n');
    document.write(
      ' <tr' + sHiliteRow + '>\n' +
      '   <td colspan="2" valign="top"><img src="' + spacerLoc + '" border="0" height="4" width="4"><br /></td>\n' +
      '   <td border="0" class="textWhatsNew">' +
      			sLinkOpen +
      			'<font style="font-size:8pt; font-weight: ' +
        		nullValue(NI[i].style, 'normal') + ';">' + NI[i].caption +
        		'</font>' +
        		sLinkClose +
        		'</td>\n' +
      ' </tr>\n');
    break;
  }
  prevLevel = NI[i].level;
}
// The closing ones ...
document.write(
  ' <tr>\n' +
  '   <td colspan=3><img src="' + spacerLoc + '" border="0" height="6" width="1"></td>\n' +
  ' </tr>\n' +
  '</table>\n');

document.write(
  '   <td><img src="' + spacerLoc + '" border="0" height="1" width="5"></td>\n' +
	'		</td>\n' +
  ' </tr>\n' +
  '</table>\n');

function nullValue(aValue, theDefault){
  return((aValue==null)? theDefault: aValue);
}

function containsProtocol(aURL){
  if (aURL.indexOf("http:") == 0) return true;
  if (aURL.indexOf("ftp:") == 0) return true;
  if (aURL.indexOf("mailto:") == 0) return true;
  if (aURL.indexOf("news:") == 0) return true;
  return false;
}
//-->