function postback_populate(formname)
{
  var target;
  var temp_found = false;


  if (postback_array)
  {
    for (i=0; i<postback_array.length;i++)
    {
      target = eval("document." + formname + "." + postback_array[i][0]);
      if (typeof(target) != "undefined")
      {
        // if target exists
  
        //if ( target.type == "hidden" || target.type == "text" )
        //{

          if(target.type == "hidden")
          {
            continue;
          };

          if(target.length && target[0].type == "radio")
          {
            temp_found = false;
            for (j=0; j<target.length;j++)
            {
              if (target[j].value == postback_array[i][1])
              {
                target[j].checked = true;
                temp_found = true;
              }
            }            
            continue;
          }
          
          if(target.type == "text")
          {
            target.value = postback_array[i][1];
          }
          if( target.type == "select" || target.type == "select-one" )
          {
            temp_found = false;
            for (j=0; j<target.length;j++)
            {
              if (target[j].value == postback_array[i][1])
              {
                target.selectedIndex = j;
                temp_found = true;
              }
            }
          }
          if(target.type == "textarea")
          {
            target.value = postback_array[i][1];
          }
          if(target.type == "checkbox" )
          {
            if (target.value == postback_array[i][1])
            {
              target.checked = true;
            }
            else
            {
              target.checked = false;
            }
          }
          if(target.type == "radio")
          {
            if (target.value == postback_array[i][1])
            {
              target.checked = true;
            }
            else
            {
              target.checked = false;
            }
          }     
      } // undefined else statement
      else if (target.type == "hidden")
      {
        //alert(target.type + "The field ID: \"" + target.name + "_target\", does not exist in the Parent Window");
      }
    }
  }
}
