function getSubmitURL() {
    return "extcontrol.action";
}

function parasData() {
   var xmlData = ajaxObject.responseXML;
   var root = xmlData.getElementsByTagName("root")[0];
   if ( root != null ) {
        step = getXMLValue( root, "step" );
        var viewstatus = getXMLValue( root, "viewstatus" );
        var view = getXMLNode( root, "view" );
        var select = getXMLNode( root, "select" );
        var info = getXMLNode( root, "info" );
        var pricing = getXMLNode( root, "pricing" );
        var control = getXMLNode( root, "control" );
        var navigation = getXMLNode( root, "navigation" );
        var select2 = getXMLNode( root, "select2" );
        var size = getXMLNode( root, "size" );
        var option = getXMLNode( root, "option" );
        var optionSelect = getXMLNode( root, "optionselect" );
        var sidelite = getXMLNode( root, "sidelite" );
        var paintMatch = getXMLNode( root, "paintmatch" );
        var paintSame = getXMLNode( root, "paintsame" );
        var paintExt = getXMLNode( root, "paintext" );
        var paintInt = getXMLNode( root, "paintint" );
        var colorView = getXMLNode( root, "colorview" );

        if ( control != null ) refreshControl( control );
        if ( pricing != null ) refreshPricing( pricing );
        if ( size != null ) refreshSize( size );

        if ( option != null ) refreshOption( option );
        if ( step == 'CBINFO_FINISH' ) {
            finish();
        }
        else if ( step == 'CBINFO_OPTION' ) {
            if ( optionSelect != null ) {
                showOptionSelect( optionSelect );
                return;
            }
            else {
                overlay( "OFF" );
            }
        }

        if ( view != null ) {
            refreshExtView( view, step, viewstatus );
        }
        else {
            if ( step != 'CBINFO_OPTION' && step != 'CBINFO_FINISH' ) {
                refreshViewstatus( viewstatus );
            }
        }

        if ( select != null ) refreshSelect( select );
        refreshInstructions( step );
        if ( info != null ) refreshInfo( info );
        if ( navigation != null ) refreshStepNavigation( navigation, step );            
        if ( select2 != null ) refreshSelect2( select2 );

        if ( sidelite != null ) refreshSidelite( sidelite );
        if ( paintMatch != null ) refreshPaintMatch( paintMatch );
        if ( paintSame != null ) refreshPaintSame( paintSame );
        if ( paintExt != null ) refreshPaintExt( paintExt );
        if ( paintInt != null ) refreshPaintInt( paintInt );
        if ( colorView != null ) refreshColorView( colorView );
   }
   else {
        location.reload();
   }
//   var elmt = document.getElementById( "load" );
//   elmt.style.visibility = "hidden";
}


