<!--
// ######## AOL \/ (heavily modified file)
// Object Renderer

function Build_MQuestionValues ( question )
{
  var s = '<table bgcolor="#D5EAE6" border="0" width="100%" cellspacing="0" cellpadding="0">' ;
  var i , ss , sss ;
  var curVal = GetAnswerValue ( question . id ) ;
  for ( i = 0 ; i < question.values.length ; i++ )
  {
    if ( question.values[i].id == curVal )
      sss = 'checked="checked" ' ;
    else
      sss = '' ;
    if ( curVal != 0 )
      sss += 'disabled="yes" ' ;
    ss = '<tr class="value">' +
           '<td width="10%">' +
             '&nbsp;' +
           '</td>' +
            '<td width="85%">' +
	      '<input name="v' + question.id + '" type="radio" value="' + question.values[i].id +'" ' + sss + '/>&nbsp;' ;
    if ( curVal == 0 )
      ss +=   '<a class="vqa" href="javascript:parent.RadioSet(' + question.id + ',' + question.values[i].id + ');">' ;
    ss +=       question.values[i].display ;
    if ( curVal == 0 )
      ss +=   '</a>' ;
    if ( question.values[i].id == curVal )
      ss += '&nbsp;<img src="' + GetImage('current.gif') + '" border="0">'
    ss +=   '</td>' +
            '<td width="5%" align="center">' +
            '&nbsp;' +
            '</td>' +
          '</tr>' ;
    s += ss ;
  }
  s += '</table>' ;
  return ( s ) ;
}

function Build_MQuestion ( question )
{
  var s , i ;

  s = GetPadTable ( 8 ) +

  '<table bgcolor="#D5EAE6" border="0" cellspacing="0" cellpadding="0" width="100%">' +
    '<tr class="question">' + 
    '<td width="8" valign="top"><img src="' + GetImage( 'top_l_curve.gif' ) + '" width="8" height="8" /></td>' +

    '<td width="70%">' + 
       '<a class="vqa" href="javascript:parent.ShowAttachment(\'' + question.attachment + '\')">' + 
       '<img src="' + GetImage('addinfo.gif') + '" border="0" alt="Show Documentation">&nbsp;&nbsp;' +
        question.text +
        '</a>' +
    '</td>' + 
    '<td width="20%">&nbsp;</td>' + 
    '<td width="5%" align="center">' +
       '<a href="javascript:parent.FlagFeedback(0,' + question.id + ')">' +
       '<img src="' + GetImage('feedbk_n.gif') + '" border="0" alt="Feedback">' +
       '</a>' +
    '</td>' +
    '<td width="5%" valign="top" align="right"><img src="' + GetImage( 'top_r_curve.gif' ) + '" width="8" height="8" /></td>' + 
    '</tr>' + 
  '</table>' ;

  s += '<span id="values">' +
       Build_MQuestionValues ( question ) +
       '</span>' +
//       GetMPadTable ( 8 ) +
       Build_MInlineAttachment ( 0 ) +
  '<table bgcolor="#D5EAE6" border="0" cellspacing="0" cellpadding="0" width="100%" class="table-text">' + 
    '<tr class="table-header">' +
    '<td width="8" valign="top"><img src="' + GetImage( 'bot_l_curve.gif' ) + '" width="8" height="8" /></td>' + 
    '<td><img src="' + GetImage( 'tiny.gif' ) + '" width="8" height="8" /></td>' + 
    '<td width="8" valign="top"><img src="' + GetImage( 'bot_r_curve.gif' ) + '" width="8" height="8" /></td>' + 
    '</tr>' + 
  '</table>' ;

  return ( s ) ;
}

function Build_MQuestionTitle ( )
{
  var s = "" ;
  s += '<table border="0" width="100%" cellspacing="0" cellpadding="0">' +
       '<tr class="head"><td>&nbsp;' + dialogName + '</td>' ;
  s += '</tr>' +
       '</table>' ;
  return ( s ) ;
}

function Build_MQuestionFooter ( )
{
  var s = GetPadTable ( 8 ) +
          '<input name="GoBtn" type="button" id="GoBtn" value="' + Text_Continue + '" onClick="javascript:parent.DialogOK();" />' +
          GetPadTable ( 8 ) ;
  if ( emailContext )
  {
    s += '<input type="button" value="' + Text_EmailBtn + '" onclick="javascript:alert(parent.MQuestion_AsText());" />' +
         GetPadTable ( 8 ) ;
  }
  return ( s ) ;
}
function Build_MInlineAttachment ( aID , extraPadding )
{
  var s = "" ;
  if ( ! popupAttachments )
  {
    s += '<table bgcolor="#D5EAE6" border="0" width="100%" cellspacing="0" cellpadding="0">' +
           '<tr bordercolor="#d9e7f0">' +
             '<td align="center">' +
               '<div id="attach_' + aID + '" style="display:none;width:100%">' +
                 '<iframe id="qframe_' + aID + '" border="black" frameborder="yes" border="2" style="width:96%;height:400px">' +
                 '</iframe>' +
               '</div>' +
             '</td>' +
           '</tr>' +
         '</table>' ;
    if ( extraPadding == null )
      s += GetPadTable ( 8 ) ;
    else if ( extraPadding )
      s += GetPadTable ( 8 ) ;
  }
  return ( s ) ;
}
function GetMPadTable ( height , aClass )
{
  var c ;
  if ( aClass == null )
    c = '' ;
  else
    c = ' width="100%" class="' + aClass + '"' ;
  return ( '<table bgcolor="#D5EAE6" border="0" cellspacing="0" cellpadding="0" width="100%"><tr height="' + height + '"' + c + '><td><img src="' + GetImage('tiny.gif') + '" border="0"></td></tr></table>' ) ;
}

function Build_MQuestionValuesAsText ( question )
{
  var s = '' ;
  var i ;
  for ( i = 0 ; i < question.values.length ; i++ )
    s += Text_ValueIndent + question.values[i].display + "\n" ;
  return ( s ) ;
}

function Build_MQuestionAsText ( question )
{
  var s = Text_StepBreak + "\n" + 
          question.text + "\n" +
          Build_MQuestionValuesAsText ( question ) +
          "\n" ;
  return ( s ) ;
}

// Build the dialog as a text string (for email etc)
function MQuestion_AsText ()
{
  if ( ! isMultiInput )
    return ( "Not a multi-input page" ) ;
  var s = "" ;
  s += dialogName + "\n" ;
  if ( question != null )
    s += Build_MQuestionAsText(question) ;
  var origQuestion = question ;
  var c ;
  for ( c = 0 ; c < multiInputs.length ; c++ )
  {
    question = multiInputs[c] ;
    s += Build_MQuestionAsText(question) ;
  }
  question = origQuestion ;
  return ( s ) ;
}

-->