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

function Build_QuestionValues ( )
{
  var s = '<table border="0" width="100%" cellspacing="0" cellpadding="0">' ;
  var i , t , ss ;
  var img = '<img src="' + GetImage('arrow.gif') + '" border="0">&nbsp;' ;
  for ( i = 0 ; i < question.values.length ; i++ )
    if ( ! question.doneTrigram || ( question.values[i].score >= 50 ) )
    {
      ss = '<tr class="value">' +
           '<td width="10%">' ;
      if ( question.doneTrigram )
        ss += question.values[i].score + '%' ;
      else
        ss += '&nbsp;'
      if ( i == 0 )
        t = ' id="ffocus"' ;
      else
        t = '' ;
      ss += '</td>' +
            '<td width="85%">' +
              '<a class="vqa" href="javascript:Value(' + question.values[i].id + ');"' + t + '>' +
                img + question.values[i].display +
              '</a>' ;
      if ( question.values[i].attachment.length > 0 )
        ss +=   '<a class="vqa" href="javascript:parent.ShowAttachment(\'' + question.values[i].attachment + '\')">' +
                '&nbsp;&nbsp;<img src="' + GetImage('addinfo.gif') + '" border="0" alt="Show Documentation">' +
                '</a>' ;
      ss += '</td>' +
            '<td width="5%" align="center">' +
            '&nbsp;' +
            '</td>' +
            '</tr>' ;
      s += ss ;
    }
  s += '</table>' ;
  return ( s ) ;
}

function Build_Question ()
{
  var s , i ;
  ss = "" ;

  if ( runMode != "" )
    ss = '<a href="javascript:parent.SaveSession(0);"><img src="../../attarImages/toolsave.gif" alt="' + Text_SaveSession + '" width="21" height="21" border="0" valign="middle" /></a><img src="../../attarImages/tiny.gif" height="1" width="5" />' ;
  s = '<table border="0" cellspacing="0" cellpadding="0" width="100%">' +
        '<tr class="bluehead">' +
          '<td>&nbsp;' + Text_Question + '</td>' +
          '<td align="right">' ;

  s +=      '<a href="javascript:parent.ShowSuperSolution()">' +
              '<img src="../../attarImages/toolsuper.gif" alt="Global Search" width="21" height="21" border="0" valign="middle" />' +
            '</a>' +
            '<img src="../../attarImages/tiny.gif" border="0" height="1" width="5" />' ;

  s +=      '<a href="javascript:parent.SingleQuestionChat()">' +
              '<img src="../../attarImages/toolchat.gif" alt="Get Question Text" width="21" height="21" border="0" valign="middle" />' +
            '</a>' +
            '<img src="../../attarImages/tiny.gif" border="0" height="1" width="5" />' ;

  if ( question.qaID != 0 )
    s +=    '<a href="javascript:parent.ShowQA(' + question.qaID + ')">' +
              '<img src="../../attarImages/toolemail.gif" alt="Get Multiple Question Text" width="21" height="21" border="0" valign="middle" />' +
            '</a>' +
            '<img src="../../attarImages/tiny.gif" border="0" height="1" width="5" />' ;

  s +=      '<a href="javascript:parent.SelfService()">' +
              '<img src="../../attarImages/toolsserv.gif" alt="Get Self Service URL" width="21" height="21" border="0" valign="middle" />' +
            '</a>' +
            '<img src="../../attarImages/tiny.gif" border="0" height="1" width="5" />' ;

  if ( question.overviewID != 0 )
    s +=    '<a href="javascript:parent.ShowOverview(' + question.overviewID + ')">' +
              '<img src="../../attarImages/toolnav.gif" alt="Show Navigation View" width="21" height="21" border="0" valign="middle" />' +
            '</a>' +
            '<img src="../../attarImages/tiny.gif" border="0" height="1" width="5" />' ;
  s += ss ;

  s +=      '<a href="javascript:parent.ShowHelp()">' +
              '<img src="../../attarImages/toolhelp.gif" alt="Help" width="21" height="21" border="0" valign="middle" />' +
            '</a>' +
            '<img src="../../attarImages/tiny.gif" border="0" height="1" width="5" />' +
          '</td>' +
        '</tr>' +
      '</table>' ;

  s  = WrapTable ( "../../attarImages/bhead" , "../../attarImages/tiny.gif" , 4 , s ) +
       GetPadTable ( 8 ) +

       '<table border="0" width="100%" cellspacing="0" cellpadding="0">' +
         '<tr class="question">' +
           '<td nowrap>' ;
  if ( question.attachment.length > 0 )
    s +=     '<a class="vqa" href="javascript:parent.ShowAttachment(\'' + question.attachment + '\')">' +
               '<img src="' + GetImage('addinfo.gif') + '" border="0" alt="Show Documentation">&nbsp;&nbsp;' ;
  s +=         question.text ;
  if ( question.attachment.length > 0 )
    s +=     '</a>' ;

  s +=     '</td><td width="100%">' +
             '&nbsp;' +
             '<a href="javascript:parent.ShowSearch()">' +
               '<img src="../../attarImages/toolsearch.gif" alt="Help" width="21" height="21" border="0" valign="middle" />' +
             '</a>' +

           '</td>' +
         '</tr>' +
       '</table>' +
       GetPadTable ( 8 ) ;

  s += '<div id="search" style="display:none">' +
         '<table border="0" width="100%" cellspacing="0" cellpadding="0">' +
           '<tr><td width="10%"><img src="../../attarImages/tiny.gif" /></td><td>' +
             '<input type="text" id="stext" onkeypress="javascript:parent.SearchTextPress(event)" /> ' +
             '<input type="button" value="Find" onclick="javascript:parent.TrigramSearch(document.getElementById(\'stext\').value);" /><br>' +
             '<img src="../../attarImages/tiny.gif" width="1" height="4" />' +
           '</td></tr>' +
         '</table>' +
       '</div>' ;

  s += '<span id="values">' +
       Build_QuestionValues ( ) +
       '</span>' +
       GetPadTable ( 4 ) +
       Build_InlineAttachment ( 0 ) ;

  return ( s ) ;
}

var Text_ValueIndent = "     " ;

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

function BuildQuestion_AsText ()
{
  var s = question.text + "\n" +
          Build_QuestionValuesAsText ( ) ;
  return ( s ) ;
}

-->