function refreshSelect( select ) {
//alert( "select" );
      var result="";
      var title="";
      var fvid = [];
      var fvcode = [];
      var fvname = [];
      var fvimg = [];

      var tab1content = document.getElementById( "ConfigurationContent" );
      var tab2container = document.getElementById( "Configuration2container" );
      var tab2content = document.getElementById( "Configuration2content" );

      var etitle = document.getElementById( "ConfigurationTabTitle" );
      var elmt = document.getElementById( "ConfigurationSelect" );

      title = getXMLValue( select, "title" );
      etitle.innerHTML = title.toUpperCase();

      var fd = getXMLNode( select, "fd" );
      var fdid = getXMLValue( fd, "fdid" );
      var fdcode = getXMLValue( fd, "fdcode" );
      var fdname = getXMLValue( fd, "fdname" );
      var choices = getXMLNodes( fd, "choice" );
      for (var i=0;i<choices.length;i++) {
        fvid[i]= getXMLValue( choices[i], "fvid" );
        fvcode[i]= getXMLValue( choices[i], "fvcode" );
        fvname[i]= getXMLValue( choices[i], "fvname" );
        fvimg[i]= getXMLValue( choices[i], "fvimg" );
      }

      var index;
      if ( step == "CBINFO_CONF" ) {
          tab2container.style.display = "none";
          tab1content.style.height = "340px";

          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
          result += '<tr>';
          result += '<td align="center" valign="middle" class="Blk15px"><span class="BlkBold15px"><br/>';
          result += 'WITH FRAME (PRE-HUNG)</span><br/>Choose with or without brickmold in Step 7</td>';
          result += '</tr>';
          result += '</table>';
          result += '<br/><br/>';

          result += '<table border="0" cellpadding="0" cellspacing="0">';
          result += '<tr>';
          result += '<td width="31" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '310' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ',' + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="11" height="67"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="51" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '100' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="31" height="67"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="70" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '110' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="50" height="67"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="70" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '120' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="49" height="67"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="87" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '130' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="67" height="67"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="90" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '200' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="69" height="67"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="125" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '230' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="105" height="67"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '</tr>';
          result += '</table>';
          result += '<br/><br/>';

          result += '<table border="0" cellpadding="0" cellspacing="0">';
          result += '<tr>';
          result += '<td width="90" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '131' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="66" height="84"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="90" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '132' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="67" height="84"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="90" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '202' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="68" height="84"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="90" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '133' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="67" height="100"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '<td width="90" align="center" valign="bottom" class="Blk15px">';
          if ( ( index = indexOf( fvcode, '204' ) ) >= 0 ) {
            result += '<a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] + '" width="69" height="106"  class="Blk10px" border="0" /></a>';
          }
          result += '</td>';
          result += '</tr>';
          result += '</table>';
      }
      else if ( step == "CBINFO_SWING" ) {
          tab2container.style.display = "none";
          tab1content.style.height = "340px";

          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
  	  result += '<tr>';
  	  result += '<td align="center" valign="middle" height="30" class="BlkBold15px">AS VIEWED FROM THE OUTSIDE</td>';
  	  result += '</tr>';
          result += '</table>';
          result += '<table border="0" cellpadding="0" cellspacing="0" align="center" width="500px">';
  	  result += '<tr>';
          for (var i=0;i<choices.length;i++) {
            if ( i%2 == 0 ) {
                result += '<td width="150" align="center" valign="middle" class="Blk15px"><a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )"><img src="' + rpath + fvimg[i] + '" alt="' + fvname[i] + '" title="' + fvname[i] + '" border="0" /></a></td>';
                result += '<td width="100" align="left" valign="bottom" class="Blk15px">' + fvname[i] + '<br/><br/></td>';
            }
            else {
                result += '<td width="100" align="right" valign="bottom" class="Blk15px">' + fvname[i] + '<br/><br/></td>';
                result += '<td width="150" align="center" valign="middle" class="Blk15px"><a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )"><img src="' + rpath + fvimg[i] + '" alt="' + fvname[i] + '" title="' + fvname[i] + '" border="0" /></a></td>';
            }
            if ( i%2 == 1 && i != choices.length - 1 ) {
                result += "</tr><tr>";
            }
          }        
  	  result += '</tr>';
          result += '</table>';
      }
      else if ( step == "CBINFO_SIZE" ) {
          etitle.innerHTML = '<a href="javascript:MM_showHideLayers(\'content1-2\',\'\',\'hide\')" ><strong>' + title.toUpperCase() + '</strong></a>';

          tab2container.style.display = "none";
          tab1content.style.height = "340px";

          var bgcolor1 = "#dddddd";
          var bgcolor2 = "#dddddd";
          var bgcolor3 = "#dddddd";
          var bgcolor4 = "#dddddd";
          var section1 = "";
          var section2 = "";
          var section3 = "";
          var section4 = "";
          var height;
          for (var i=0;i<choices.length;i++) {
            height = getXMLValue( choices[i], "attrs4" );
            if ( height == '80"' ) {
                section1 += '<tr valign="middle" bgcolor="' + bgcolor1 + '" >';
                section1 += '<td width="6%"  align="center" class="Blk10px"><input type="radio" name="dmsn" onclick="nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )" /></td>';
                section1 += '<td width="27%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs3" ) + ' x ' + getXMLValue( choices[i], "attrs4" ) + '</td>';
                section1 += '<td width="35%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs1" ) + '</td>';
                section1 += '<td width="32%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs2" ) + '</td>';
                section1 += '</tr>';
                if ( bgcolor1 == "#dddddd" ) {
                    bgcolor1 = "#ffffff";
                }
                else {
                    bgcolor1 = "#dddddd";
                }
            }
            else if ( height == '84"' ) {
                section2 += '<tr valign="middle" bgcolor="' + bgcolor2 + '" >';
                section2 += '<td width="6%"  align="center" class="Blk10px"><input type="radio" name="dmsn" onclick="nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )" /></td>';
                section2 += '<td width="27%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs3" ) + ' x ' + getXMLValue( choices[i], "attrs4" ) + '</td>';
                section2 += '<td width="35%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs1" ) + '</td>';
                section2 += '<td width="32%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs2" ) + '</td>';
                section2 += '</tr>';
                if ( bgcolor2 == "#dddddd" ) {
                    bgcolor2 = "#ffffff";
                }
                else {
                    bgcolor2 = "#dddddd";
                }
            }
            else if ( height == '96"' ) {
                section3 += '<tr valign="middle" bgcolor="' + bgcolor3 + '" >';
                section3 += '<td width="6%"  align="center" class="Blk10px"><input type="radio" name="dmsn" onclick="nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )" /></td>';
                section3 += '<td width="27%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs3" ) + ' x ' + getXMLValue( choices[i], "attrs4" ) + '</td>';
                section3 += '<td width="35%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs1" ) + '</td>';
                section3 += '<td width="32%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs2" ) + '</td>';
                section3 += '</tr>';
                if ( bgcolor3 == "#dddddd" ) {
                    bgcolor3 = "#ffffff";
                }
                else {
                    bgcolor3 = "#dddddd";
                }
            }
            else {
                section4 += '<tr valign="middle" bgcolor="' + bgcolor4 + '" >';
                section4 += '<td width="6%"  align="center" class="Blk10px"><input type="radio" name="dmsn" onclick="nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )" /></td>';
                section4 += '<td width="27%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs3" ) + ' x ' + getXMLValue( choices[i], "attrs4" ) + '</td>';
                section4 += '<td width="35%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs1" ) + '</td>';
                section4 += '<td width="32%" align="center" class="BlkBold10px">' + getXMLValue( choices[i], "attrs2" ) + '</td>';
                section4 += '</tr>';
                if ( bgcolor4 == "#dddddd" ) {
                    bgcolor4 = "#ffffff";
                }
                else {
                    bgcolor4 = "#dddddd";
                }
            }
          }  

          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
  	  result += '<tr>';
  	  result += '<td width="15%" height="25" align="center" valign="middle" bgcolor="#999999" class="BlkBold10px" >Door Height</td>';
  	  result += '<td width="5%"  height="25" align="center" valign="middle" bgcolor="#999999" class="BlkBold10px" ></td>';
  	  result += '<td width="23%" height="25" align="center" valign="middle" bgcolor="#999999" class="BlkBold10px" >Nominal Door Size</td>';
  	  result += '<td width="30%" height="25" align="center" valign="middle" bgcolor="#999999" class="BlkBold10px" >Prehung Unit Size</td>';
  	  result += '<td width="27%" height="25" align="center" valign="middle" bgcolor="#999999" class="BlkBold10px" >Rough Opening</td>';
          result += '</tr>';
          if ( section1 != "" ) {
            result += '<tr>';
            result += '<td height="25" ></td>';
            result += '</tr>';            
            result += '<tr>';
            result += '<td align="Center" valign="middle" bgcolor="#ffffff" class="OrangeBold15px">6\'8"<br/>Height</td>';
            result += '<td colspan="4" >';
            result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
            result += section1;
            result += '</table>';
            result += '</td>';
            result += '</tr>';            
          }
          if ( section2 != "" ) {
            result += '<tr>';
            result += '<td height="25" ></td>';
            result += '</tr>';            
            result += '<tr>';
            result += '<td align="Center" valign="middle" bgcolor="#ffffff" class="OrangeBold15px">7\'0"<br/>Height</td>';
            result += '<td colspan="4" >';
            result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
            result += section2;
            result += '</table>';
            result += '</td>';
            result += '</tr>';            
          }
          if ( section3 != "" ) {
            result += '<tr>';
            result += '<td height="25" ></td>';
            result += '</tr>';            
            result += '<tr>';
            result += '<td align="Center" valign="middle" bgcolor="#ffffff" class="OrangeBold15px">8\'0"<br/>Height</td>';
            result += '<td colspan="4" >';
            result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
            result += section3;
            result += '</table>';
            result += '</td>';
            result += '</tr>';            
          }
          if ( section4 != "" ) {
            result += '<tr>';
            result += '<td height="25" ></td>';
            result += '</tr>';            
            result += '<tr>';
            result += '<td align="Center" valign="middle" bgcolor="#ffffff" class="OrangeBold15px"></td>';
            result += '<td colspan="4" >';
            result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
            result += section4;
            result += '</table>';
            result += '</td>';
            result += '</tr>';            
          }
          result += '</table>';
      }
      else if ( step == "CBINFO_STYLE" ) {
          tab1content.style.height = "80px";
          result += '<table width="100%" height="70"  class="style10" >';
          result += '<tr valign="top">';
          var usemap = "";
          for (var index=0;index<choices.length;index++) {
            if ( fvcode[index] == 'U' || fvcode[index] == 'S' ) {
//                usemap = 'usemap="#PaintMap"';
                usemap = 'onmouseover="MM_showHideLayers(\'paintoption\',\'\',\'show\')" onmouseout="MM_showHideLayers(\'paintoption\',\'\',\'hide\')"';   
            }
            else {
                usemap = "";
            }
            if ( getXMLValue( choices[index], "status" ) == "2" ) {  
                   result += '<td height="63" align="left" ><div class="style11" ><a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[index] 
                          + ' )"><img src="' + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index]
                          + '" width="65" height="35" border="0" ' + usemap + ' /><br>' + fvname[index] + '</a></div></td>';
            }
            else {
                   result += '<td height="63" align="left" ><div class="style22" ><img src="' 
                          + rpath + fvimg[index] + '" alt="' + fvname[index] + '" title="' + fvname[index] 
                          + '" width="65" height="35" border="0" ' + usemap + ' /><br>' + fvname[index] + '</div></td>';
            }
          }
          result += '</tr>';
          result += '</table>';

      }
      else if ( step == "CBINFO_GLASS" ) {
          tab2container.style.display = "none";
          tab1content.style.height = "345px";
          var firstImg = "";

          result += '<div id="SignatureCollection" class="Blk15px">';
          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
          result += '<tr>';
          result += '<td width="100%" height="30" align="left" valign="middle" bgcolor="#999999" class="BlkBold10px" ><img src="../images/glass/SignatureSeriesTab.jpg" width="507" height="26" border="0" usemap="#glassmap" /></td>';
          result += '</tr>';
          result += '</table>';
          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
          result += '<tr>';
          result += '<td height="308" align="left" valign="top" class="GrayBold10px"><br />';
          firstImg = "";
          for (var i=0;i<choices.length;i++) {
             if ( getXMLValue( choices[i], "attrs1" ) == "a" ) {
                if ( firstImg == "" ) firstImg = rpath + fvimg[i];
                if ( getXMLValue( choices[i], "status" ) == "2" ) {  
                   result += '<div class="style11" ><a class="style11" '
                       + ' onmouseover="MM_swapImage( \'SignatureDetail\',\'\',\'' + rpath + fvimg[i] + '\' )" '
                       + ' href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )">' + fvname[i] + '</a></div>';
                }
                else {
                   result += '<div class="style22" ><a class="style22" '
                       + ' onmouseover="MM_swapImage( \'SignatureDetail\',\'\',\'' + rpath + fvimg[i] + '\' )" '
                       + ' href="javascript:glassunavailable()">' + fvname[i] + '</a></div>';
                }

             }
          }
          result += '</td>';
          result += '<td width="346" align="left" valign="bottom" class="BlkBold10px" ><img src="' + firstImg + '" name="SignatureDetail" width="346" height="283" id="detail" /></td>';
          result += '</tr>';
          result += '</table>';
          result += '</div SignatureCollection>';

          result += '<div id="DesignerCollection" class="Blk15px">';
          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
          result += '<tr>';
          result += '<td width="100%" height="30" align="left" valign="middle" bgcolor="#999999" class="BlkBold10px" ><img src="../images/glass/DesignerSeriesTab.jpg" width="507" height="26" border="0" usemap="#glassmap" /></td>';
          result += '</tr>';
          result += '</table>';
          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
          result += '<tr>';
          result += '<td height="308" align="left" valign="top" class="GrayBold10px"><br />';
          firstImg = "";
          for (var i=0;i<choices.length;i++) {
             if ( getXMLValue( choices[i], "attrs1" ) == "b" ) {
                if ( firstImg == "" ) firstImg = rpath + fvimg[i];
                if ( getXMLValue( choices[i], "status" ) == "2" ) {  
                   result += '<div class="style11" ><a class="style11" '
                       + ' onmouseover="MM_swapImage( \'DesignerDetail\',\'\',\'' + rpath + fvimg[i] + '\' )" '
                       + ' href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )">' + fvname[i] + '</a></div>';
                }
                else {
                   result += '<div class="style22" ><a class="style22" '
                       + ' onmouseover="MM_swapImage( \'DesignerDetail\',\'\',\'' + rpath + fvimg[i] + '\' )" '
                       + ' href="javascript:glassunavailable()">' + fvname[i] + '</a></div>';
                }

             }
          }
          result += '</td>';
          result += '<td width="346" align="left" valign="bottom" class="BlkBold10px" ><img src="' + firstImg + '" name="DesignerDetail" width="346" height="283" id="detail" /></td>';
          result += '</tr>';
          result += '</table>';
          result += '</div DesignerCollection>';

          result += '<div id="ClearLiteCollection" class="Blk15px">';
          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
          result += '<tr>';
          result += '<td width="100%" height="30" align="left" valign="middle" bgcolor="#999999" class="BlkBold10px" ><img src="../images/glass/ClearLiteTab.jpg" width="507" height="26" border="0" usemap="#glassmap" /></td>';
          result += '</tr>';
          result += '</table>';
          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
          result += '<tr>';
          result += '<td height="308" align="left" valign="top" class="GrayBold10px"><br />';
          firstImg = "";
          for (var i=0;i<choices.length;i++) {
             if ( getXMLValue( choices[i], "attrs1" ) == "c" ) {
                if ( firstImg == "" ) firstImg = rpath + fvimg[i];
                if ( getXMLValue( choices[i], "status" ) == "2" ) {  
                   result += '<div class="style11" ><a class="style11" '
                       + ' onmouseover="MM_swapImage( \'ClearLiteDetail\',\'\',\'' + rpath + fvimg[i] + '\' )" '
                       + ' href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )">' + fvname[i] + '</a></div>';
                }
                else {
                   result += '<div class="style22" ><a class="style22" '
                       + ' onmouseover="MM_swapImage( \'ClearLiteDetail\',\'\',\'' + rpath + fvimg[i] + '\' )" '
                       + ' href="javascript:glassunavailable()">' + fvname[i] + '</a></div>';
                }

             }
          }
          result += '</td>';
          result += '<td width="346" align="left" valign="bottom" class="BlkBold10px" ><img src="' + firstImg + '" name="ClearLiteDetail" width="346" height="283" id="detail" /></td>';
          result += '</tr>';
          result += '</table>';
          result += '</div ClearLiteCollection>';

      }
      else if ( step == "CBINFO_PREPAINT" ) {
          tab2container.style.display = "none";
          tab1content.style.height = "30px";
          result += '<table border="0" cellpadding="0" cellspacing="0" width="100%" rules="cols" bordercolor="#FFFFFF">';
          result += '<tr>';
          result += '<td height="25" width="60%" align="left" valign="middle" class="BlkBold14px">&nbsp;&nbsp;Would you like your door painted?</td>';
          for (var i=0;i<choices.length;i++) {
              result += '<td width="5%" align="left" valign="top" class="Blk14px"><input name="painted" type="radio" class="Blk10px" onclick="nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' ) "/></td><td width="11%" align="left" valign="middle" class="Blk14px">' + fvname[i] + '</td>';
          }
          result += '</tr>';
          result += '</table>';

      }
      elmt.innerHTML = result;

}

