
  function show_ads(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;
//alert(google_ads.length);
    /*
     * Verify that there are actually ads to display.
     */
    if (google_ads.length == 0) {
      return;
    }
    /*
     * If an image ad is returned, then that ad should be
     * displayed. Otherwise, build a string containing all of
     * the ads and then use a document.write() command to
     * print it when the string is complete.
     */

    if (google_ads[0].type == "image") {
      s += '<a href="' + google_ads[0].url +
              '" target="_top" title="go to ' + google_ads[0].visible_url +
              '"><img border="0" src="' + google_ads[0].image_url +
              '"width="' + google_ads[0].image_width +
              '"height="' + google_ads[0].image_height + '"></a>';
    } else {
      s += '<style type="text/css"> .ch{cursor:pointer;cursor:hand;color: #999;} </style>';
      s += '<div style="border:1px solid #97bf0d;margin:10px 0px;padding:10px;">';
	  s += '<div style="width:auto;text-align:right;font-size:10px;color:#666;height:10px;">Sponsored Link</div>';
      s += '';
      /*
       * For text ads, append each ad to the string.
       */
      for(i=0; i < 2; ++i) {
        s += '<br><a href="' + google_ads[i].url + '" style="color: #999">' +
                          '<b>' + google_ads[i].line1 + '</b></a><br>' +
                          '<span onclick="document.location.href=\'' +
                          google_ads[i].url +
                          '\'" class="ch" onmouseover="window.status=\'go to ' +
                          google_ads[i].visible_url +
                          '\'" onmouseout="window.status=\'\'">' +
                          google_ads[i].line2 + ' ' +
                          google_ads[i].line3 + '<br>' +
                          '<span style="color: #999">' +
                          google_ads[i].visible_url + '</span></span><br>';
      }
    s += '<script language="javascript">var show_google = true;</script>';
	s += '</div>';
    s += '</div>';
    }

    document.getElementById("google_inner").innerHTML = s;
    return;
  }
