/*******************
 *@ added new parameters 
 *@ Modified By DylanOK.
 *copyright Sohu.com
 *******************/
autoAdAdjust = false; // if true then must give rightAdWidth;
rightAdWidth = 90;

// begin allfly

/* 
// the following marked lines' should  be recode with javascript.
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub liumeiti_FSCommand(ByVal command, ByVal args)\n');
document.write('  call liumeiti_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
*/
function liumeiti_FSCommand(command,args){
	liumeiti_DoFSCommand(command,args);
}


isIE 	= (document.all)?true:false;
isNS 	= (document.layers)?true:false;
isGecko = (document.getElementById)?true:false;

screen.width>1024?leftsuspentl=(screen.width-974)/2-100:leftsuspentl=leftmargin1;
screen.width>1024?rightsuspentl=(screen.width-974)/2+974:rightsuspentl=rightmargin1;

function gifcode(idname,giflink,gifurl,giflocation){
	suspendcode="<DIV width=100 id=" + idname + " style='LEFT:" + giflocation + "px; POSITION: absolute; TOP: 170px;z-index:100;'>";  
	suspendcode=suspendcode + "<a href='" + giflink + "' target=_blank>";
	suspendcode=suspendcode + "<img border=0  src='" + gifurl + "' width='85' height='200'></a><img src='/template/3/images/close.gif' width='38' height='13' onclick='javascript:closeflow();'style='cursor:pointer;position:absolute;right:3px;bottom:-13px;'></DIV>";
	nsuspentcode="<layer id=" + idname + " left=" + giflocation + " top=170 width=85 height=200>";
	nsuspentcode=nsuspentcode + "<a href='" + giflink + "' target=_blank>";
	nsuspentcode=nsuspentcode + "<img border=0  src='" + gifurl + "' width='85' height='200'></a><img src='/template/3/images/close.gif' width='38' height='13' onclick='javascript:closeflow();'style='cursor:pointer;position:absolute;right:3px;bottom:-13px;'></layer>";
	if(isIE || isGecko){ 			//Explorer 4,5,6 || Netscape 6,7,Gecko.
		document.write(suspendcode); 
	}else  if(isNS){		//Netscape 4
		document.write(nsuspentcode);
	}
}

function closeflow(){
	document.getElementById("leftsuspent").style.display="none";
	document.getElementById("rightsuspent").style.display="none";
	}

if(leftformat=="gif"){
   gifcode("leftsuspent",leftlinksuspent,leftpicsuspent,leftsuspentl);   }
else{   }   
if(rightformat=="gif"){
   gifcode("rightsuspent",rightlinksuspent,rightpicsuspent,rightsuspentl)   }
else{    }  


lastScrollX = 0; 
lastScrollY = 0;
mm=0;
function heartBeat() {
    if(document.all || document.getElementById ) { 				//Explorer 4,5,6 || Netscape 6,7,Gecko.
		
diffY =  parseInt(document.documentElement.scrollTop) + parseInt(document.documentElement.clientHeight) - parseInt(topleft);
diffYr=  parseInt(document.documentElement.scrollTop) + parseInt(document.documentElement.clientHeight) - parseInt(topright);

    }else if(isNS) {			//Netscape 4
		diffY = self.pageYOffset+130; 
		diffX = self.pageXOffset; 
    }

    if(diffY != lastScrollY) {
  	if(document.all || document.getElementById){	//Explorer 4,5,6 && Netscape 6,7,Gecko.
  	  if(leftformat !=""){
  	    id_leftsuspent = document.getElementById("leftsuspent");
  	    id_leftsuspent.style.top = diffY+"px";
	  }
	  if(rightformat !=""){
  	    id_rightsuspent = document.getElementById("rightsuspent");
  	    id_rightsuspent.style.top = diffY+"px";

	    if(autoAdAdjust)	id_rightsuspent.style.left = parseInt(document.documentElement.clientWidth)-parseInt(rightAdWidth)+"px";


	  }
	}else if(isNS){			//Netscape 4
  	  if(leftformat !=""){
  	    document.leftsuspent.top = diffY; 
	  }
	  if(rightformat !=""){
	    document.rightsuspent.top = diffY;
	  }
	}
    }
}
action = window.setInterval("heartBeat()",200);





