js| Float | floating Layer | show
var offsetx =-120;
var offsety =-100;
NS4 = (document.layers)? True:false
ie4 = (document.all)? True:false
if (IE4) {
if (Navigator.userAgent.indexOf (' msie 5 ') >0) {
IE5 = true;
} else {
IE5 = false; }
} else {
IE5 = false;
}
var x = 0;
var y = 0;
var para = 0;
var sw = 0;
var cnt = 0;
var dir = 1;
var tr=1;
if ((NS4) | | (IE4)) {
if (ns4) over = Document.overdiv
if (ie4) over = Overdiv.style
Document.onmousemove = MouseMove
if (NS4) document.captureevents (event.mousemove)
}
function Hide () {
if (CNT >= 1) {sw = 0};
if ((NS4) | | (IE4)) {
if (sw = = 0) {
Para = 0;
Hideobject (over);
} else {
cnt++;
}
}
}
Function Show (TXT) {
Layerwrite (TXT);
Disp ();
}
function Layerwrite (TXT) {
if (NS4) {
var lyr = document.overDiv.document
Lyr.write (TXT)
Lyr.close ()
}
else if (ie4) document.all["overdiv"].innerhtml = txt
if (tr) {}
}
Function disp () {
if ((NS4) | | (IE4)) {
if (para = = 0) {//Right
MoveTo (over,x+offsetx,y+offsety);
}
Showobject (over);
Para = 1;
}
}
function MouseMove (e) {
if (NS4) {X=e.pagex; Y=e.pagey}
if (IE4) {x=event.x; Y=event.y}
if (IE5) {x=event.x+document.body.scrollleft; Y=event.y+document.body.scrolltop}
if (para) {
MoveTo (over,x+offsetx,y+offsety);
}
}
function Cclick () {
Hideobject (over);
sw=0;
}
Make an object visible
function Showobject (obj) {
if (ns4) obj.visibility = "Show"
else if (ie4) obj.visibility = "visible"
}
Hides an object
function Hideobject (obj) {
if (ns4) obj.visibility = "Hide"
else if (ie4) obj.visibility = "hidden"
}
Move a layer
function MoveTo (obj,xl,yl) {
Obj.left = XL
Obj.top = YL
}
Also, add the appropriate location to the page you want to display:
<div id=overdiv style= "Position:absolute; Z-index:1 "></DIV>
<script language=javascript src= "Xxx.js" ></SCRIPT>
Example Address: http://www.xrss.cn/fjcity.asp