//<SCRIPT language=javascript><!--

/*
  各种广告形式的脚本代码
  全屏广告
  浮动图标
  弹出窗口
  对联广告
*/

//<script src=http://img.zbinfo.net/www/piao/light-move-gif.js></script>
//<script src=http://img.zbinfo.net/www/piao/c300802.js></script>

//var fullPageUrl   = "";
//var scrollPic1Url = "img/20040101-1.swf";
//var scrollPic2Url = "img/01.swf";
//var floatPicUrl   = "img/20031217-1.gif";
//var coupletUrl    = "img/duilian.swf?clickthru=http://www.qlsh.net";

var SYfullscreen  = true,getsGlu;
//var scrollHTML1   = "<div id=threenine1 style='position: absolute;width:64;top:200;visibility: visible;z-index: 1'><embed src='" + scrollPic1Url + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='90' height='90'></embed></div>";
//var scrollHTML2   = "<div id=threenine  style='position: absolute;width:64;top:200;visibility: visible;z-index: 1'><embed src='" + scrollPic2Url + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='90' height='90'></embed></div>";
//var floatHTML     = "<DIV id=img style=\"position:absolute;height:90px;left:12px;top:3px;width:90px\"><A href=\"http://www.zbmc.com/adweb/gprs/\" target=_blank><IMG border=0 height=100 src=\"" + floatPicUrl + "\" width=100></A></DIV>";
//var dlleftHTML    = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=90 HEIGHT=270 id=leftFF ALIGN=> <PARAM NAME=movie VALUE=" + coupletUrl + "> <PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent> <EMBED id=leftFFG src=" + coupletUrl + " quality=high wmode=transparent  WIDTH=90 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
//var dlrightHTML   = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=90 HEIGHT=270 id=youFF ALIGN=> <PARAM NAME=movie VALUE=" + coupletUrl + "> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent><EMBED id=youFFG src=" + coupletUrl + " quality=high wmode=transparent  WIDTH=90 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
var scrollHTML1   = "<div id=threenine1 style='position:absolute;width:64;top:200;visibility: visible;z-index: 1'><IMG src='" + scrollPic1Url + "' width=90 height=90></div>";
var scrollHTML2   = "<div id=threenine  style='position:absolute;width:64;top:200;visibility: visible;z-index: 1'><IMG src='" + scrollPic2Url + "' width=90 height=90></div>";
var floatHTML     = "<DIV id=img style=\"position:absolute;height:90px;left:12px;top:3px;width:90px\"><A href=\"http://www.zbmc.com/adweb/gprs/\" target=_blank><IMG border=0 height=100 src=\"" + floatPicUrl + "\" width=100></A></DIV>";
//var dlleftHTML    = "<IMG id=leftFF src='" + coupletUrl + "' width=90 height=270>";
//var dlrightHTML   = "<IMG id=youFF src='" + coupletUrl + "' width=90 height=270>";

//检查浏览器的类型
if(document.all){
  // this is a 4.x browser, no?
  var ads_agt=navigator.userAgent.toLowerCase();
  var ads_is_major = parseInt(navigator.appVersion);
  var ads_is_ie   = ((ads_agt.indexOf("msie") != -1) && (ads_agt.indexOf("opera") == -1) && (ads_agt.indexOf("omniweb") == -1));
  var ads_is_ie3  = (ads_is_ie && (ads_is_major < 4));
  var ads_is_ie4  = (ads_is_ie && (ads_is_major == 4) && (ads_agt.indexOf("msie 5")==-1) && (ads_agt.indexOf("msie 6")==-1));
  var ads_is_ie4up  = (ads_is_ie  && (ads_is_major >= 4));
  var ads_is_ie5  = (ads_is_ie && (ads_is_major == 4) && (ads_agt.indexOf("msie 5.0")!=-1) );
  var ads_is_ie5up  = (ads_is_ie  && !ads_is_ie3 && !ads_is_ie4);
  var ads_is_ie5_1_macbeta = (ads_is_ie && (ads_agt.indexOf("mac")!=-1) && (ads_agt.indexOf("5.1b")!=-1));
  var ads_is_nav  = ((ads_agt.indexOf('mozilla')!=-1) && (ads_agt.indexOf('spoofer')==-1)
	  && (ads_agt.indexOf('compatible') == -1) && (ads_agt.indexOf('opera')==-1)
		&& (ads_agt.indexOf('webtv')==-1));
  var ads_is_nav6 = (ads_is_nav && (ads_agt.indexOf("netscape6")!=-1) && (ads_agt.indexOf("6.1")==-1));
  var ads_is_nav6up = (ads_is_nav && !ads_is_nav4 && !ads_is_nav3 && !ads_is_nav2);
  var ads_is_nav6_1 = (ads_is_nav && (ads_agt.indexOf("netscape6")!=-1) && (ads_agt.indexOf("6.1")!=-1));
  var ads_is_nav6_1up = (ads_is_nav && !ads_is_nav6 && !ads_is_nav4 && !ads_is_nav3 && !ads_is_nav2);
  getsGlu = ((ads_is_ie5up && !ads_is_ie5_1_macbeta) || ads_is_nav6_1up);
}

