function ga(o,e){if (document.getElementById){a=o.id.substring(1); p = "";r = "";g = e.target;if (g) { t = g.id;f = g.parentNode;if (f) {p = f.id;h = f.parentNode;if (h) r = h.id;}} else{h = e.srcElement;f = h.parentNode;if (f) p = f.id;t = h.id;}if (t==a || p==a || r==a) return true;location.href=document.getElementById(a).href}}

function ss(w){window.status=w;return true;}
function cs(){window.status='';}

function google_ad_request_done(google_ads) {
  var i;
  var str_sl = "";
  if (google_ads.length) {
      str_sl += '<h3>Sponsored Links</h3>';
   for(i = 0; i < google_ads.length; ++i) {
      str_sl += '<div class="ch" id="taw' + i + '" onMouseOver="ss(\'go to ' + google_ads[i].visible_url + '\')" onMouseOut="cs()" onClick="ga(this,event)">';
      str_sl += '<a id="aw' + i + '" class="cpclink" href=' + google_ads[i].url + ' target="_blank" onMouseOver="return ss(\'go to ' + google_ads[i].visible_url + '\')" onMouseOut="cs()">' + google_ads[i].line1 + '</a>' + '<br><span class="cpctext">' + google_ads[i].line2 + '<br>' + google_ads[i].line3 + '</span><br><span class="cpcurl">' + google_ads[i].visible_url + '</span></div>';
   }
      document.getElementById("google_sponsoredlinks").innerHTML = str_sl;
    }
}

function sh_charter(creg) {
	$shdiv = creg + ' .view-wrapper';
	$sh = $(creg).css('display');
	alert($sh);
}

