->
A: visited {text-decoration: none; color: slategray;
A: Hover {text-decoration: underline; color: slategray;
A: Link {text-decoration: none; color: slategray;
->
style>
/ / Can be packaged as JS file;
VAR X0 = 0, Y0 = 0, X1 = 0, Y1 = 0;
VAR OFFX = 6, OFFY = 6;
Var moveable = false;
Var Hover = 'Orange', Normal = 'Slate'; // Color;
Var index = 10000; // z-index;
// Start drag;
Function StartDrag (OBJ)
{
// Lock the title bar;
Obj.setcapture ();
// Define objects;
Var win = obj.parentnode;
Var sha = win.nextsibling;
// Record the mouse and layer position;
X0 = Event.ClientX;
Y0 = Event.clienty;
X1 = parseint (win.style.left);
Y1 = parseint (win.style.top);
// Record the color;
Normal = Obj.Style.BackgroundColor;
// Change the style;
Obj.Style.BackgroundColor = HOVER;
Win.Style.BorderColor = Hover;
Obj.nextsibling.style.color = Hover;
Sha.Style.Left = x1 offx;
Sha.Style.top = Y1 OFFY;
Moveable = true;
}
//drag;
Function Drag (OBJ)
{
Var win = obj.parentnode;
Var sha = win.nextsibling;
IF (moveable)
{
Win.Style.LEFT = x1 Event.ClientX - X0;
Win.Style.top = Y1 Event.Clienty - Y0;
Sha.Style.Left = PARSEINT (WIN.Style.Left) OFFX;
Sha.style.top = parseint (win.style.top) OFFY;
}
}
// Stop dragging;
Function Stopdrag (OBJ)
{
Var win = obj.parentnode;
Var sha = win.nextsibling;
Win.Style.BorderColor = Normal;
Obj.Style.BackgroundColor = NORMAL;
Obj.nextsibling.style.color = normal;
Sha.Style.Left = obj.parentnode.style.Left; Sha.Style.top = Obj.parentNode.Style.top;
// release the title bar;
Obj.releaseCapture ();
Moveable = false;
}
// Get the focus;
Function GetFocus (OBJ)
{
INDEX = INDEX 2;
VAR idx = index;
Obj.Style.zindex = IDX;
Obj.nextsibling.style.zindex = IDX-1;
}
Function min (OBJ)
{
Var win = obj.parentnode.parentNode;
Var sha = win.nextsibling;
VAR TIT = Obj.ParentNode;
Var msg = tit.nextsibling;
Var flg = msg.style.display == "none";
IF (flg)
{
Win.style.height = parseint (msg.style.Height) PARSEINT (TIT.Style.Height) 2 * 2;
Sha.Style.height = win.style.height;
Msg.style.display = "block";
Obj.innerhtml = "0";
}
Else
{
Win.Style.height = parseint (tit.style.height) 2 * 2;
Sha.Style.height = win.style.height;
Obj.innerhtml = "2";
Msg.style.display = "none";
}
}
Function CLS (OBJ)
{
Var win = obj.parentnode.parentNode;
Var sha = win.nextsibling;
Win.Style.visibility = "hidden";
Sha.style.visibility = "hidden";
}
// Create an object;
Function XWIN (ID, W, H, L, T, TIT, MSG)
{
INDEX = INDEX 2;
THIS.ID = ID;
THIS.WIDTH = W;
THIS.HEIGHT = H;
THIS.LEFT = L;
THIS.TOP = T;
THIS.ZINDEX = INDEX;
THIS.TITLE = TIT;
THIS.MESSAGE = MSG;
THIS.OBJ = NULL;
THIS.BULID = BULID;
this.bulid ();
}
//initialization;
Function Bulid ()
{
Var str = ""
"
"Style = '"
"z-index:" this.zindex ";"
"Width:" this.width ";"
"Height:" this.Height ";" "Left:" this.Left ";"
"Top:" this.top ";"
"Background-Color:" Normal ";"
"Color:" NORMAL ";"
"font-size: 10px;"
"font-family: verdana;"
"Position: absolute;"
"CURSOR: Default;"
"Border: 2px solid" Normal ";"
"'"
"οnmοusedοwn = 'getfocus (this)'>"
"
"Style = '"
"Background-Color:" Normal ";"
"Width:" (this.width-2 * 2) ";"
"HEIGHT: 20;"
"Color: White;"
"'"
"οnmοusedοwn = 'startdrag (this)'"
"οnmοuseup = 'stopdrag (this)'"
"οNMοUSEMοVE = 'DRAG (this)'"
">"
"" this.title span> "
" 0 span>"
r span> "
" div>"
"
" div>"
"
// Alert (STR);
Document.body.insertadjacenthtml ("BeForend", STR);
}
// ->
script>
Function initialize ()
{
VAR A = New XWIN ("1", 160, 200, 200, 200, "Message", "XWIN
A Cool Pop Div WINDOW
VERSION: 1.0
2002-8-13");
VAR B = New XWIN ("2", 240, 200, 100, 100, "Wildwind's Msgbox", "Welcome to Visited My Personal Website:
http: / / Wildcity.126.com
and u can also sign my guestbook at:
http: // wildcity.126.com/gbook
thx !!! =) ... ");
VAR C = New XWIN ("3", 200, 160, 250, 50, "Copyright", "Copyright by Wildwind );
}
Window.onload = Initialize;
// ->
script>
hEAD>
body>
html>