//function changediv(depth){
//	divAll.style.zIndex=depth
//}
function changediv(delay){
	document.getElementById('hiddenLayer').style.display = "block";
	document.getElementById('interstitialFrame').src = fullPageUrl;
	setTimeout("hidediv()",delay);
}
function hidediv(){
	document.getElementById('hiddenLayer').style.display="none";
	SYtag=2;
}
//显示全屏广告
function advShowFull(at,delay){
  //参数说明：
  //  at    = 在该代码执行开始多长时间内显示该广告
  //  delay = 广告信息的延迟时间
  //  url   = 所显示页面的url地址
  var str = '<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%><TR><TD align=center><DIV id=hiddenLayer style="display:none;width:100%;height:450px;">';
  if(getsGlu){
    str += '<IFRAME id="interstitialframe" width=100% height=100% noresize scrolling=no frameborder=0 marginheight=0 marginwidth=0></IFRAME>';
  }
  str += '</DIV></TD></TR></TABLE>';
  document.write(str);
  setTimeout("changediv(" + delay + ")",at);
}

//<!--wangmao:以下代码请勿做任何修改，谢谢！ gif floating begin -->
//<SCRIPT language=javascript><!--
document.ns = navigator.appName == "Netscape"
var rnumx1 = new Array();
var rnumx2,rnumx3;
var imgheight,imgright,imgleft;


