//广告处理 var piaofuggprocess = []; function gg_process(){ if( 'A1' == 'L1' ){ openwindowsth( "
", 0 ); }else if( document.getElementById( 'GG_' + 'A1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'A1' ).innerHTML = "
"; } if( 'A1' == 'L2' ){ openwindowsth( "
", 307 ); }else if( document.getElementById( 'GG_' + 'A1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'A1' ).innerHTML = "
"; } if( 'A1' == 'L3' ){ openwindowsth( "
", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'A1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'A1' ).innerHTML = "
"; } if( 'A1' == 'P1' || 'A1' == 'P2' ){ //piaofugg( "
" ); piaofuggprocess.push( "
" ); } if( 'A1' == 'A1' && "
" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'A1' == 'A2' && "
" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( 'B1' == 'L1' ){ openwindowsth( "", 0 ); }else if( document.getElementById( 'GG_' + 'B1' ) != null && "" != "" ){ document.getElementById( 'GG_' + 'B1' ).innerHTML = ""; } if( 'B1' == 'L2' ){ openwindowsth( "", 307 ); }else if( document.getElementById( 'GG_' + 'B1' ) != null && "" != "" ){ document.getElementById( 'GG_' + 'B1' ).innerHTML = ""; } if( 'B1' == 'L3' ){ openwindowsth( "", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'B1' ) != null && "" != "" ){ document.getElementById( 'GG_' + 'B1' ).innerHTML = ""; } if( 'B1' == 'P1' || 'B1' == 'P2' ){ //piaofugg( "" ); piaofuggprocess.push( "" ); } if( 'B1' == 'A1' && "" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'B1' == 'A2' && "" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( 'S1' == 'L1' ){ openwindowsth( "
", 0 ); }else if( document.getElementById( 'GG_' + 'S1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'S1' ).innerHTML = "
"; } if( 'S1' == 'L2' ){ openwindowsth( "
", 307 ); }else if( document.getElementById( 'GG_' + 'S1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'S1' ).innerHTML = "
"; } if( 'S1' == 'L3' ){ openwindowsth( "
", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'S1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'S1' ).innerHTML = "
"; } if( 'S1' == 'P1' || 'S1' == 'P2' ){ //piaofugg( "
" ); piaofuggprocess.push( "
" ); } if( 'S1' == 'A1' && "
" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'S1' == 'A2' && "
" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( 'T1' == 'L1' ){ openwindowsth( "
", 0 ); }else if( document.getElementById( 'GG_' + 'T1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'T1' ).innerHTML = "
"; } if( 'T1' == 'L2' ){ openwindowsth( "
", 307 ); }else if( document.getElementById( 'GG_' + 'T1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'T1' ).innerHTML = "
"; } if( 'T1' == 'L3' ){ openwindowsth( "
", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'T1' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'T1' ).innerHTML = "
"; } if( 'T1' == 'P1' || 'T1' == 'P2' ){ //piaofugg( "
" ); piaofuggprocess.push( "
" ); } if( 'T1' == 'A1' && "
" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'T1' == 'A2' && "
" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( 'T2' == 'L1' ){ openwindowsth( "
", 0 ); }else if( document.getElementById( 'GG_' + 'T2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'T2' ).innerHTML = "
"; } if( 'T2' == 'L2' ){ openwindowsth( "
", 307 ); }else if( document.getElementById( 'GG_' + 'T2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'T2' ).innerHTML = "
"; } if( 'T2' == 'L3' ){ openwindowsth( "
", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'T2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'T2' ).innerHTML = "
"; } if( 'T2' == 'P1' || 'T2' == 'P2' ){ //piaofugg( "
" ); piaofuggprocess.push( "
" ); } if( 'T2' == 'A1' && "
" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'T2' == 'A2' && "
" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( 'E2' == 'L1' ){ openwindowsth( "
", 0 ); }else if( document.getElementById( 'GG_' + 'E2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'E2' ).innerHTML = "
"; } if( 'E2' == 'L2' ){ openwindowsth( "
", 307 ); }else if( document.getElementById( 'GG_' + 'E2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'E2' ).innerHTML = "
"; } if( 'E2' == 'L3' ){ openwindowsth( "
", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'E2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'E2' ).innerHTML = "
"; } if( 'E2' == 'P1' || 'E2' == 'P2' ){ //piaofugg( "
" ); piaofuggprocess.push( "
" ); } if( 'E2' == 'A1' && "
" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'E2' == 'A2' && "
" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( 'S2' == 'L1' ){ openwindowsth( "
", 0 ); }else if( document.getElementById( 'GG_' + 'S2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'S2' ).innerHTML = "
"; } if( 'S2' == 'L2' ){ openwindowsth( "
", 307 ); }else if( document.getElementById( 'GG_' + 'S2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'S2' ).innerHTML = "
"; } if( 'S2' == 'L3' ){ openwindowsth( "
", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'S2' ) != null && "
" != "" ){ document.getElementById( 'GG_' + 'S2' ).innerHTML = "
"; } if( 'S2' == 'P1' || 'S2' == 'P2' ){ //piaofugg( "
" ); piaofuggprocess.push( "
" ); } if( 'S2' == 'A1' && "
" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'S2' == 'A2' && "
" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( 'M4' == 'L1' ){ openwindowsth( "", 0 ); }else if( document.getElementById( 'GG_' + 'M4' ) != null && "" != "" ){ document.getElementById( 'GG_' + 'M4' ).innerHTML = ""; } if( 'M4' == 'L2' ){ openwindowsth( "", 307 ); }else if( document.getElementById( 'GG_' + 'M4' ) != null && "" != "" ){ document.getElementById( 'GG_' + 'M4' ).innerHTML = ""; } if( 'M4' == 'L3' ){ openwindowsth( "", 307 * 2 ); }else if( document.getElementById( 'GG_' + 'M4' ) != null && "" != "" ){ document.getElementById( 'GG_' + 'M4' ).innerHTML = ""; } if( 'M4' == 'P1' || 'M4' == 'P2' ){ //piaofugg( "" ); piaofuggprocess.push( "" ); } if( 'M4' == 'A1' && "" == '' ){ if( document.getElementById( 'GG_A1' ) != null ) document.getElementById( 'GG_A1' ).style.height = ''; } if( 'M4' == 'A2' && "" == '' ){ if( document.getElementById( 'GG_A2' ) != null ) document.getElementById( 'GG_A2' ).style.height = ''; } if( topalertgg != '' ){ document.getElementById( "main_container" ).innerHTML = topalertgg + document.getElementById( "main_container" ).innerHTML; setTimeout( "closeallwindows();", 20000 ); } for( var i = 0; i < piaofuggprocess.length; ++i ){ piaofugg( piaofuggprocess[i] ); } } //弹出广告和漂浮广告处理 openwindowcount = 0; var topalertgg = ""; function openwindowsth( divstr, startx){ var windiv = document.createElement('div'); windiv.id="openwindows"+openwindowcount; windiv.innerHTML = "
" + divstr + "
"; topalertgg += "
" + windiv.innerHTML + "
"; openwindowcount++; windiv.style.width = 5000; windiv.style.zIndex = 200; windiv.style.left = startx; windiv.style.top = 2; if(navigator.appName.indexOf("Microsoft",0) != -1){ //windiv.style.position="absolute"; //is ie }else{ //windiv.style.position="fixed"; //not ie } //document.getElementById( "main_container" ).insertBefore( windiv, document.getElementById( "main_container" ).firstChild ); //document.body.appendChild( windiv ); } //可以关闭 function closeallwindows(){ //clearTimeout( openwintimer ); for( i = 0; i" + ggstr + ""; document.getElementById( "main_container" ).innerHTML = ggstr + document.getElementById( "main_container" ).innerHTML; piaofuobj[piaofucount] = new piaofuaction( document.getElementById( 'piaofugg' + piaofucount ) ); setInterval( "piaofuobj[" + piaofucount + "].changPos();", 30 ); piaofucount++; } function closewindows(id){ document.getElementById( "main_container" ).removeChild(document.getElementById("openwindows"+id)); } //漂浮动作 function piaofuaction( obj ){ var xPos = 20; var yPos = document.getElementById( "main_container" ).clientHeight - document.body.scrollTop; var step = 1; var delay = 30; var height = 0; var Hoffset = 0; var Woffset = 0; var yon = Math.random() > 0.5 ? 1 : 0; var xon = Math.random() > 0.5 ? 1 : 0; var pause = true; var interval; var img = obj; var startleft = Math.floor( Math.random() * 1000 ); var starttop = Math.floor( Math.random() * 700 ); var startpostion = true; var vleft = 0; var vtop = 0; img.style.top = yPos; this.changPos = function() { if( startpostion == true ){ img.style.left = Math.abs( 800 - startleft ); img.style.top = Math.abs( 600 - starttop ); startpostion = false; }else{ vleft = parseInt( img.style.left ); vtop = parseInt( img.style.top ); if( xon ){ if( vleft > 0 ){ vleft--; img.style.left = vleft; //往左漂 }else{ xon = 0; } }else{ if( vleft < ( document.getElementById( "main_container" ).clientWidth - 200 - document.body.scrollLeft ) ){ vleft++; img.style.left = vleft; //往右漂 }else{ xon = 1; } } if( yon ){ if( vtop > document.body.scrollTop ){ vtop--; img.style.top = vtop; //往上漂 }else{ yon = 0; } }else{ if( vtop < ( 500 + document.body.scrollTop ) ){ vtop++; img.style.top = vtop// 往下漂 }else{ yon = 1; } } } } } function _hiddenspdiv( divobj ){ var str = 'ggsp_showdiv_'; var strflag = divobj.id; var tp = strflag.split( "_" ); var divname = str + tp[1]; if( document.getElementById( divname ) != null ){ document.getElementById( divname ).style.display = 'none' ; } } function _showspdiv( divobj ){ var str = 'ggsp_showdiv_'; var strflag = divobj.id; var tp = strflag.split( "_" ); var divname = str + tp[1]; if( document.getElementById( divname ) != null ){ document.getElementById( divname ).style.display = "block" ; } } gg_process();