
  // This function displays the ad results.
  // It must be defined above the script that calls show_ads.js
  // to guarantee that it is defined when show_ads.js makes the call-back.

 function google_ad_request_done(google_ads) 
  {

    // Proceed only if we have ads to display!
    if (google_ads.length < 1 )
      return;
 
    // For text ads, display each ad in turn.
    // In this example, each ad goes in a new row in the table.
    if (google_ads[0].type == 'text')
    {
       for(j = 1; j < 4; j++)
       {
         var u = document.getElementById("googleAd" + j);
         var s = "";
         if(google_ads[j-1] != null)
         {    
            var len = google_ads[j-1].visible_url.length;
            if(len < 15)
            {
            // Added by pankaj pareek
             s = s + '<DIV class=ashadds><a href='+google_ads[j-1].url  + '><font color=#CC0000>' ;
            // end
              s  = s + '<strong>';
              
                if(google_ads[j-1].line1.length < 15)
                {
                  s = s +  google_ads[j-1].line1;
                }
                else if(google_ads[j-1].line1.indexOf(" ") < 15)
                {
                  s = s +  google_ads[j-1].line1;
                }
                
                s = s + '</strong></font>' + '<br><font color=#676767>' 
                
                if(google_ads[j-1].line2.length < 15)
                {
                    s = s + google_ads[j-1].line2 + ' ';
                }
                else if(google_ads[j-1].line2.indexOf(" ") < 15)
                {
                     s = s + google_ads[j-1].line2 + ' ';
                }
                  
                if(google_ads[j-1].line3.length < 15)
                {
                    s = s + google_ads[j-1].line3;
                } 
                else if(google_ads[j-1].line3.indexOf(" ") < 15)
                {
                    s = s + google_ads[j-1].line3;
                } 
                s = s  + '</font></a>' ;
                // Added By Pankaj Pareek
				  s = s + '</DIV>';
				// end
				// commented by pankaj pareek to remove url's from google ads on 26 may 2008
				//+ '<DIV class=blueadds><A href='+google_ads[j-1].url  + '>' + google_ads[j-1].visible_url + '</A></DIV>';
				// end
                u.innerHTML = s;                 
            }
            else
            {
            // Added By Pankaj Pareek
            s = s + '<DIV class=ashadds><a href='+google_ads[j-1].url  + '><font color=#CC0000>' ;
            // end
              s  = s + '<strong>';
              
               if(google_ads[j-1].line1.length < 15)
               {
                  s = s +  google_ads[j-1].line1;
               }
               else if(google_ads[j-1].line1.indexOf(" ") < 15)
               {
                  s = s +  google_ads[j-1].line1;
               }
                
                s = s + '</strong></font>' + '<br><font color=#676767>' 
                
                if(google_ads[j-1].line2.length < 15)
                {
                    s = s + google_ads[j-1].line2 + ' ';
                }
                else if(google_ads[j-1].line2.indexOf(" ") < 15)
                {
                     s = s + google_ads[j-1].line2 + ' ';
                }
                  
                if(google_ads[j-1].line3.length < 15)
                {
                    s = s + google_ads[j-1].line3;
                } 
                else if(google_ads[j-1].line3.indexOf(" ") < 15)
                {
                    s = s + google_ads[j-1].line3;
                } 
				// Added By Pankaj Pareek
				  s = s + '</font></a></div>';
				// end
				// commented by pankaj pareek to remove url's from google ads on 26 may 2008
               
                // s = s + '<DIV class=blueadds><A href='+google_ads[j-1].url  + '>' ;
                // s = s + google_ads[j-1].visible_url.substring(0,14);
                 
//                 var urlength = google_ads[j-1].visible_url.length;
//                  
//                 if(urlength < 27)
//                 {
//                   s = s + ' ' + google_ads[j-1].visible_url.substring(14,urlength);
//                 }
//                 else
//                 {
//                     if(urlength == 27)
//                     {
//                       s = s + ' ' + google_ads[j-1].visible_url.substring(14,27);                       
//                     }
//                     else
//                     {
//                        s = s + '     ' + google_ads[j-1].visible_url.substring(14,27);
//                     }
//                     s = s + ' ' + google_ads[j-1].visible_url.substring(27,urlength);
//                 }    
//                 
//                 s = s + '</A></DIV>';
// end
              u.innerHTML = s;                 
            }
          } 
       }
    }
  }


    // This script sets the attributes for requesting ads.
    google_ad_client = "ca-hindustantimes_js";         
    google_ad_output = "js";         
    google_max_num_ads = 3;         // show max 3 ads pankaj pareek
    google_safe     = "high";
    google_feedback = "off";
    google_ad_type  = "text";
    google_color_line = "ff0000";
    //google_kw = "India";
	// Added by pankaj pareek
    google_ad_channel = "home_left";
    google_ad_section="homepage_bottom";
	// end

    // Note: The following line is for testing purposes only.
    // Remove this line to have ads targeted correctly for your pages.
    //google_page_url = 'http://www.hindustantimes.com';         
    google_adtest = "off";


    // Note: The following lines are for testing purposes only.
    // Uncomment them to test image ads.
    // google_kw = "googletestadimage";
    // google_kw_type = "exact";
    // google_image_size = "120x600";
    

