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='';}

google_max_num_ads = 5;
var url = window.location + "";
if (url.indexOf('http://preview.') == 0) { url = 'http://www.' + url.substr(15,url.length - 15); }
google_page_url = url;
google_ad_output = 'js';

function google_ad_request_done(google_ads) {
  var i;
  if (google_ads.length) {
      document.write('<div class="cpcmargintop">&nbsp;</div><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td>&nbsp;</td><td><span class="cpctitle">sponsored links</span><div class="cpcspacer">&nbsp;</div>');
      document.write('<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="cpclinetop"><img width="1" height="1"></td></tr></table><table cellpadding="0" cellspacing="0" border="0" width="100%">');
      for(i = 0; i < google_ads.length; ++i) {
        document.write('<tr><td><div class="cpcspacer">&nbsp;</div></td></tr><tr><td class="ch" id="taw' + i + '" onMouseOver="ss(\'go to ' + google_ads[i].visible_url + '\')" onMouseOut="cs()" onClick="ga(this,event)">');
        document.write('<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 + ' ' + google_ads[i].line3 + '</span><br><span class="cpcurl">' + google_ads[i].visible_url + '</span></td></tr>');
      }
      document.write('</table><div class="cpcspacer">&nbsp;</div><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="cpclinebg"><img width="1" height="1"></td></tr></table></td><td>&nbsp;</td></table>');
  }
}

function google_debug() {
  var c = document.cookie;
  if (c.indexOf('googletesting=1') == -1) { return; }
  var win = window.open("", "googlewin", "height=300,width=600");
  var d = win.document;
  d.write("<html><head><title>Google Testing Window</title></head><body><h1><table border=0 width=100%>");
  var props = [ 'google_max_num_ads', 'google_hints', 'google_kw', 'google_page_url', 'google_safe', 'google_ad_output', 'google_ad_client', 'google_ad_channel', 'google_kw_type', 'google_adtest' ];
  props.sort();

  for(var i = 0; i < props.length; i++) {
    d.write("<tr><td width=20% style='background-color: #dbe9f4\; color: #333333'><b>" + props[i] + "</b></td><td>" + window[props[i]] + "</td></tr>");
  }
  d.write("</table></body></html>");
  d.close();
  win.focus();
}
