



function getStyle(inputVal){
	if(inputVal == "Italic" || inputVal == "Bold Italic"){
		return "Italic";
	}else{
		return "Normal";
	}
}
function getWeight(inputVal){
	if(inputVal == "Bold" || inputVal == "Bold Italic"){
		return "Bold";
	}else{
		return "Normal";
	}
}

function reloadNav(){
	}
function SelectItem(newItem){
	if (parent.setSelectedSecondaryID) {
		parent.setSelectedSecondaryID(newItem);
	}else{
		self.location = "goto.asp?LinkType=nav&LPObjID=" + newItem;
	}
}

function getSecUnselectedSpan(index)
{
	var retval = "";
	retval +=  ("<A");
		retval +=  (" HREF=\"javascript:SelectItem(" + NavArray[index].itemID + ")\"");
		retval +=  (" CLASS=\"NoUnderline\"");
		retval +=  (">");
	retval +=  ("<SPAN");
		retval +=  (" CLASS=\"SecUnselectedSpan\"");
		retval +=  (" TITLE=\"" + NavArray[index].desc + "\"");
		retval +=  (" ONMOUSEOVER=\"top.status='" + NavArray[index].desc + "';this.color='" + SecFontSelColor + "';return true;\" ");
		retval +=  (" ONMOUSEOUT=\"top.status='';this.color='" + SecFontColor + "';return true;\" ");
		retval +=  (">");
	retval +=  (NavArray[index].name);
	retval +=  ("</SPAN>");
	retval +=  ("</A>");
	return retval;
}

function getSecUnselectedImage(index)
{
	var retval = "";
	retval += ("<A");
		retval += (" HREF=\"javascript:SelectItem(" + NavArray[index].itemID + ")\"");
		retval += (">");
	retval += ("<IMG");
		retval += (" ONMOUSEOVER=\"top.status='" + NavArray[index].desc + "';return true;\" ");
		retval += (" ONMOUSEOUT=\"top.status='';return true;\"");
		retval += (" SRC=\"navImages/" + NavArray[index].uDisplay + "\"");
		retval += (" WIDTH=\"95\"");
		retval += (" HEIGHT=\"18\"");
		retval += (" VSPACE=\"1\"");
		retval += (" BORDER=\"0\"");
		retval += (" ALT=\"" + NavArray[index].desc + "\"");
		retval += (">");
	retval += ("</A>");
	return retval;
}

function getSecSelectedImage(index)
	{
	var retval = "";
	retval += ("<A");
		retval += (" HREF=\"javascript:SelectItem(" + NavArray[index].itemID + ")\"");
		retval += (">");
			
	retval += ("<IMG");
		retval += (" ONMOUSEOVER=\"top.status='" + NavArray[index].desc + "';return true;\"");
		retval += (" ONMOUSEOUT=\"top.status='';return true;\"");
		retval += (" SRC=\"navImages/" + NavArray[index].sDisplay + "\"");
		retval += (" WIDTH=\"95\"");
		retval += (" HEIGHT=\"18\"");
		retval += (" VSPACE=\"1\"");
		retval += (" BORDER=\"0\"");
		retval += (" ALT=\"" + NavArray[index].desc + "\"");
		retval += (">");
	retval += ("</A>");
	return retval;
	}

function getSecSelectedSpan(index)
	{
	var retval = "";
	retval += ("<A");
		retval += (" HREF=\"javascript:SelectItem(" + NavArray[index].itemID + ")\"");
		retval += (" CLASS=\"NoUnderline\"");
		retval += (">");
			
	retval += ("<SPAN")
		retval += (" CLASS=\"SecSelectedSpan\"");
		retval += (" TITLE=\"" + NavArray[index].desc + "\"");
		retval += (" ONMOUSEOVER=\"top.status='" + NavArray[index].desc + "';return true;\"");
		retval += (" ONMOUSEOUT=\"top.status='';return true;\"");
		retval += (">");
	retval += (NavArray[index].name);
	retval += ("</SPAN>");
	retval += ("</A>");
	return retval;
	}


/* Make sure styles are right */
var SecUnselStyle = getStyle(SecFontStyle);
var SecSelStyle = getStyle(SecFontSelStyle);
var SecUnselWeight = getWeight(SecFontStyle);
var SecSelWeight = getWeight(SecFontSelStyle);
var output = "";

	if (parent){
		if (parent.selectedSecondaryID) {//there is a parent frame get the id from there
			selectedSecondaryID = parent.getSelectedSecondaryID();
		}else{//no parent frame get the id from the page number
			selectedSecondaryID = self.location.pathname.substring(self.location.pathname.lastIndexOf("/")+1,self.location.pathname.lastIndexOf("."));
		}
		if (parent.selectedPrimaryID) {//there is a parent frame get the id from there
			selectedPrimaryID = parent.getSelectedPrimaryID();
		}else{//no parent frame get the Id from the navArray
			for(var i =0; i< navArray.length; i++){
				if (navArray[i].itemID == selectedSecondaryID){
					selectedPrimaryID = navArray[i].myParent;
				}
			}
		}
		
	}

