/*** * 对联广告代码-DI (Double Images) */ DI_sLeftImageUrl = "/img/duilian1.gif"; DI_sRightImageUrl = "/img/duilian2.gif"; DI_sClickUrl = "http://www.szdbw.com/contact.asp"; DI_sImageUrl = ""; DI_iImageWidth = parseInt("100"); if (isNaN(DI_iImageWidth)) DI_iImageWidth = 99; DI_iImageHeight = parseInt("336"); if (isNaN(DI_iImageHeight)) DI_iImageHeight = 333; DI_iMinWindowWidth = 786 + DI_iImageWidth * 2; /* avoid covering the web content */ DI_iTop = 10; DI_iLeft = 10; DI_iRight = 12; DI_iTimeout = 500; DI_blClosed = false; /*---- common codes begin ----*/ var __bs__ = navigator.userAgent.indexOf("MSIE") > 0 ? "MSIE" : "others"; var __dt__ = (document.documentElement.clientHeight > 0) && (__bs__ == "MSIE" || document.body.clientHeight > document.documentElement.clientHeight) ? "W3C" : "undefined"; function MK_pageY() { if (__bs__ == "MSIE") { if (__dt__ == "W3C") return document.documentElement.scrollTop; else return document.body.scrollTop; } else { return window.pageYOffset; } } function MK_pageX() { if (__bs__ == "MSIE") { if (__dt__ == "W3C") return document.documentElement.scrollLeft; else return document.body.scrollLeft; } else { return window.pageXOffset; } } function MK_pageH() { if (__dt__ == "W3C") return document.documentElement.clientHeight; else return document.body.clientHeight; } function MK_pageW() { if (__dt__ == "W3C") return document.documentElement.clientWidth; else return document.body.clientWidth; } function MK_posY(o, v) { if (!o || !o.style) return ; if (v) { o.style.top = parseInt(v) + "px"; } else { return o.style.top; } } function MK_posX(o, v) { if (!o || !o.style) return ; if (v) { o.style.left = parseInt(v) + "px"; } else { return o.style.left; } } function MK_makeAdFodderHTML(sImageUrl, sImageName, iWidth, iHeight) { var _src = sImageUrl == "" ? sImageName : sImageUrl; return (!_src.match(/\.swf$/gi)? '' : '\n' + '\n' + '\n' + '\n' + '' + '' + '') .replace(/\$src\$/gi, _src).replace(/\$height\$/gi, iHeight).replace(/\$width\$/gi, iWidth); } /*---- common codes end ----*/ function closead() { DI_blClosed = true; DI_Hide(); } function DI_Hide() { try { document.getElementById('DI_LDiv').style.display = 'none'; document.getElementById('DI_RDiv').style.display = 'none'; } catch(e) {} } function JsCloseDAD() { closead(); return false ; } function DI_Show() { if (DI_blClosed) return; try { document.getElementById('DI_LDiv').style.display = 'block'; document.getElementById('DI_RDiv').style.display = 'block'; } catch(e) {} } function DI_Load() { var style_class ; /* try { if (__bs__ == "MSIE") document.styleSheets[0].addRule('.div_floating_ad', 'position:absolute'); else document.styleSheets[0].insertRule('.div_floating_ad {position:absolute}', document.styleSheets[0].cssRules.length); style_class = 'class="div_floating_ad" style="display:none; float:none; border:1px solid #cccccc; background:#eeeeee;"'; } catch(e) {*/ style_class = 'style="position:absolute; display:none; float:none; border:1px solid #cccccc; background:#eeeeee;"'; /* }*/ var _temp = '
\n' + '
$js_ad_content$
\n' + '
\n' + '
\n'; var _lcon = MK_makeAdFodderHTML(DI_sImageUrl, DI_sLeftImageUrl, DI_iImageWidth, DI_iImageHeight); var _rcon = MK_makeAdFodderHTML(DI_sImageUrl, DI_sRightImageUrl, DI_iImageWidth, DI_iImageHeight); var _lstr = _temp.replace(/\$js_ad_click\$/gi, DI_sClickUrl) .replace(/\$div_id\$/gi, 'DI_LDiv').replace(/\$js_ad_content\$/gi, _lcon); var _rstr = _temp.replace(/\$js_ad_click\$/gi, DI_sClickUrl) .replace(/\$div_id\$/gi, 'DI_RDiv').replace(/\$js_ad_content\$/gi, _rcon); document.writeln(_lstr); document.writeln(_rstr); setInterval("DI_Move();", DI_iTimeout); } function DI_Move() { if(MK_pageW() < DI_iMinWindowWidth) { DI_Hide(); return; } DI_Show(); try { var ldiv = document.getElementById('DI_LDiv'); MK_posY(ldiv, DI_iTop); MK_posX(ldiv, DI_iLeft); var rdiv = document.getElementById('DI_RDiv'); MK_posY(rdiv, DI_iTop); MK_posX(rdiv, MK_pageX() + MK_pageW() - DI_iImageWidth - DI_iRight); } catch(e) {} } /* start */ DI_Load(); document.write('');