  /*
   * 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.  
  */
  function google_ad_request_done(google_ads) {
    var s = '';
    var i;
  
    /* optional clickable backgrounds.  If this is set, 
     * the second and third lines of text ads are 
     * linked to the advertiser's URL.  This increases
     * click-through but decreases click-through
     * accuracy.
     */ 
    var clickable_background = 0;

    /*
     *Attribution for Google ads    
     */
    var google_attribution = 'Ads by Google';

    var title_span =  '<span>';
    var description_span = '<span style="color:#000000">';
    var url_style = ' style="color:#008000;">';


    /*
     * Verify that there are actually ads to display.
     */
    if (google_ads.length == 0)
      return;
    

    /*
     * If an image or Flash ad is returned, display that ad.
     * If a rich media ad is returned, display that as "as is."
     * Otherwise, build a string containing all of the ads and
     * then use a document.write() command to print that string.
     */


    if (google_ads[0].type == "image") {
    s += '<a style="cursor: pointer; cursor: hand" target="_blank" href="' 
        + google_ads[0].url + '" ' 
        + 'onmouseout="window.status=\'\'" ' 
        + 'onmouseover="window.status=\'go to ' 
     
   + google_ads[0].visible_url + '\';return true;'
        + '"> <img border="0" src="' + google_ads[0].image_url 
        + '"width="' + google_ads[0].image_width 
        + '"height="' + google_ads[0].image_height 
        + '"></a>';
    }

    else if (google_ads[0].type == "flash") {
      s += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
              ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"' +
              ' WIDTH="' + google_ad.image_width +
              '" HEIGHT="' + google_ad.image_height + '">' +
              '<PARAM NAME="movie" VALUE="' + google_ad.image_url + '">' +
              '<PARAM NAME="quality" VALUE="high">' +
              '<PARAM NAME="AllowScriptAccess" VALUE="never">' +
              '<EMBED src="' + google_ad.image_url +
              '" WIDTH="' + google_ad.image_width +
              '" HEIGHT="' + google_ad.image_height + 
              '" TYPE="application/x-shockwave-flash"' + 
              ' AllowScriptAccess="never" ' + 
              ' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>';
     }

     else if (google_ads[0].type == "html") {
	  s += google_ads[0].snippet;
     } 

     /*attributes ad to Google*/
   
     if (google_ads[0].type == "image"){
         s += '<br><table border="0" '
         + '"width="' + google_ads[0].image_width 
         + 'height=11px cellspacing="0" cellpadding="0" bgcolor="#000000"><tr><td>'
         + '<a href="' + google_ads[0].url + '" ' 
         + 'onmouseout="window.status=\'\'" ' 
         + 'onmouseover="window.status=\'go to ' 
         + google_ads[0].visible_url + '\';return true;" '
         + 'style="text-decoration:none;font-size:8pt;color: #FFF; cursor: pointer; cursor: hand">' 
         + google_ads[0].visible_url + '</span></a>'
         +'</span></td><td align="right"><span style="font-size:8pt;color: #FFF;">'
         + google_attribution 
         + '</span></td></tr></table>';
      }

    else if (google_ads[0].type == "text") {
      s += '<h2>'+ google_attribution +'</h2>';

      /*
       * Larger text for single ad.
       */
/*      if (google_ads.length == 1) {
         title_span =  '<span style="text-decoration:none;font-size:20pt">';
         description_span =  '<span style="color:#000000;font-size:16pt">';
         url_style =' style="color:#008000;font-size:14pt;text-decoration:none>' ;
      } 
       
*/         /*
         * For text ads, append each ad to the string.
         */
           
         for(i=0; i < google_ads.length; ++i) {
           s += '<ul><li><a href="' + google_ads[i].url + '" target="_blank" ' +
           'onmouseout="window.status=\'\'" ' +
            'onmouseover="window.status=\'go to ' +
            google_ads[i].visible_url + '\';return true;" ' +
             'style="text-decoration:none">' +
              title_span +
             '<b>' + google_ads[i].line1 + '</b><br></span>';
           
           if (clickable_background == 0){
             s += '</a>';
            } 
             
             s +=  description_span +
             google_ads[i].line2 + '<br>' +
             google_ads[i].line3 + '<br></span>';

           if (clickable_background == 1){
              s += '</a>';
           }
		 
           s += '<a href="' + google_ads[i].url + '" target="_blank" ' +
               'onmouseout="window.status=\'\'" ' +
               'onmouseover="window.status=\'go to ' +
               google_ads[i].visible_url + '\';return true;" ' +
               url_style  +
               google_ads[i].visible_url + '</a></li></ul>';
           }        
       }

    document.write(s);
    return;
  }

/* <![CDATA[ */
            google_ad_client = 'ca-discovery-petfinder_js';
//			google_ad_client = 'ca-discovery-petfinder-test_js';
			google_ad_output = 'js';
			google_safe = 'high';
			google_ad_type = 'text';
			google_hints = 'Vetinarian, veterinary, fence, leash, collar, dog bed, grooming, pet art, photos, psychic, books, magazines, dental, first aid, therapy, dog house, pet doors, behaviorist, boarding, kennel, pet sitting, pet hotel, waste removal, bakery, dog health food, parks, training ';
/* ]]> */