function refreshSidelite( select ) {
//alert( "sidelite" );
      var result="";
      var title="";
      var fvid = [];
      var fvcode = [];
      var fvname = [];
      var fvimg = [];

      var fd = getXMLNode( select, "fd" );
      var fdid = getXMLValue( fd, "fdid" );
      var fdcode = getXMLValue( fd, "fdcode" );
      var fdname = getXMLValue( fd, "fdname" );
      var choices = getXMLNodes( fd, "choice" );
      for (var i=0;i<choices.length;i++) {
        fvid[i]= getXMLValue( choices[i], "fvid" );
        fvcode[i]= getXMLValue( choices[i], "fvcode" );
        fvname[i]= getXMLValue( choices[i], "fvname" );
        fvimg[i]= getXMLValue( choices[i], "fvimg" );
      }

      var index;
      result += '<ul>';
      for (var i=0;i<choices.length;i++) {
          result += '<li><a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )"><img src="' + rpath + fvimg[i] + '" alt="' + fvname[i] + '" height="75" border="0" /><br>' + fvcode[i] + '</a></li>';
      }
      result += '</ul>';

      var elmt = document.getElementById( "DS_SDLT_STYL" );
      elmt.innerHTML = result;
}

function refreshInstructions( step ) {
//alert( "default instructions" );
      var result="";

      var elmt = document.getElementById( "instcontent" );
      var elmt2 = document.getElementById( "tab1-2" );

      // default set
//      elmt.style.height = "164px";
//      elmt.style.width = "239px";
      elmt2.style.display = "none";

      if ( step != "CBINFO_PREPAINT" ) {
        MM_showHideLayers(div_PaintMatch,'','hide');
        MM_showHideLayers(div_samePaint,'','hide');
        MM_showHideLayers(div_extPaint,'','hide');
        MM_showHideLayers(div_intPaint,'','hide');
      }

      if ( step == "CBINFO_CONF" ) {
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong>CONFIGURATION<br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'Choose your entryway configuration which is viewed from the outside of your home. These configurations come with a frame (jamb) and attached brickmold*(If applicable).<br/><br/>If you are interested in a door slab (door only/no frame), please call 1-866-280-3133 or email info@featherriverdoor.com.<br/><br/>*Brickmold: A decorative molding around the outside of a door\'s frame. ';
        result += '</td>';
        result += '</tr>';
        result += '</table>';
      }
      else if ( step == "CBINFO_SWING" ) {
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong>SWING &amp; HANDING<br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'Choose how you would like your door to open (Viewed from the outside).<br/><br/>Left Hand Inswing: Hinges on the left. Door opens into your home.<br/>Left Hand Outswing: Hinges on the left, Door opens away from your home.<br/>Right Hand Inswing: Hinges on the right. Door opens into your home.<br/>Right Hand Outswing: Hinges on the right. Door opens away from your home.';
        result += '</td>';
        result += '</tr>';
        result += '</table>';
      }
      else if ( step == "CBINFO_SIZE" ) {
        elmt2.style.display = "block";
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong>DIMENSIONS<br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'It is important to have the correct measurement of the rough opening before installing a new door. Please refer to the diagram to measure your door and openings correctly.<br/><br/>Nominal Door Size: Rounded up door width and height measurement referenced by the Industry (actual Slab and Prehung Size is different).<br/>Ex: Nominal door size: 36"(width) x 80"(height)= Actual slab size: 35-3/4" (width) x 79"(height)<br/>Prehung Unit Size: Measurement of the door/sidelite with frame (jamb).<br/>Rough Opening: Measurement of the opening (width x height) the prehung* door unit is designed to fit into.<br/><br/>*Slab - Door unit without frame(jamb)<br/>*Prehung Door - A door with frame(jamb).';
        result += '</td>';
        result += '</tr>';
        result += '</table>';
      }
      else if ( step == "CBINFO_STYLE" ) {
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong>DOOR SPECS<br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'Choose from Mahogany Woodgrain, Oak Woodgrain, or Smooth Fiberglass. Paint option is available for Oak Woodgrain Unfinished and Smooth Doors.<br/><br/>Choose the Door and/or Sidelite styles. Glass shapes are shaded in white.';
        result += '</td>';
        result += '</tr>';
        result += '</table>';
      }
      else if ( step == "CBINFO_GLASS" ) {
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong>GLASS SPECS<br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'Choose your Glass style and Caming option. Glass names appearing in black are available for the door style you have selected. Roll over the name for a close-up view. <br/>Please note glass styles with same design can vary slightly depending on the size/shape of the glass chosen.<br/><br/>*Caming - metal that holds the glass patterns together. ';
        result += '</td>';
        result += '</tr>';
        result += '</table>';
      }
      else if ( step == "CBINFO_PREPAINT" ) {
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong>PAINTED<br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'Paint option is available with Unfinished Oak Woodgrain and Smooth White doors. Answer each step to finalize your selection from 12 color choices. ';
        result += '</td>';
        result += '</tr>';
        result += '</table>';
      }
      else if ( step == "CBINFO_OPTION" ) {
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong>OPTIONS<br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'Choose various upgrades or options for your door. Each option will be explained in more detail. ';
        result += '</td>';
        result += '</tr>';
        result += '</table>';
      }
      else if ( step == "CBINFO_FINISH" ) {
        result += '<table width="100%" >';
        result += '<tr>';
        result += '<td width="87%" height="20" align="left" valign="top" class="style10"><strong><br />';
        result += '</strong></td>';
        result += '</tr>';
        result += '<tr>';
        result += '<td align="left" valign="top" class="style10">';
        result += 'There are two ways to order your door: <br/>In-Person: Print your final door selection and take it to the nearest Home Depot to complete your order. <br/>Online: click on "PURCHASE" button and your order will be placed through the Home Depot website to complete the transaction. <br/><br/>Use the "HOME VIEW" function to visualize the door in a house most similar to your own home. ';
        result += '</td>';
        result += '</tr>';
        result += '</table>';

      }
      else {
      }
      elmt.innerHTML = result;
}

