我的网页是由header.asp index.asp和footer.asp组成,现在想加入以下飘窗代码,可是无论加在哪里不是格式乱了就是只是固定不会动,如果新建一个空白网页运行以下代码却没有问题,还请各位大侠帮忙看一看是哪里有问题,我应该如何改动呢,多谢了
<div id="FlAD_19" style="position:absolute; z-index:10;left: 100; top: 100"><a href="#" target="_blank" title="写字楼"><img src="upload/Ads/xuanfu.jpg" width="182" height="120" border="0"
alt="" /></a></div>
<script type="text/javascript">
<!-- Begin
var img_19=document.all.FlAD_19
var xPos_19 = 100;
var yPos_19 = 100;
var step_19 = 1;
var delay_19 = 30;
var height_19 = 0;
var Hoffset_19 = 0;
var Woffse_19t = 0;
var yon_19 = 0;
var xon_19 = 0;
var pause_19 = true;
var interval_19;
img_19.style.top = yPos_19;
function changePos_19() {
width_19 = document.body.clientWidth;
height_19 = document.body.clientHeight;
Hoffset_19 = img_19.offsetHeight;
Woffset_19 = img_19.offsetWidth;
img_19.style.left = xPos_19 + document.body.scrollLeft;
img_19.style.top = yPos_19 + document.body.scrollTop;
if (yon_19) {
yPos_19 = yPos_19 + step_19;
}
else {
yPos_19 = yPos_19 - step_19;
}
if (yPos_19 < 0) {
yon_19 = 1;
yPos_19 = 0;
}
if (yPos_19 >= (height_19 - Hoffset_19)) {
yon_19 = 0;
yPos_19 = (height_19 - Hoffset_19);
}
if (xon_19) {
xPos_19 = xPos_19 + step_19;
}
else {
xPos_19 = xPos_19 - step_19;
}
if (xPos_19 < 0) {
xon_19 = 1;
xPos_19 = 0;
}
if (xPos_19 >= (width_19 - Woffset_19)) {
xon_19 = 0;
xPos_19 = (width_19 - Woffset_19);
}
}
function start_19() {
img_19.visibility = "visible";
interval_19 = setInterval(*changePos_19()*, delay_19);
}
start_19();</script>
<div id="FlAD_19" style="position:absolute; z-index:10;left: 100; top: 100"><a href="#" target="_blank" title="写字楼"><img src="upload/Ads/xuanfu.jpg" width="182" height="120" border="0"
alt="" /></a></div>
<script type="text/javascript">
<!-- Begin
var img_19=document.all.FlAD_19
var xPos_19 = 100;
var yPos_19 = 100;
var step_19 = 1;
var delay_19 = 30;
var height_19 = 0;
var Hoffset_19 = 0;
var Woffse_19t = 0;
var yon_19 = 0;
var xon_19 = 0;
var pause_19 = true;
var interval_19;
img_19.style.top = yPos_19;
function changePos_19() {
width_19 = document.body.clientWidth;
height_19 = document.body.clientHeight;
Hoffset_19 = img_19.offsetHeight;
Woffset_19 = img_19.offsetWidth;
img_19.style.left = xPos_19 + document.body.scrollLeft;
img_19.style.top = yPos_19 + document.body.scrollTop;
if (yon_19) {
yPos_19 = yPos_19 + step_19;
}
else {
yPos_19 = yPos_19 - step_19;
}
if (yPos_19 < 0) {
yon_19 = 1;
yPos_19 = 0;
}
if (yPos_19 >= (height_19 - Hoffset_19)) {
yon_19 = 0;
yPos_19 = (height_19 - Hoffset_19);
}
if (xon_19) {
xPos_19 = xPos_19 + step_19;
}
else {
xPos_19 = xPos_19 - step_19;
}
if (xPos_19 < 0) {
xon_19 = 1;
xPos_19 = 0;
}
if (xPos_19 >= (width_19 - Woffset_19)) {
xon_19 = 0;
xPos_19 = (width_19 - Woffset_19);
}
}
function start_19() {
img_19.visibility = "visible";
interval_19 = setInterval(*changePos_19()*, delay_19);
}
start_19();</script>