把最上面的div 换为你的图片就可以了<div id="div1" style="position:absolute; right:35px; top:109px; width:140px; height:175px; z-index:1"><a href="#"><img src="images/pic.jpg" width="140" height="175" border="0" ></a></div>
<div id="div2" style="position:absolute; left:35px; top:109px; width:140px; height:175px; z-index:1"><a href="#"><img src="images/pic.jpg" width="140" height="175" border="0" ></a></div><script >
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 MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}function flevDivPositionValue(sDiv, sProperty) { // v2.1, Marja Ribbers-de Vroed, FlevOOware
this.opera = (window.opera); // Opera 5+
this.ns4 = (document.layers); // Netscape 4.x
this.ns6 = (document.getElementById && !document.all && !this.opera); // Netscape 6+
this.ie = (document.all); // Internet Explorer 4+
var sValue = ""; docObj = eval("MM_findObj('" + sDiv + "')"); if (docObj == null) {return 0;}
if ((sProperty == "left") || (sProperty == "top")) {
if (!this.ns4) {docObj = docObj.style;}
sValue = eval("docObj." + sProperty);
if ((this.ie) && (sValue == "")) { // IE (on PC) bug with nested layers
if (sProperty == "top") { sValue = eval(sDiv + ".offsetTop"); }
else { sValue = eval(sDiv + ".offsetLeft"); }
};
}
else {
if (this.opera) {
docObj = docObj.style;
if (sProperty == "height") { sValue = docObj.pixelHeight; }
else if (sProperty == "width") { sValue = docObj.pixelWidth; }
}
else if (this.ns4) {sValue = eval("docObj.clip." + sProperty);}
else if (this.ns6) {sValue = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(sProperty); }
else if (this.ie) {
if (sProperty == "width") { sValue = eval(sDiv + ".offsetWidth"); }
else if (sProperty == "height") { sValue = eval(sDiv + ".offsetHeight"); }
}
}
sValue = (sValue == "") ? 0 : sValue;
if (isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue = sValue.substring(0,sValue.indexOf('px')); } }
return parseInt(sValue);
}function flevPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
var sD = arguments[0], oD = eval("MM_findObj('" + sD + "')"), iWW, iWH, iSX, iSY, iT = 10, sS = "";
if (!document.layers) {oD = oD.style;}
if (oD.tmpTimeout != null) {clearTimeout(oD.tmpTimeout);}
var sXL = arguments[1], sXC = arguments[2], sXR = arguments[3], sYT = arguments[4], sYC = arguments[5], sYB = arguments[6];
var iS = (arguments.length > 7) ? parseInt(arguments[7]) : 0, iPx = (arguments.length > 8) ? parseInt(arguments[8]) : 0;
if (window.innerWidth) { // NS4, NS6 and Opera
var oW = window; iWW = oW.innerWidth; iWH = oW.innerHeight; iSX = oW.pageXOffset; iSY = oW.pageYOffset; }
else if (document.documentElement && document.documentElement.clientWidth) { // IE6 in standards compliant mode
var oDE = document.documentElement; iWW = oDE.clientWidth; iWH = oDE.clientHeight; iSX = oDE.scrollLeft; iSY = oDE.scrollTop; }
else if (document.body) { // IE4+
var oDB = document.body; iWW = oDB.clientWidth; iWH = oDB.clientHeight; iSX = oDB.scrollLeft; iSY = oDB.scrollTop; }
else {return;}
var iCX = iNX = flevDivPositionValue(sD, 'left'), iCY = iNY = flevDivPositionValue(sD, 'top');
if (sXL != "") {iNX = iSX + parseInt(sXL);}
else if (sXC != "") {iNX = Math.round(iSX + (iWW/2) - (flevDivPositionValue(sD, 'width')/2));}
else if (sXR != "") {iNX = iSX + iWW - (flevDivPositionValue(sD, 'width') + parseInt(sXR));}
if (sYT != "") {iNY = iSY + parseInt(sYT);}
else if (sYC != "") {iNY = Math.round(iSY + (iWH/2) - (flevDivPositionValue(sD, 'height')/2));}
else if (sYB != "") {iNY = iSY + (iWH - flevDivPositionValue(sD, 'height') - parseInt(sYB));}
if ((iCX != iNX) || (iCY != iNY)) {
if (iS > 0) {
if (iPx > 0) { iT = iS;
var iPxX = iPx, iPxY = iPx, iMX = Math.abs(iCX - iNX), iMY = Math.abs(iCY - iNY);
// take care of diagonal movement
if (iMX < iMY) {iPxY = (iMX != 0) ? ((iMY/iMX)*iPx) : iPx;}
else {iPxX = (iMY != 0) ? ((iMX/iMY)*iPx) : iPx;}
if (iPxX >= iMX) {iPxX = Math.min(Math.ceil(iPxX), iPx);}
if (iPxY >= iMY) {iPxY = Math.min(Math.ceil(iPxY), iPx);}
// temporary X/Y coordinates
if ((iCX < iNX) && (iCX + iPxX < iNX)) {iNX = iCX + iPxX;}
if ((iCX > iNX) && (iCX - iPxX > iNX)) {iNX = iCX - iPxX;}
if ((iCY < iNY) && (iCY + iPxY < iNY)) {iNY = iCY + iPxY;}
if ((iCY > iNY) && (iCY - iPxY > iNY)) {iNY = iCY - iPxY;} }
else {
var iMX = ((iNX - iCX) / iS), iMY = ((iNY - iCY) / iS);
iMX = (iMX > 0) ? Math.ceil(iMX) : Math.floor(iMX); iNX = iCX + iMX;
iMY = (iMY > 0) ? Math.ceil(iMY) : Math.floor(iMY); iNY = iCY + iMY; } }
if ((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
if (iMX != 0) {eval("oD.left = '" + iNX + sS + "'");}
if (iMY != 0) {eval("oD.top = '" + iNY + sS + "'");} }
var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
oD.tmpTimeout = setTimeout(sF,10);
}function flevInitPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
if (arguments.length < 8) {return;}
var sD = arguments[0]; if (sD == "") {return;}
var oD = eval("MM_findObj('" + sD + "')"); if (!oD) {return;}
var iCSS = parseInt(arguments[1]);
var sXL = arguments[2], sXC = arguments[3], sXR = arguments[4], sYT = arguments[5], sYC = arguments[6], sYB = arguments[7];
var iS = (arguments.length > 8) ? parseInt(arguments[8]) : 0, iPx = (arguments.length > 9) ? parseInt(arguments[9]) : 0;
if (iCSS != 0) { if (!document.layers) {oD = oD.style;} sXL = parseInt(oD.left), sYT = parseInt(oD.top);}
var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
eval(sF);
}
</script>
<script>
document.write("分辨率为:"+ screen.width + "*" + screen.height );
if (screen.width==800) {div1.style.visibility="hidden";div2.style.visibility="hidden";}
if (screen.width==1024){
flevInitPersistentLayer('div1',0,'','','5','10','','',20,15);
flevInitPersistentLayer('div2',0,'5','','','10','','',20,15);
// 名称 0=不知道 左边距 不知道 右边距 上边距 不知道 不知道 不知道 速度
}
for(a=1;a<=300;a++)document.write("<br>");
</script>
<body style="height:2000px;">
</body>
<div id="div2" style="position:absolute; left:35px; top:109px; width:140px; height:175px; z-index:1"><a href="#"><img src="images/pic.jpg" width="140" height="175" border="0" ></a></div><script >
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 MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}function flevDivPositionValue(sDiv, sProperty) { // v2.1, Marja Ribbers-de Vroed, FlevOOware
this.opera = (window.opera); // Opera 5+
this.ns4 = (document.layers); // Netscape 4.x
this.ns6 = (document.getElementById && !document.all && !this.opera); // Netscape 6+
this.ie = (document.all); // Internet Explorer 4+
var sValue = ""; docObj = eval("MM_findObj('" + sDiv + "')"); if (docObj == null) {return 0;}
if ((sProperty == "left") || (sProperty == "top")) {
if (!this.ns4) {docObj = docObj.style;}
sValue = eval("docObj." + sProperty);
if ((this.ie) && (sValue == "")) { // IE (on PC) bug with nested layers
if (sProperty == "top") { sValue = eval(sDiv + ".offsetTop"); }
else { sValue = eval(sDiv + ".offsetLeft"); }
};
}
else {
if (this.opera) {
docObj = docObj.style;
if (sProperty == "height") { sValue = docObj.pixelHeight; }
else if (sProperty == "width") { sValue = docObj.pixelWidth; }
}
else if (this.ns4) {sValue = eval("docObj.clip." + sProperty);}
else if (this.ns6) {sValue = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(sProperty); }
else if (this.ie) {
if (sProperty == "width") { sValue = eval(sDiv + ".offsetWidth"); }
else if (sProperty == "height") { sValue = eval(sDiv + ".offsetHeight"); }
}
}
sValue = (sValue == "") ? 0 : sValue;
if (isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue = sValue.substring(0,sValue.indexOf('px')); } }
return parseInt(sValue);
}function flevPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
var sD = arguments[0], oD = eval("MM_findObj('" + sD + "')"), iWW, iWH, iSX, iSY, iT = 10, sS = "";
if (!document.layers) {oD = oD.style;}
if (oD.tmpTimeout != null) {clearTimeout(oD.tmpTimeout);}
var sXL = arguments[1], sXC = arguments[2], sXR = arguments[3], sYT = arguments[4], sYC = arguments[5], sYB = arguments[6];
var iS = (arguments.length > 7) ? parseInt(arguments[7]) : 0, iPx = (arguments.length > 8) ? parseInt(arguments[8]) : 0;
if (window.innerWidth) { // NS4, NS6 and Opera
var oW = window; iWW = oW.innerWidth; iWH = oW.innerHeight; iSX = oW.pageXOffset; iSY = oW.pageYOffset; }
else if (document.documentElement && document.documentElement.clientWidth) { // IE6 in standards compliant mode
var oDE = document.documentElement; iWW = oDE.clientWidth; iWH = oDE.clientHeight; iSX = oDE.scrollLeft; iSY = oDE.scrollTop; }
else if (document.body) { // IE4+
var oDB = document.body; iWW = oDB.clientWidth; iWH = oDB.clientHeight; iSX = oDB.scrollLeft; iSY = oDB.scrollTop; }
else {return;}
var iCX = iNX = flevDivPositionValue(sD, 'left'), iCY = iNY = flevDivPositionValue(sD, 'top');
if (sXL != "") {iNX = iSX + parseInt(sXL);}
else if (sXC != "") {iNX = Math.round(iSX + (iWW/2) - (flevDivPositionValue(sD, 'width')/2));}
else if (sXR != "") {iNX = iSX + iWW - (flevDivPositionValue(sD, 'width') + parseInt(sXR));}
if (sYT != "") {iNY = iSY + parseInt(sYT);}
else if (sYC != "") {iNY = Math.round(iSY + (iWH/2) - (flevDivPositionValue(sD, 'height')/2));}
else if (sYB != "") {iNY = iSY + (iWH - flevDivPositionValue(sD, 'height') - parseInt(sYB));}
if ((iCX != iNX) || (iCY != iNY)) {
if (iS > 0) {
if (iPx > 0) { iT = iS;
var iPxX = iPx, iPxY = iPx, iMX = Math.abs(iCX - iNX), iMY = Math.abs(iCY - iNY);
// take care of diagonal movement
if (iMX < iMY) {iPxY = (iMX != 0) ? ((iMY/iMX)*iPx) : iPx;}
else {iPxX = (iMY != 0) ? ((iMX/iMY)*iPx) : iPx;}
if (iPxX >= iMX) {iPxX = Math.min(Math.ceil(iPxX), iPx);}
if (iPxY >= iMY) {iPxY = Math.min(Math.ceil(iPxY), iPx);}
// temporary X/Y coordinates
if ((iCX < iNX) && (iCX + iPxX < iNX)) {iNX = iCX + iPxX;}
if ((iCX > iNX) && (iCX - iPxX > iNX)) {iNX = iCX - iPxX;}
if ((iCY < iNY) && (iCY + iPxY < iNY)) {iNY = iCY + iPxY;}
if ((iCY > iNY) && (iCY - iPxY > iNY)) {iNY = iCY - iPxY;} }
else {
var iMX = ((iNX - iCX) / iS), iMY = ((iNY - iCY) / iS);
iMX = (iMX > 0) ? Math.ceil(iMX) : Math.floor(iMX); iNX = iCX + iMX;
iMY = (iMY > 0) ? Math.ceil(iMY) : Math.floor(iMY); iNY = iCY + iMY; } }
if ((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
if (iMX != 0) {eval("oD.left = '" + iNX + sS + "'");}
if (iMY != 0) {eval("oD.top = '" + iNY + sS + "'");} }
var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
oD.tmpTimeout = setTimeout(sF,10);
}function flevInitPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
if (arguments.length < 8) {return;}
var sD = arguments[0]; if (sD == "") {return;}
var oD = eval("MM_findObj('" + sD + "')"); if (!oD) {return;}
var iCSS = parseInt(arguments[1]);
var sXL = arguments[2], sXC = arguments[3], sXR = arguments[4], sYT = arguments[5], sYC = arguments[6], sYB = arguments[7];
var iS = (arguments.length > 8) ? parseInt(arguments[8]) : 0, iPx = (arguments.length > 9) ? parseInt(arguments[9]) : 0;
if (iCSS != 0) { if (!document.layers) {oD = oD.style;} sXL = parseInt(oD.left), sYT = parseInt(oD.top);}
var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
eval(sF);
}
</script>
<script>
document.write("分辨率为:"+ screen.width + "*" + screen.height );
if (screen.width==800) {div1.style.visibility="hidden";div2.style.visibility="hidden";}
if (screen.width==1024){
flevInitPersistentLayer('div1',0,'','','5','10','','',20,15);
flevInitPersistentLayer('div2',0,'5','','','10','','',20,15);
// 名称 0=不知道 左边距 不知道 右边距 上边距 不知道 不知道 不知道 速度
}
for(a=1;a<=300;a++)document.write("<br>");
</script>
<body style="height:2000px;">
</body>
右边图片的URL:schedule[ad_cnt].rightURL
呵呵,这个就是SOHU的源代码
<script>
//对联+流媒体:
leftformat="";
rightformat="";
leftmargin1="215";
topleft="90";
rightmargin1="550";
topright="90";
rightflytransparency="";
leftflytransparency="opaque";
lmtleft="430";
lmttop="300";
lmtwidth="200";
lmtheight="150";
lmtransparency="opaque";
/**********************************************************begin***********************************************************/
/*******************
*@ added new parameters
*@ Modified By DylanOK.
*copyright Sohu.com
*******************/
autoAdAdjust = false; // if true then must give rightAdWidth;
rightAdWidth = 90;// begin allflyfunction 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>800?leftsuspentl=30:leftsuspentl=leftmargin1;
screen.width>800?rightsuspentl=885:rightsuspentl=rightmargin1;function flashcode(idname,flashurl,flshlocation){
if (lmtransparency != ""){
flytransparency1="<param name=wmode value="+lmtransparency+">";
flytransparency2=" wmode="+lmtransparency+" ";}
else{
flytransparency1="";flytransparency2="";
}
suspendcode="<DIV width=80 id=" + idname + " style='LEFT:" + flshlocation + "px; POSITION: absolute; TOP: 170px; z-index:2'>";
suspendcode=suspendcode + "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='80' height='80' id='" + idname + "1'>";
suspendcode=suspendcode + "<param name=movie value='" + flashurl + "'>";
suspendcode=suspendcode + "<param name=quality value=autohigh>";
suspendcode=suspendcode + flytransparency1;
suspendcode=suspendcode + "<embed src='" + flashurl + "' quality=autohigh pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='80' height='80'>";
suspendcode=suspendcode + "</embed></object></div>";
nsuspentcode="<layer id=" + idname + " left=" + flshlocation + " top=170 width=80 height=80>";
nsuspentcode=nsuspentcode + "<EMBED src='" + flashurl + "' quality=autohigh WIDTH=80 HEIGHT=80 TYPE='application/x-shockwave-flash' " + flytransparency2 + "></EMBED></layer>";
if(isIE || isGecko){ //Explorer 4,5,6 || Netscape 6,7,Gecko.
documentAdWrite(suspendcode);
}else if(isNS){ //Netscape 4
documentAdWrite(nsuspentcode);
}
}function gifcode(idname,gifurl,giflink,giflocation){
suspendcode="<DIV width=80 id=" + idname + " style='LEFT:" + giflocation + "px; POSITION: absolute; TOP: 170px;'>";
suspendcode=suspendcode + "<a href='" + giflink + "' target=_blank>";
suspendcode=suspendcode + "<img border=0 src='" + gifurl + "' width='80' height='80'></a></DIV>";
nsuspentcode="<layer id=" + idname + " left=" + giflocation + " top=170 width=80 height=80>";
nsuspentcode=nsuspentcode + "<a href='" + giflink + "' target=_blank>";
nsuspentcode=nsuspentcode + "<img border=0 src='" + gifurl + "' width='80' height='80'></a></layer>";
if(isIE || isGecko){ //Explorer 4,5,6 || Netscape 6,7,Gecko.
documentAdWrite(suspendcode);
}else if(isNS){ //Netscape 4
documentAdWrite(nsuspentcode);
}
if(lmtransparency!=""){
lmtransparency1="<param name=wmode value="+lmtransparency+">";
lmtransparency2=" wmode=" + lmtransparency + " ";
}else{
lmtransparency1="";lmtransparency2="";
}
if(typeof(lmtleft1024) == "undefined")
{
lmtleft1024="540";
} screen.width>800?lmtleft1=lmtleft1024:lmtleft1=lmtleft;
screen.width>800?lmttop1=lmttop:lmttop1=lmttop;
suspendcode="<div id=liumeitidiv style='POSITION: absolute; LEFT:" + lmtleft1 + "px; TOP:" + lmttop1 + "px;z-index:100'>";
suspendcode=suspendcode + "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" + lmtwidth + "' height='" + lmtheight + "'>";
suspendcode=suspendcode + "<param name=movie value='" + liumeitiurl + "'>";
suspendcode=suspendcode + "<param name=quality value=autohigh>";
suspendcode=suspendcode + lmtransparency1;
suspendcode=suspendcode + "<embed src='" + liumeitiurl + "' id=liumeiti quality=autohigh pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" + lmtwidth + "' height='" + lmtheight + "'>";
suspendcode=suspendcode + "</embed></object></div>";
nsuspentcode="<layer id=liumeitidiv left=" + lmtleft + " top=" + lmttop + ">";
nsuspentcode=nsuspentcode + "<EMBED src='" + liumeitiurl + "' id=liumeiti quality=autohigh TYPE='application/x-shockwave-flash' " + lmtransparency2 + " width='" + lmtwidth + "' height='" + lmtheight + "'></EMBED></layer>";
if(isIE || isGecko){ //Explorer 4,5,6 || Netscape 6,7,Gecko.
documentAdWrite(suspendcode);
}else if(isNS){ //Netscape 4
documentAdWrite(nsuspentcode);
} if(liumeitiformat=="right" && rightformat !="" ){
if(isIE || isGecko){ //Explorer 4,5,6 || Netscape 6,7,Gecko.
id_rightsuspent = document.getElementById("rightsuspent");
id_rightsuspent.style.display="none";
}else if(isNS){ //Netscape 4
document.leftsuspent.visibility="hide";
}
}
else if(liumeitiformat=="left" && leftformat !=""){
if(isIE || isGecko){ //Explorer 4,5,6 || Netscape 6,7,Gecko.
id_leftsuspent = document.getElementById("leftsuspent");
id_leftsuspent.style.display="none";
}else if(isNS){ //Netscape 4
document.leftsuspent.visibility="hide";
}
}
else{}
}function liumeiti_DoFSCommand(sequence) {
if(isIE || isGecko){ //Explorer 4,5,6 ||Netscape 6,7,Gecko.
id_liumeitidiv = document.getElementById("liumeitidiv");
id_liumeitidiv.style.visibility="hidden";
id_special = document.getElementById("special");
if(id_special){
id_special.style.display="block";
}
}else if(isNS){ //Netscape 4
document.liumeitidiv.visibility="hide";
}
if(liumeitiformat=="right" && rightformat !=""){
if(isIE || isGecko){ //Explorer 4,5,6 || Netscape 6,7,Gecko.
id_rightsuspent = document.getElementById("rightsuspent");
id_rightsuspent.style.display="block";
}else if(isNS){ //Netscape 4
document.rightsuspent.visibility="show";
}
}
else if(liumeitiformat=="left" && leftformat !=""){
if(isIE || isGecko){ //Explorer 4,5,6 || Netscape 6,7,Gecko.
id_leftsuspent = document.getElementById("leftsuspent");
id_leftsuspent.style.display="block";
}else if(isNS){ //Netscape 4
document.leftsuspent.visibility="show";
}
}
else{ }
schedule[sequence].Finished=true;}
lastScrollY = 0;
mm=0;
function heartBeat() {
if(document.all || document.getElementById ) { //Explorer 4,5,6 || Netscape 6,7,Gecko.
diffY = parseInt(document.body.scrollTop) + parseInt(document.body.clientHeight) - parseInt(topleft);
diffYr= parseInt(document.body.scrollTop) + parseInt(document.body.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.body.clientWidth)-parseInt(rightAdWidth)+"px";
}
}else if(isNS){ //Netscape 4
if(leftformat !=""){
document.leftsuspent.top = diffY;
}
if(rightformat !=""){
document.rightsuspent.top = diffY;
}
}
}
}
function startLiuMeiTi(ad,sequence){
if( ad && !ad.leftFormat) ad.leftFormat = "";
if( ad && !ad.rightFormat) ad.rightFormat = ""; leftformat = ad.leftFormat;
rightformat = ad.rightFormat;// begin get parametersleftmargin1 =(ad.leftMargin)?ad.leftMargin:215;
topleft =(ad.topLeft)?ad.topLeft:90;
rightmargin1 =(ad.rightMargin)?ad.rightMargin:550;
topright =(ad.topRight)?ad.topRight:90;
rightflytransparency =(ad.rightFlyTransparency)?ad.rightFlyTransparency:"";
leftflytransparency =(ad.leftFlyTransparency)?ad.leftFlyTransparency:"opaque";
lmtleft =(ad.LiuMeiTiLeft)?ad.LiuMeiTiLeft:430;
lmttop =(ad.LiuMeiTiTop)?ad.LiuMeiTiTop:300;
lmtwidth =(ad.LiuMeiTiWidth)?ad.LiuMeiTiWidth:200;
lmtheight =(ad.LiuMeiTiHeight)?ad.LiuMeiTiHeight:150;
lmtransparency =(ad.LiuMeiTiTransparency)?ad.LiuMeiTiTransparency:"opaque";// end liumeitiformat = (ad.LiuMeiTiAlign)?ad.LiuMeiTiAlign:""; if(ad && ad.leftURL && ad.leftLink && ad.leftFormat && ad.leftFormat=="gif"){ gifcode("leftsuspent",ad.leftURL,ad.leftLink,leftsuspentl); } else if(ad && ad.leftURL && ad.leftFormat && ad.leftFormat=="flash"){ flashcode("leftsuspent",ad.leftURL,leftsuspentl); } else{ } if(ad && ad.rightURL && ad.rightLink && ad.rightFormat && ad.rightFormat=="gif"){ gifcode("rightsuspent",ad.rightURL,ad.rightLink,rightsuspentl) } else if(ad && ad.rightURL && ad.rightFormat && ad.rightFormat=="flash"){ flashcode("rightsuspent",ad.rightURL,rightsuspentl); } else{ }
if(ad && ad.LiuMeiTi && ad.LiuMeiTi!=""){ liumeiticode(ad.LiuMeiTi,liumeitiformat) }
liumeititime = (ad.TimeOut)?ad.TimeOut:3000;
if((liumeitiformat =="left" || liumeitiformat =="right"||liumeitiformat=="")&&ad.LiuMeiTi && ad.LiuMeiTi!=""){ setTimeout("liumeiti_DoFSCommand("+sequence+")",liumeititime); }else{
stopLiuMeiTi(sequence); }
action = window.setInterval("heartBeat()",500);
}function stopLiuMeiTi(sequence){
schedule[sequence].Finished=true;
}
</script>
<script>
/*飞行流媒体*/
schedule[ad_cnt]= new SohuAd("LiuMeiTi", //ad type
startLiuMeiTi, // start function
stopLiuMeiTi, // end function
8000, // TimeOut;time for monopolization
90 // priority ,run order sequence;
);
schedule[ad_cnt].leftFormat = "gif";
schedule[ad_cnt].leftURL = "http://images.sohu.com/cs/sohu/et/aoyun/8080.gif";
schedule[ad_cnt].leftLink = "http://goto.sohu.com/goto.php3?code=aozuwei-fly";
schedule[ad_cnt].rightFormat = "flash";
schedule[ad_cnt].rightURL = "http://images.sohu.com/cs/button/lg/bj0186/8080.swf?clickthru=http://goto.sohu.com/goto.php3?code=lgdianzi-bj0186-frfly";
//schedule[ad_cnt].rightLink = "http://goto.sohu.com/goto.php3?code=huiyuan-bj1061-frfly";
//schedule[ad_cnt].LiuMeiTi = "http://images.sohu.com/cs/button/pajieluo/04/200150.swf?clickthru=http://goto.sohu.com/goto.php3?code=pajieluo-bj113-frlmt";
//schedule[ad_cnt].LiuMeiTiAlign = "";
//schedule[ad_cnt].LiuMeiTiTransparency = "transparent";
//schedule[ad_cnt].LiuMeiTiTop =-5;
//schedule[ad_cnt].LiuMeiTiLeft =570;
//lmtleft1024 = 804 ;
ad_cnt++;
</script>
<style type="text/css">
<!--
body {
background-attachment: fixed;
background-image: url(csdn.gif);
background-position: left top;
background-repeat: no-repeat;
}
-->
</style>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
2.用JavaScript<body>
<SCRIPT language=JavaScript>
<!-- Hide the script from old browsers --
// 1) 做一个88*31的LOGO。
if (document.images)
var staticlogo=new Image(88,31)
// 2) 设置LOGO的路径。
staticlogo.src="http://img.baidu.com/img/logo_yy.gif"
// 3) 以下是LOGO代表的连接。
var logolink="http://www.baidu.com/"
// 4) 设置ALT属性。
var alttext=""
// 5) 设置下列属性为 1或者0(1是IE特有的,使LOGO隐现)
var fadeintoview=1
/* 6) 最后设置LOGO显示的时间,例如12 秒,数值为0表示一直显示
*/
var visibleduration=0
/////////////////////////以下不要改变/////////////////////////
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400)
}
var fadeset=''
if (fadeintoview)
fadeset="filter:alpha(opacity=0)"
if (document.all)
document.write('<span id="logo"" style="'+fadeset+';position:absolute;top:100;width:'+staticlogo.width+';height:'+staticlogo.height+'"></span>')
function bringintoview(){
if (logo.filters.alpha.opacity<=95)
logo.filters.alpha.opacity+=5
else{
clearInterval(viewit)
if (visibleduration!=0)
setTimeout("logo.style.visibility='hidden'",visibleduration*1000)
}
}
function createlogo(){
staticimage=new Layer(100)
staticimage.left=-300
staticimage.top=120
staticimage.document.write('<a href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 alt="'+alttext+'"></a>')
staticimage.document.close()
staticimage.visibility="show"
regenerate2()
staticitns()
}
if (document.layers)
window.onload=createlogo;
if (document.all){
w=2
h=2
logo.style.left=w
logo.style.top=h
}
function logoit(){
var w2=document.body.scrollLeft+w
var h2=document.body.scrollTop+h
logo.style.left=w2
logo.style.top=h2
}
function logoit2(){
staticimage.left=pageXOffset+2
staticimage.top=pageYOffset+2
}
function insertimage(){
logo.innerHTML='<a href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 alt="'+alttext+'"></a>'
if (fadeintoview)
viewit=setInterval("bringintoview()",10)
else{
if (visibleduration!=0)
setTimeout("logo.style.visibility='hidden'",visibleduration*1000)
}
}
if (document.all){
window.onscroll=logoit
window.onresize=new Function("window.location.reload()")
window.onload=insertimage
}
function staticitns(){
setInterval("logoit2()",9)
if (visibleduration!=0)
setTimeout("staticimage.visibility='hide'",visibleduration*1000)
}
//-->
</SCRIPT>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</body>