首 页 教育新闻课件中心论文中心教学教案试题中心语文专题综合下载技术教程公务员  
设为首页
加入收藏
联系我们
您当前的位置:中国教育资源网 -> 技术教程 -> 网站建设 -> 源码精华 -> 技术内容 退出登录 用户管理

超强GGAD代码源码精华教程

论文作者:佚名  论文来源:不详  论文发布时间:2006-6-20 2:40:50  论文发布人:chjchjchj

减小字体 增大字体

google_ad_url = '';
google_date = new Date();
google_random = google_date.getTime();
google_org_error_handler = window.onerror;

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(tracker_event) {
var qloc = window.google_ad_url.indexOf('?');
var img_src = 'http://pagead2.googlesyndication.com/pagead/imp.gif?event=';
img_src += tracker_event;
if (qloc != -1 && qloc+1 < window.google_ad_url.length) {
img_src += '&' + window.google_ad_url.substring(qloc+1);
}
var img_tag = '<i' + 'mg height="1" width="1" border="0" ' +
'src=' + quoted(img_src) +
' />';
document.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) {
if (value && typeof(value) == 'object') {
value = value[window.google_random % value.length];
}
google_append_url('color_' + param, value);
}

function google_get_user_data() {
var javaEnabled = navigator.javaEnabled();
var tz = -google_date.getTimezoneOffset();

if (window.screen) {
google_append_url("u_h", window.screen.height);
google_append_url("u_w", window.screen.width);
google_append_url("u_ah", window.screen.availHeight);
google_append_url("u_aw", window.screen.availWidth);
google_append_url("u_cd", window.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_show_ad() {
var w = window;
w.onerror = w.google_org_error_handler;

if (w.google_ad_region == null && w.google_ad_section != null) {
w.google_ad_region = w.google_ad_section;
}

var region = (w.google_ad_region == null) ? '' : w.google_ad_region;

if (w.google_ad_format) {
google_is_zero_ad_format=((w.google_ad_format).indexOf('_0ads'))>0;
} else {
google_is_zero_ad_format=false;
}

if (google_is_zero_ad_format) {
if (w.google_num_0ad_slots) {
w.google_num_0ad_slots = w.google_num_0ad_slots +1;
} else {
w.google_num_0ad_slots = 1;
}

if (w.google_num_0ad_slots>1) {
return;
}
} else {
if (w.google_num_ad_slots) {
w.google_num_ad_slots = w.google_num_ad_slots + 1;
} else {
w.google_num_ad_slots = 1;
}

if (w.google_num_slots_to_rotate) {
w.google_prev_ad_formats_by_region[region] = null;
if (w.google_num_slot_to_show == null) {
w.google_num_slot_to_show = w.google_random % w.google_num_slots_to_rotate
+ 1;
}
if (w.google_num_slot_to_show != w.google_num_ad_slots) {
return;
}
} else if (w.google_num_ad_slots > 3 && region == '') {
return;
}
}

w.google_ad_url = 'http://pagead2.googlesyndication.com/pagead/ads?';
w.google_ad_client = w.google_ad_client.toLowerCase();
if (w.google_ad_client.substring(0,3) != 'ca-') {
w.google_ad_client = 'ca-' + w.google_ad_client;
}
w.google_ad_url += 'client=' + escape(w.google_ad_client) +
'&dt=' + w.google_date.getTime();

google_append_url('hl', w.google_language);
if (w.google_country) {
google_append_url('gl', w.google_country);
} else {
google_append_url('gl', w.google_gl);
}
google_append_url('gr', w.google_region);
google_append_url_esc('gcs', w.google_city);
google_append_url_esc('hints', w.google_hints);
google_append_url('adsafe', w.google_safe);
google_append_url('oe', w.google_encoding);
google_append_url('lmt', w.google_last_modified_time);
google_append_url_esc('alternate_ad_url', w.google_alternate_ad_url);
google_append_url('alt_color', w.google_alternate_color);
google_append_url("skip", w.google_skip);

var client = w.google_ad_client;
if (!w.google_num_slots_by_client[client]) {
w.google_num_slots_by_client[client] = 1;
w.google_num_slots_by_client.length += 1;
} else {
w.google_num_slots_by_client[client] += 1;
}

if (w.google_prev_ad_formats_by_region[region]) {
google_append_url_esc('prev_fmts', w.google_prev_ad_formats_by_region[region].toLowerCase());
if (w.google_num_slots_by_client.length > 1) {
google_append_url('slot', w.google_num_slots_by_client[client]);
}
}

if (w.google_ad_format) {
google_append_url_esc('format', w.google_ad_format.toLowerCase());
if (w.google_prev_ad_formats_by_region[region]) {
w.google_prev_ad_formats_by_region[region] = w.google_prev_ad_formats_by_region[region] + ',' + w.google_ad_format;
} else {
w.google_prev_ad_formats_by_region[region] = w.google_ad_format;
}
}

google_append_url('num_ads', w.google_max_num_ads);
google_append_url('output', w.google_ad_output);
google_append_url('adtest', w.google_adtest);

if (w.google_ad_channel) {
var chnl = w.google_ad_channel.toLowerCase();
google_append_url_esc('channel', chnl);
var pv_ch = '';
var arr = chnl.split('+');
for (var i = 0; i < arr.length; i++) {
var ch = arr[i];
if (!w.google_num_slots_by_channel[ch]) {
w.google_num_slots_by_channel[ch] = 1;
} else {
pv_ch += ch + '+';
}
}
google_append_url_esc('pv_ch', pv_ch);
}

google_append_url_esc('url', w.google_page_url);
google_append_color('bg', w.google_color_bg);
google_append_color('text', w.google_color_text);
google_append_color('link', w.google_color_link);
google_append_color('url', w.google_color_url);
google_append_color('border', w.google_color_border);
google_append_color('line', w.google_color_line);
google_append_url('kw_type', w.google_kw_type);
google_append_url_esc('kw', w.google_kw);
google_append_url_esc('contents', w.google_contents);
google_append_url('num_radlinks', w.google_num_radlinks);
google_append_url('max_radlink
[] [返回上一页] [打 印] [收 藏]  
 ∷相关技术评论  (评论内容只代表网友观点,与本站立场无关!) [查看发表评论...]
 
 中国教育资源网免费技术教程下载中心-站内广告 站内广告 中国教育资源网免费技术教程下载中心-站内广告 
 中国教育资源网站内搜索 站内搜索 中国教育资源网站内搜索 
 

   
 中国教育资源网免费技术教程下载中心-栏目导航 栏目导航 中国教育资源网免费技术教程下载中心-栏目导航 
· Dreamweaver · FrontPage
· CSSHTML · DOMJS
· Google排名 · 搜索研究
· 网络赚钱 · Alexa相关
· 建站交流 · 源码精华
· 经验技巧
 
中国教育资源网免费技术教程下载中心-相关教程  相关技术 中国教育资源网免费技术教程下载中心-相关教程
· [图文] 可关闭的漂浮AD代码
 中国教育资源网免费技术教程下载中心-本月热门教程 本月热门 中国教育资源网免费技术教程下载中心-本月热门教程 
 
 中国教育资源网免费技术教程下载中心-本日热门论文 本日热门 中国教育资源网免费技术教程下载中心-本日热门论文 
 
关于本站 - 网站帮助 - 免费课件 - 美容 - 绿色软件 - 软件下载 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 网站留言
浙ICP备06010405号 Email:cnkjz@163.com 技术支持:名流设计
版权所有 Copyright© 2002-2004 名流