// NOTE: This file is intended to be compiled with JSCompiler. If you are
// getting a compiler error when using a JavaScript built-in, please update
// google3/contentads/frontend/externs.js
function quoted(str) {
return (str != null) ? '"' + str + '"' : '""';
}
function google_encodeURIComponent(str) {
if (typeof(encodeURIComponent) == 'function') {
return encodeURIComponent(str);
} else {
return escape(str);
}
}
function google_write_tracker(d, ad_url, tracker_event) {
var qloc = ad_url.indexOf('?');
var img_src = 'http://pagead2.googlesyndication.com/pagead/imp.gif?event=';
img_src += tracker_event;
if (qloc != -1 && qloc + 1 < ad_url.length) {
img_src += '&' + ad_url.substring(qloc + 1);
}
var img_tag = '';
d.write(img_tag);
}
function google_append_url(param, value) {
if (value) {
window.google_ad_url += '&' + param + '=' + value;
}
}
function google_append_url_esc(param, value) {
if (value) {
google_append_url(param, google_encodeURIComponent(value));
}
}
function google_append_color(param, value, random) {
if (value && typeof(value) == 'object') {
value = value[random % value.length];
}
google_append_url('color_' + param, value);
}
function google_get_user_data(w, date) {
var screen = w.screen;
var javaEnabled = navigator.javaEnabled();
var tz = -date.getTimezoneOffset();
if (screen) {
google_append_url("u_h", screen.height);
google_append_url("u_w", screen.width);
google_append_url("u_ah", screen.availHeight);
google_append_url("u_aw", screen.availWidth);
google_append_url("u_cd", screen.colorDepth);
}
google_append_url("u_tz", tz);
google_append_url("u_his", history.length);
google_append_url("u_java", javaEnabled);
if (navigator.plugins) {
google_append_url("u_nplug", navigator.plugins.length);
}
if (navigator.mimeTypes) {
google_append_url("u_nmime", navigator.mimeTypes.length);
}
}
function google_modify_client(client) {
client = client.toLowerCase();
if (client.substring(0, 3) != 'ca-') {
client = 'ca-' + client;
}
return client;
}
function google_write_iframe(w, d, ad_url) {
ad_url = ad_url.substring(0, 1000);
ad_url = ad_url.replace(/%\w?$/, '');
if (w.google_ad_output == 'js' &&
(w.google_ad_request_done || w.google_radlink_request_done)) {
d.write('