
/***********************************************************************
create kmb menu system : hides the section named 'hidden'
************************************************************************/
function kmb_menu_index(ar)
{
var strIDs = '';
for (var i=1;i<=ar.length;i++)
		{
  if ((ar[i].sURL != null) && (ar[i].sName != 'hidden'))
    {
			 strIDs += '<div class="sectionLinks"><a href="' + ar[i].sURL + '">' + ar[i].sName + '</a></div>';
      {
      if (ar[i].pChild)
        {
				strIDs += '<div class="subsectionLinks">'; /* position links within div */
        for (var j=1;j<=ar[i].pChild.length;j++)
          {
          if (ar[i].pChild[j].sURL != null)
            {
            strIDs += '<a href="' + ar[i].pChild[j].sURL + '">' + ar[i].pChild[j].sName + '</a>';
            }
          }
        strIDs += '</div>';
				}
      }
    }
  }
return strIDs
}

/***********************************************************************
FUNCTION : pre-select : selects option with text value selectText from <select> with an id contained in var id.
TARGET : act_order00.html. For select contained in NETQUOTEDEL:PRELIMINARYINFORMATION
CALLED FROM : kmb_primary_checkout.html
************************************************************************/
function selectOption(id, selectText) {
	for( i=0; i < menu.options.length; i++) {
		if( menu.options[i].text == selectText) menu.options[i].selected = true
		else menu.options[i].selected = false
		}
	}
/***********************************************************************
creates manufacurers button
***********************************************************************/
function makeButton(buttonURL){
	var html = '';
	if(buttonURL) {
		html = '<a href="' + buttonURL + '" target="_blank"><img class="addButton" src="kmb_button_spec.png" alt="Manufacturers Product Specifications" width="122" height="18" border="0"></a>';
		}
	return html;
	}
/***********************************************************************
creates Rows For Product Spec Table; data parsed on comma
***********************************************************************/
function tableTitle(tableTitleText){
	var html = '';
	if(tableTitleText) {
		html = '<h3>' + tableTitleText + '</h3>';
		}
	return html;
	}
	
function makeRow2(rowDataText) {
	var html = '';
	var th = '&nbsp';
	var td = '&nbsp';
	if(rowDataText) {
		var dataArray = rowDataText.split("#");
		if(dataArray[0]) th = dataArray[0];
		if(dataArray[1]) td = dataArray[1];
		html = '<tr><th scope="row">' + th + '</th><td>' + td + '</td></tr>';
		}
	return html;
	}
function writeP(text){
	var html = '';
	if(text) {
		html = '<p>' + text + '</p>';
		}
	return html;
	}	
