//+++++++++++++++++++++++++++++++++++++++++育儿网首页两侧栏广告+++++++++++++++++++++++++++++//
/*
var a = window.location.href.split('/');
if(a[2] == 'www.goodbaby.com' && (typeof a[3] == 'undefined' || a[3] == '' || a[3] == 'index.html' || a[3] == 'index.htm')){
document.write('');
}
*/
function ad1_show(){
var a = window.location.href.split('/');
var ad_date = new Date();
var current_date;
current_date = ad_date.getFullYear() + '/' + (ad_date.getMonth()+1) + '/' + ad_date.getDate();
current_date = Date.parse(current_date);
if(a[2] == 'www.goodbaby.com' && a[3] == 'htmls' && ((ad_date.getDay()>0 && ad_date.getDay()<6 && current_date >= Date.parse('2009/5/4') && current_date <= Date.parse('2009/5/27')) || (ad_date.getDate() == '31' && ad_date.getMonth() == '4')) ){
gb_exec_js('http://v4.acode.ifocus.cn/v1/c446s5.js');
//document.write('');
}
}
function ad2_show(){
var a = window.location.href.split('/');
var ad_date = new Date();
var current_date;
current_date = ad_date.getFullYear() + '/' + (ad_date.getMonth()+1) + '/' + ad_date.getDate();
current_date = Date.parse(current_date);
if ( (a[2] == 'vcity.goodbaby.com' || a[2] == 'dig.goodbaby.com' || a[2] == 'album.goodbaby.com' || a[2] == 'blog.goodbaby.com') && ((ad_date.getMonth() == '10' && ((ad_date.getDate() >= '9' && ad_date.getDate() <= '13') || ad_date.getDate() == '17' || ad_date.getDate() == '23' || ad_date.getDate() == '27')) || (ad_date.getMonth() == '11' && (ad_date.getDate() == '2' || ad_date.getDate() == '7' || ad_date.getDate() == '11' || ad_date.getDate() == '16' || ad_date.getDate() == '23' || ad_date.getDate() == '29') ))) {
gb_exec_js('http://smjs.allyes.com/sm.js');
gb_exec_js('http://smjs.allyes.com/goodbaby++inpage++sm++show.js');
}
}
//=============两个广告轮番显示=================
function TwoAdsChange(){
var m_time=0;
var m_timename='smartmidea';
if (gb_get_cookie(m_timename)!=null){
m_time=gb_get_cookie(m_timename);
}
if (m_time==0){
//run script 1
ad1_show();
ad_SetCookie(m_timename,1,24);
}else{
//run script 2
ad2_show();
ad_SetCookie(m_timename,0,24);
}
}
function ad_SetCookie(sName, sValue, timeKeep){
var now=new Date();
var expireTime= new Date(now.valueOf()+timeKeep*60000*60);
document.cookie = sName + "=" + escape(sValue) + "; path=/; expires=" + expireTime.toGMTString() + ";";
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (window.location.host == 'www.goodbaby.com') {
if (!window.location.href.match(/^http:\/\/www\.goodbaby\.com\/sub\//)) {
gb_load_js({'src': 'http://images.goodbaby.com/common/modules/digold/inbed.js.php', 'charset': 'utf-8'});
}
gb_load_js('http://toolbar.goodbaby.com/js/index.js');
}
if (window.location.host == 'www.goodbaby.com' || window.location.host == 'vcity.goodbaby.com' || window.location.host == 'dig.goodbaby.com' || window.location.host == 'album.goodbaby.com' || window.location.host == 'blog.goodbaby.com') {
var a = window.location.href.split('/');
a[3] == 'htmls' ? ad1_show() : ad2_show();
//window.setTimeout(a[3] == 'htmls' ? ad1_show : ad2_show, 1000);
}
if (window.location.host == 'images.goodbaby.com') {
var win_host = window.location.href.split('/');
if(typeof win_host[4] != 'undefined' && win_host[3] == 'www' && win_host[4] == 'pop'){
gb_load_css('http://images.goodbaby.com/css/global_08.css');
gb_load_css('http://images.goodbaby.com/css/global_gb.css');
gb_load_js('http://toolbar.goodbaby.com/js/index.js');
}
}
//TwoAdsChange();
if (gb_in_array(window.location.host, ['www.goodbaby.com', 'images.goodbaby.com', 'community.goodbaby.com'])) {
gb_load_js('http://images.goodbaby.com/common/assets/js/gb_search_engine_relayer.js');
}