﻿google_ad_client = 'ca-blssi_js'; 
google_ad_type = 'text'; //text,image,flash,html
//google_ad_channel = 'entertainment'; 
google_ad_output = 'js'; 
google_max_num_ads = '3';
google_safe = 'high';
google_image_size = '728x90';
//google_image_size = '468x60';
//google_encoding = 'utf8';
//google_language = 'en';
google_adtest = 'on';
blssi_max_num_ads = 3;
blssi_ads_size = 'large';

function google_ad_request_done(google_ads)
{
//alert('aaaaa');
var s;
if (google_ads.length ==0)
   return; 
//google_num_ads += google_ads.length;
//google_last_ad_type = google_ads[0].type; 
//s='<a class="ad_attribution" href="' + google_info.feedback_url + '"> Ads by Google</a><br>';
s='';

if (google_ads[0].type == "image")
{
 s+='<div align="center"><a href="' +  google_ads[0].url + '" target="_blank" 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></div>';
 
}
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;
}
else if (google_ads[0].type == "text")
{
    //alert(blssi_ads_size);
  if (blssi_ads_size == 'large')
   {
    ad_section_class = 'g_aus';
    ad_ads_class = 'g_ads';
    ad_ad_class = 'g_ad';
    ad_title_class = 'g_adt';
    ad_text_class = 'g_adb';
    ad_url_class = 'g_adu';
    ad_google_class = 'g_abgi';
   }
   else // google_image_size = '468x60'
    {
    ad_section_class = 'g_aus_small';
    ad_ads_class = 'g_ads_small';
    ad_ad_class = 'g_ad_small';
    ad_title_class = 'g_adt_small';
    ad_text_class = 'g_adb_small';
    ad_url_class = 'g_adu_small';
    ad_google_class = 'g_abgi_small';   
    }

   // alert(blssi_max_num_ads);
   // alert(google_ads.length);
  // alert(ad_section_class);
    s += '<div id="' + ad_section_class + '">';          
        s += '<div id="' + ad_ads_class + '">';
            s += '<ul id="ads0">';
    for (var i=0; (i< blssi_max_num_ads && i<google_ads.length); i++)
    {            
                s += '<li id="taw' + i + '">';
                    s += '<div class="' + ad_ad_class + '">';
                        s += '<a target="_blank" id="aw' + i + '" href="' + google_ads[i].url + '"  class="' + ad_title_class + '"><span>' + google_ads[i].line1 +'</span></a>';
                        s += '<div class="'+ ad_text_class +'">';
                        s += google_ads[i].line2 + google_ads[i].line3 + '</div>';
                        s += '<div class="' + ad_url_class + '">';
                        s += '<a target="_blank" id="awa' + i + '" href="' + google_ads[i].url + '" class="g_adus"><span id="uaw' + i + '" class="g_adus"> ' + google_ads[i].visible_url + '</span></a></div>';
                    s += '</div>';
                s += '</li>';
      }              
            s += '</ul>';
        s += '</div>';
    s += '<div id="' + ad_google_class + '"><a target="_blank" href="' + google_info.feedback_url + '"><img width="78" height="16" border="0" src="http://pagead2.googlesyndication.com/pagead/abglogo/abg-en-100c-000000.png"  alt="Ads by Google"></a></div>';               
    s += '</div>';      
}
document.write(s);
return;
}