function threenineload(){
  if(navigator.appName == "Netscape"){
    if(document.getElementById) {
      document.getElementById('threenine').pageY  = pageYOffset+window.innerHeight-imgheight;
      document.getElementById('threenine').pageX  = imgright;
      document.getElementById('threenine1').pageY = pageYOffset+window.innerHeight-imgheight;
      document.getElementById('threenine1').pageX = imgleft;
    }else{
      document.threenine.pageY  = pageYOffset+window.innerHeight-imgheight;
      document.threenine.pageX  = imgright;
      document.threenine1.pageY = pageYOffset+window.innerHeight-imgheight;
      document.threenine1.pageX = imgleft;
    }
    threeninemove();
  }else{
    threenine.style.top   = document.body.scrollTop+document.body.offsetHeight-imgheight;
    threenine.style.right = imgright;
    threenine1.style.top  = document.body.scrollTop+document.body.offsetHeight-imgheight;
    threenine1.style.left = imgleft;
    threeninemove();
  }
}
function threeninemove(){
  if(document.ns){
    if(document.getElementById){
      document.getElementById('threenine').style.top   = pageYOffset+window.innerHeight-imgheight
      document.getElementById('threenine').style.right = imgright;
      document.getElementById('threenine1').style.top  = pageYOffset+window.innerHeight-imgheight
      document.getElementById('threenine1').style.left = imgleft;
    }else{
      document.threenine.top   = pageYOffset+window.innerHeight-imgheight
      document.threenine.right = imgright;
      document.threenine1.top  = pageYOffset+window.innerHeight-imgheight
      document.threenine1.left = imgleft;
    }
    setTimeout("threeninemove();",40)
  }else{
    threenine.style.top   = document.body.scrollTop+document.body.offsetHeight-imgheight;
    threenine.style.right = imgright;
    threenine1.style.top  = document.body.scrollTop+document.body.offsetHeight-imgheight;
    threenine1.style.left = imgleft;
    setTimeout("threeninemove();",80)
  }
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
  if(init==true)
    with(navigator){
      if((appName=="Netscape")&&(parseInt(appVersion)==4)){
        document.MM_pgW=innerWidth;
        document.MM_pgH=innerHeight;
        onresize=MM_reloadPage;
      }
    }
  else if(innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
    location.reload();
}
MM_reloadPage(true);
function advShowScroll(){
  var rnumxtemp = "";
  for(var i=0;i < 3;i++){
    rnumx2 = Math.round(Math.random() * 10);
    rnumx3 = rnumx2!=10 ? rnumx2 : 9;
    //document.write("["+rnumx3+"]");
    rnumx1[i] = rnumx3;
    if(rnumx1[0] > 4 || rnumx1[0] < 1) rnumx1[0] = 1;
    if(rnumx1[1] > 2 && rnumx1[0] == 4) rnumx1[1] = 1;
    rnumxtemp += new String(rnumx1[i]);
  }
  imgheight = window.screen.width>800 ? 150 : rnumxtemp;
  imgright  = window.screen.width>800 ? 20  : 20;
  imgleft   = window.screen.width>800 ? 20  : 20;
  document.write(scrollHTML1 + scrollHTML2);
  threenineload();
}
var xPos=80;
var yPos=0;
var step=4;
var delay=80;
var height=0;
var Hoffset=0;
var Woffset=0;
var yon=0;
var xon=0;
var pause=true;
var interval;

function changePos(){
  width   = document.body.clientWidth;
  height  = document.body.clientHeight;
  Hoffset = img.offsetHeight;
  Woffset = img.offsetWidth;
  img.style.left = xPos+document.body.scrollLeft;
  img.style.top  = yPos+document.body.scrollTop;
  if(yon) yPos=yPos+step;
  else yPos=yPos-step;
  if(yPos<0){yon=1;yPos=0;}
  if(yPos>=(height-Hoffset)){yon=0;yPos=(height-Hoffset);}
  if(xon) xPos=xPos+step;
  else xPos=xPos-step;
  if(xPos<0){xon=1;xPos=0;}
  if(xPos>=(width-Woffset)){xon=0;xPos=(width-Woffset);}
}
function start(){
  img.visibility = 'visible';
  interval = setInterval('changePos()',delay);
}
function advShowFloat(){
  document.write(floatHTML);
  yPos = document.body.clientHeight;
  img.style.top = yPos;
  start();
}

function InsertCouplet(){
  if(window.screen.width>=1024){
    document.all.sidebar.style.visibility = "visible";
    document.all.sidebar2.style.visibility = "visible";
    //document.all.sidebar.innerHTML  = dlleftHTML;
    //document.all.sidebar2.innerHTML = dlrightHTML;
  }
}
function leftFFG_DoFSCommand(command,args){
  if ((command == "SohuCLFS")&&(args =="hidecouplet")){
    document.all.sidebar.style.visibility = "hidden";
    document.all.sidebar2.style.visibility = "hidden";
  }
}
function youFFG_DoFSCommand(command,args){
  leftFFG_DoFSCommand(command,args);
}
function advShowCouplet(){
  var rightbar = window.screen.width - 130;
  if(window.screen.width>=1024){
    document.write("<DIV id=sidebar style='left:0px;position:absolute;top:150px;visibility:hidden;' width=90></div>");
    document.write("<DIV id=sidebar2 style='left:" + rightbar + "px;position:absolute;top:150px;visibility:hidden' width=90></div>");
  }
  InsertCouplet();
  if(document.all){
    document.write("<SCRIPT language=\"JavaScript\" For=\"youFF\" Event=\"FSCommand(command,args)\">\n");
    document.write("	leftFFG_DoFSCommand(command,args);\n");
    document.write("</SCRIPT>\n");
    document.write("<SCRIPT language=\"JavaScript\" For=\"leftFF\" Event=\"FSCommand(command,args)\">\n");
    document.write("	leftFFG_DoFSCommand(command,args);\n");
    document.write("</SCRIPT>\n");
  }
}
//显示弹出窗口
function advShowTanchu(){
  window.open('img/tanchu.htm','popup','top=100,left=200,width=350,height=250,scrollbars=no');
}
//--></SCRIPT>