function inject_ads(id, https, key, client, slot, width, height){
  google_ad_client = client;
  google_ad_slot = slot;
  google_ad_width = width;
  google_ad_height = height;
  var eleAds = document.createElement("ads");  
  var eleScript = document.createElement("script");  
  var w = document.write;
  document.write = (function(params){
    document.getElementById(id).innerHTML = params;
    document.write=w;
    $('ads').remove();
    if(key == 0){
      window.setTimeout("inject_ads(google_ads_id, google_ads_https, 1, google_ads_client, google_ads_slot, google_ads_width, google_ads_height);", 1);
    }
  });
  eleScript.setAttribute("type", "text/javascript");
  eleScript.setAttribute("src", "http" + https + "://pagead2.googlesyndication.com/pagead/show_ads.js");
  document.body.appendChild(eleAds);
  document.body.appendChild(eleScript);
  window.setTimeout("$('.loading').css('background', 'none');", 2000);
}