function refreshSelect2( select ) {
      var result="";
      var title="";
      var fvid = [];
      var fvcode = [];
      var fvname = [];
      var fvimg = [];

      var etitle = document.getElementById( "Configuration2title" );
      var elmt = document.getElementById( "Configuration2select" );
      var tab2container = document.getElementById( "Configuration2container" );
      var tab2content = document.getElementById( "Configuration2content" );

      title = getXMLValue( select, "title" );

      if ( title == "null" ) {
        etitle.innerHTML = "";
        elmt.innerHTML = "";
        return
      }

      var fd = getXMLNode( select, "fd" );
      var fdid = getXMLValue( fd, "fdid" );
      var fdcode = getXMLValue( fd, "fdcode" );
      var fdname = getXMLValue( fd, "fdname" );

      var choices = getXMLNodes( fd, "choice" );
      for (var i=0;i<choices.length;i++) {
        fvid[i]= getXMLValue( choices[i], "fvid" );
        fvcode[i]= getXMLValue( choices[i], "fvcode");
        fvname[i]= getXMLValue( choices[i], "fvname" );
        fvimg[i]= getXMLValue( choices[i], "fvimg" );
      }

      etitle.innerHTML = title.toUpperCase();
      var index;
      if ( step == "CBINFO_STYLE" ) {
          tab2container.style.display = "block";
          tab2container.style.top = "250px";
          tab2content.style.height = "205px";

          result += '<table width="100%" height="203">';
          result += '<tr height="14px" align="left">';
          result += '<td width="72%" align="left" valign="middle" bgcolor="#999999" class="BlkBold12px">Choose Door Style</td>';
          result += '<td width="28%" align="left" valign="middle" bgcolor="#999999" class="BlkBold12px">Choose Sidelite Style</td>';
          result += '</tr>';
          result += '<tr tr height="180px" valign="top">';
          result += '<td align="center" class="whitebg" >';
          result += '<div id="DS_DOOR_STYL" class="BlkBold10px" >';
          if ( fdcode == 'DS_DOOR_STYL' ) {
            result += '<ul>';
            for (var i=0;i<choices.length;i++) {
                result += '<li><a href="javascript:nextAction( ' + rqtControl_FDFV + ','  + fdid + ',' + fvid[i] + ' )"><img src="' + rpath + fvimg[i] + '" alt="' + fvname[i] + '" title="' + fvname[i] + '" height="75" border="0" /><br>' + fvcode[i] + '</a></li>';
            }
          }
          result += '</ul>';
          result += '</div>';
          result += '</td>';
          result += '<td align="center" class="whitebg" >';
          result += '<div id="DS_SDLT_STYL" class="BlkBold10px" >';
          if ( fdcode == 'DS_SDLT_STYL' ) {
            result += '<ul>';
            for (var i=0;i<choices.length;i++) {
                result += '<li><a href="javascript:nextAction( ' + rqtControl_FDFV + ',' + fdid + ',' + fvid[i] + ' )"><img src="' + rpath + fvimg[i] + '" alt="' + fvname[i] + '" title="' + fvname[i] + '" height="75" border="0" /><br>' + fvcode[i] + '</a></li>';
            }
          }
          result += '</ul>';
          result += '</div>';
          result += '</td>';
	  result += '</tr>';
          result += '</table>';
      }
   
      elmt.innerHTML = result;
}


