<!--
// Object Renderer for Solutions

function Build_SolutionValues ()
{
  var s = '<table border="0" width="100%" cellspacing="0" cellpadding="0">' ;
  var i , t , ss ;
  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%">' ;
      if ( question.values[i].attachment != "" )
        ss += '<a class="vqa" href="javascript:parent.ShowAttachment(\'' +question.values[i].attachment + '\');Value(' + question.values[i].id + ');">' +
              '<img src="' + GetImage('resource.gif') + '" border="0">&nbsp;' ;
      else if ( question.values[i].nextQuestion != 0 )
        ss += '<a class="vqa" href="javascript:Value(' + question.values[i].id + ');"' + t + '>' +
              '<img src="' + GetImage('arrow.gif') + '" border="0">&nbsp;' ;
      else
        ss += '<a class="vqa" href="javascript:Value(' + question.values[i].id + ');">' +
              '<img src="' + GetImage('arrow_spacer.gif') + '" border="0">&nbsp;' ;
      ss +=   question.values[i].display + 
              '</a>' ;
      ss += '</td>' +
            '<td width="5%" align="center">' +
            '&nbsp;' +
            '</td>' +
            '</tr>' ;
      s += ss ;
    }
  s += '</table>' ;
  return ( s ) ;
}

function Build_Solutions ()
{
  var s ;
  s =  '<table border="0" width="100%" cellspacing="0" cellpadding="0">' +
       '<tr class="bluehead">' +
         '<td>' +
           '&nbsp;' + question . text + 
         '</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>' +
         '<td align="right">' ;

  if ( question . questionID != 0 )
    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" />' +

           '<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" />' ;

  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 ) ;
  s += 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_SolutionValues ( ) +
       '</span>' +
       GetPadTable ( 8 ) +
       Build_InlineAttachment ( 0 ) ;
  return ( s ) ;
}

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

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

-->