if (!document.layers){
	output += '<' + 'style type="text/css">\n';
	output += '.NoUnderline {text-decoration: none}\n';
	output += '.SecSelectedSpan {color: ' + SecFontSelColor + ';\n';
	output += '		font-family: ' + SecFontFace + ';\n';
	output += '		font-size: ' + SecFontSize + 'px;\n';
	output += '		font-weight: ' + SecSelWeight + ';\n';
	output += '		font-style: ' + SecSelStyle + '}\n';

	output += '.SecUnselectedSpan {color: ' + SecFontColor + ';\n';
	output += '		font-family: ' + SecFontFace + ';\n';
	output += '		font-size: ' + SecFontSize + 'px;\n';
	output += '		font-weight: ' + SecUnselWeight + ';\n';
	output += '		font-style: ' + SecUnselStyle + '}\n';
	output += '</style>\n';
}

output +=  ("<TABLE");
	output +=  (" CELLPADDING=\"0\"");
	output +=  (" CELLSPACING=\"0\"");
	output +=  (" BORDER=\"0\"");
	output +=  (" ALIGN=\"center\"");
	output +=  (" VALIGN=\"top\"");
	output +=  (" WIDTH=\"100%\"");
	output +=  (">");
NavArray = getPartialNav(2, selectedPrimaryID);
for (var i = 0; i < NavArray.length; i++){
	output +=  ("<TR>");
	output +=  ("<TD");
		output +=  (" ALIGN=\"" + SecAlign + "\"");
		output +=  (" WIDTH=\"100%\"");
		output +=  (" HEIGHT=\"20\"");
	output +=  (">");
	if (NavArray[i].itemID == selectedSecondaryID){
		if (SecNavStyle == "Image"){
			/* Selected Image */
			output += getSecSelectedImage(i);
		}else{
			/* Selected Span */
			output +=  ("<TABLE");
			output +=  (" CELLPADDING=\"0\"");
			output +=  (" CELLSPACING=\"0\"");
			output +=  (" BORDER=\"0\"");
			output +=  (" ALIGN=\"center\"");
			output +=  (" VALIGN=\"top\"");
			output +=  (" WIDTH=\"130\"");
			output +=  (">");
			output +=  ("<TR>");
			output +=  ("<TD>");
			output += getSecSelectedSpan(i);
			output += ("</TD>");
			output +=  ("</TR>");
			output +=  ("<TR>");
			output +=  ("<TD>");
			output += ("<img src=\"images/PF_SecNav_GreenRule.gif\" width=\"130\" height=\"17\">");
			output += ("</TD>");
			output +=  ("</TR>");
			output +=  ("</TABLE>");
		}
	}else{
		if (SecNavStyle == "Image"){
			/* Unselected Image */
			output += getSecUnselectedImage(i);
		}else{
			/* Unselected Span */
			output +=  ("<TABLE");
			output +=  (" CELLPADDING=\"0\"");
			output +=  (" CELLSPACING=\"0\"");
			output +=  (" BORDER=\"0\"");
			output +=  (" ALIGN=\"center\"");
			output +=  (" VALIGN=\"top\"");
			output +=  (" WIDTH=\"130\"");
			output +=  (">");
			output +=  ("<TR>");
			output +=  ("<TD>");
			output += getSecUnselectedSpan(i);
			output += ("</TD>");
			output +=  ("</TR>");
			output +=  ("<TR>");
			output +=  ("<TD>");
			output += ("<img src=\"images/PF_SecNav_GreenRule.gif\" width=\"130\" height=\"17\">");
			output += ("</TD>");
			output +=  ("</TR>");
			output +=  ("</TABLE>");
		}
	}
	output +=  ("</TD>");
		output +=  ("</TR>");
	}
output +=  ("<TR>");
output +=  ("<TD");
	output +=  (" HEIGHT=\"100%\"");
	output +=  (">");
output +=  ("&nbsp;");
output +=  ("</TD>");
output +=  ("</TR>");
output +=  ("</TABLE>");
/*if (document.layers) {
	document.NS_SecNav.document.write (output);
}else{*/
	document.write (output);
//}