// overload/new design functions
function refreshStepNavigation( navigation, step ) {
      var pages = getXMLNodes( navigation, "page" );

      var result = "";
      var elmt;
// alert( "refreshStepNavigation: " + step );      
      result += '<table align="left" border="0" height="15px" cellpadding="0" cellspacing="0">';
      result += '<tr>';
      result += getNavStep( pages, step, "CBINFO_CONF", "CONFIGURATION", "160px" );
      result += getNavStep( pages, step, "CBINFO_SWING", "SWING &amp; HANDING", "163px" );
      result += getNavStep( pages, step, "CBINFO_SIZE", "DIMENSIONS", "127px" );
      result += getNavStep( pages, step, "CBINFO_STYLE", "DOOR SPECS", "134px" );
      result += getNavStep( pages, step, "CBINFO_GLASS", "GLASS SPECS", "135px" );
      result += getNavStep( pages, step, "CBINFO_PREPAINT", "PAINTED", "90px" );
      result += getNavStep( pages, step, "CBINFO_OPTION", "OPTIONS", "88px" );
      result += getNavStep( pages, step, "CBINFO_FINISH", "FINISH", "64px" );

      result += '</tr>';
      result += '</table>';
      elmt = document.getElementById( "StepNav" );
      elmt.innerHTML = result;

      var ballClass;
      switch ( step ) {
         case "CBINFO_CONF": ballClass = "NumberBall-1";
                  break;
         case "CBINFO_SWING": ballClass = "NumberBall-2";
                  break;
         case "CBINFO_SIZE": ballClass = "NumberBall-3";
                  break;
         case "CBINFO_STYLE": ballClass = "NumberBall-4";
                  break;
         case "CBINFO_GLASS": ballClass = "NumberBall-5";
                  break;
         case "CBINFO_PREPAINT": ballClass = "NumberBall-6";
                  break;
         case "CBINFO_OPTION": ballClass = "NumberBall-7";
                  break;
         case "CBINFO_FINISH": ballClass = "NumberBall-8";
                  break;
         otherwise: ballClass = "";
     }
     ballElmt = document.getElementById( "NumberBall" );
     ballElmt.className = ballClass;
}


function glassunavailable() {
    MM_showHideLayers('notepopup','','visible');
}
