
  function google_ad_request_done(google_ads) {
    /*
     * This function is required and is used to display
     * the ads that are returned from the JavaScript
     * request. You should modify the document.write
     * commands so that the HTML they write out fits
     * with your desired ad layout.
     */
    var s = '';
    var i;

    /*
     * Verify that there are actually ads to display.
     */
    if (google_ads.length == 0) {
      return;
    }
    else if (google_ads.length == 1)
	{
      s += '<table cellspacing="0" style="border-collapse: collapse;margin-right:14px;" ><tr><td valign="top" style="text-align:left;font-weight:bold;font-size:9pt;padding-top:5px;padding-right:10px;" rowspan="3">Ads<br/>by<br/>Google</td>';
    
        /*
         * For text ads, append each ad to the string.
         */
        s += '';
        for(i=0; i < google_ads.length; ++i) {
          s += '<td width="600"><a href="' + google_ads[i].url + '" ' +
                            'onmouseout="window.status=\'\'" ' +
                            'onmouseover="window.status=\'go to ' +
                            google_ads[i].visible_url + '\'" ' +
                            'style="text-decoration:none;font-size:14pt">' +
                            '<span style="text-decoration:underline">' +
                            '<b>' + google_ads[i].line1 + '</b></a></span></td>';
        }
         s += '</tr><tr style="padding-bottom:0px;margin-bottom:0px;border-bottom:0px solid blue;">';
        for(i=0; i < google_ads.length; ++i) {
          s += '<td><a href="' + google_ads[i].url + '" ' +
                            'onmouseout="window.status=\'\'" ' +
                            'onmouseover="window.status=\'go to ' +
                            google_ads[i].visible_url + '\'" ' +
                            'style="text-decoration:none;font-size:10pt">'+
			'<span style="font-size:8pt;line-height:10pt;">' +
                            google_ads[i].line2 + ' ' +
                            google_ads[i].line3 + '</span></a></td>';
        }
           s += '</tr><tr style="padding-top:0px;margin-top:0px;border-top:0px;">';
        for(i=0; i < google_ads.length; ++i) {
          s += '<td><a href="' + google_ads[i].url + '" ' +
                            'onmouseout="window.status=\'\'" ' +
                            'onmouseover="window.status=\'go to ' +
                            google_ads[i].visible_url + '\'" ' +
                            'style="text-decoration:none;font-size:9pt;line-height:9pt;">' +
                            google_ads[i].visible_url + '</span></a></td>';
        }
       
      s += '</tr></table>';
    }

    else{
      s += '<table cellspacing="0" style="border-collapse: collapse;margin-right:14px;" ><tr><td valign="top" style="text-align:left;font-weight:bold;font-size:9pt;padding-top:5px;padding-right:10px;" rowspan="3">Ads<br/>by<br/>Google</td>';
    
        /*
         * For text ads, append each ad to the string.
         */
        s += '';
        for(i=0; i < google_ads.length; ++i) {
          s += '<td width="220"><a href="' + google_ads[i].url + '" ' +
                            'onmouseout="window.status=\'\'" ' +
                            'onmouseover="window.status=\'go to ' +
                            google_ads[i].visible_url + '\'" ' +
                            'style="text-decoration:none;font-size:9pt">' +
                            '<span style="text-decoration:underline">' +
                            '<b>' + google_ads[i].line1 + '</b></a></span></td>';
        }
         s += '</tr><tr style="padding-bottom:0px;margin-bottom:0px;border-bottom:0px solid blue;">';
        for(i=0; i < google_ads.length; ++i) {
          s += '<td><a href="' + google_ads[i].url + '" ' +
                            'onmouseout="window.status=\'\'" ' +
                            'onmouseover="window.status=\'go to ' +
                            google_ads[i].visible_url + '\'" ' +
                            'style="text-decoration:none;font-size:9pt">'+
			'<span style="font-size:8pt;line-height:9pt;">' +
                            google_ads[i].line2 + '<br>' +
                            google_ads[i].line3 + '</span></a></td>';
        }
           s += '</tr><tr style="padding-top:0px;margin-top:0px;border-top:0px;">';
        for(i=0; i < google_ads.length; ++i) {
          s += '<td><a href="' + google_ads[i].url + '" ' +
                            'onmouseout="window.status=\'\'" ' +
                            'onmouseover="window.status=\'go to ' +
                            google_ads[i].visible_url + '\'" ' +
                            'style="text-decoration:none;font-size:9pt;line-height:9pt;">' +
                            google_ads[i].visible_url + '</span></a></td>';
        }
       
      s += '</tr></table>';
    }

    document.write(s);
    return;
  }
