window.open弹广告
默认分类 2011-03-06 18:58:26
- (function(){
- var shop = document.createElement("DIV");
-
- shop.id = 'pay_activity1';
- shop.style.display = 'block';
- shop.style.zIndex = '999999';
- shop.innerHTML = '<div style="position: fixed; right: 0px; bottom: 0px; _position: absolute; _top:expression(documentElement.scrollTop + documentElement.clientHeight - 300);_left:expression(documentElement.scrollLeft + documentElement.clientWidth - 300);z-index: 500;"><a href="#" class="close" style="position: absolute;z-index:100; width: 22px; height: 22px; left: 0px;margin-left: 280px;text-decoration: none;background-image:url(\'https://pay.sdo.com/style/css/img/blank.png\');" title="close" onclick=" document.getElementById(\'pay_activity1\').style.display=\'none\'"> </a><iframe src="https://ebinfo.sdo.com/esales/pay_sdo_com/shop_sdo_com.htm" width="300" height="300" scrolling="no" border="0" frameborder="0" allowtransparency="true" style="background:transparent;"></iframe></div>';
- document.getElementsByTagName("BODY")[0].appendChild(shop);
-
-
-
- function getCookie( name ) {
- var start = document.cookie.indexOf( name + "=" );
- var len = start + name.length + 1;
- if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
- return null;
- }
- if ( start == -1 ) return null;
- var end = document.cookie.indexOf( ';', len );
- if ( end == -1 ) end = document.cookie.length;
- return unescape( document.cookie.substring( len, end ) );
- }
-
- function setCookie( name, value, expires, path, domain, secure ) {
- var today = new Date();
- today.setTime( today.getTime() );
- if ( expires ) {
- expires = expires * 1000 * 60 * 60 * 24;
- }
- var expires_date = new Date( today.getTime() + (expires) );
- document.cookie = name+'='+escape( value ) +
- ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) +
- ( ( path ) ? ';path=' + path : '' ) +
- ( ( domain ) ? ';domain=' + domain : '' ) +
- ( ( secure ) ? ';secure' : '' );
- }
- function deleteCookie( name, path, domain ) {
- if ( getCookie( name ) ) document.cookie = name + '=' +
- ( ( path ) ? ';path=' + path : '') +
- ( ( domain ) ? ';domain=' + domain : '' ) +
- ';expires=Thu, 01-Jan-1970 00:00:01 GMT';
- }
-
- function showShopActivity(){
- if(!getCookie("shop_activity"))
- {
- var openURL = window.open ("http://adrs.sdo.com/ADRefererSystem/adjump.aspx?SndaADID=sdo-shangcheng-110217-22-1&RedirectUrl=http%3a%2f%2fshop.sdo.com%2findex.htm","openURL","height="+window.screen.height+",width=" +window.screen.width+ ",left=0,top=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes, status=yes");
- openURL.window.blur();
- openURL.window.opener.focus();
- setCookie("shop_activity","1",1);
- }
- if(document.addEventListener){
- document.removeEventListener("click",showShopActivity,false);
- }
- else{
- document.detachEvent("onclick", showShopActivity);
- }
- }
-
- if(document.addEventListener){
- document.addEventListener('click', showShopActivity, false);
- }else {
- document.attachEvent('onclick', showShopActivity);
- }
-
- })()
>>
留言评论