SoFunction
Updated on 2025-04-14

Drag layer effect, compatible with IE and FF! Page 2/2


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:///TR/xhtml1/DTD/">
<html xmlns="http:///1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=gb2312">
  <meta http-equiv="content-script-type" content="text/javascript">
  <meta http-equiv="content-style-type" content="text/css">
  <title>DoDi Chat v1.0 Beta</title>
  <style rel="stylesheet" type="text/css" media="all" />
  <!--
  body {
    text-align:left;
    margin:0;
    font:normal 12px Verdana, Arial;
    background:#FFEEFF
  }
  form {
    margin:0;
    font:normal 12px Verdana, Arial;
  }
  table,input {
    font:normal 12px Verdana, Arial;
  }
  a:link,a:visited{
    text-decoration:none;
    color:#333333;
  }
  a:hover{
    text-decoration:none;
    color:#FF6600
  }
  #main {
    width:400px;
    position:absolute;
    left:600px;
    top:100px;
    background:#EFEFFF;
    text-align:left;
    filter:Alpha(opacity=90)
  }
  #ChatHead {
    text-align:right;
    padding:3px;
    border:1px solid #003399;
    background:#DCDCFF;
    font-size:11px;
    color:#3366FF;
    cursor:move;
  }
  #ChatHead a:link,#ChatHead a:visited, {
    font-size:14px;
    font-weight:bold;
    padding:0 3px
  }
  #ChatBody {
    border:1px solid #003399;
    border-top:none;
    padding:2px;
  }
  #ChatContent {
    height:200px;
    padding:6px;
    overflow-y:scroll;
    word-break: break-all
  }
  #ChatBtn {
    border-top:1px solid #003399;
    padding:2px
  }
  -->
  </style>
  <script language="javascript" type="text/javascript">
  <!--
  function $(d){return (d);}
  function gs(d){var t=$(d);if (t){return ;}else{return null;}}
  function gs2(d,a){
    if (){ 
      var curVal=[a]
    }else{ 
      var curVal=(d, null)[a]
    } 
    return curVal;
  }
  function ChatHidden(){gs("ChatBody").display = "none";}
  function ChatShow(){gs("ChatBody").display = "";}
  function ChatClose(){gs("main").display = "none";}
  function ChatSend(obj){
    var o = ;
    if (>0){
$("ChatContent").innerHTML += "<strong>Akon said:</strong>"++"<br/>";
      ='';
    }
  }

  if  (){
    (
      function(){
        if (){ ("<input type='hidden' id='Q' value=' '>"); }

        var n = 500;
        var dragok = false;
        var y,x,d,dy,dx;

        function move(e)
        {
          if (!e) e = ;
          if (dragok){
             = dx +  - x + "px";
              = dy +  - y + "px";
            return false;
          }
        }

        function down(e){
          if (!e) e = ;
          var temp = (typeof  != "undefined")?:;
          if ( != "HTML"|"BODY" &&  != "dragclass"){
            temp = (typeof  != "undefined")?:;
          }
          if('TR'==){
            temp = (typeof  != "undefined")?:;
            temp = (typeof  != "undefined")?:;
            temp = (typeof  != "undefined")?:;
          }

          if ( == "dragclass"){
            if (){ ("Q").focus(); }
            dragok = true;
             = n++;
            d = temp;
            dx = parseInt(gs2(temp,"left"))|0;
            dy = parseInt(gs2(temp,"top"))|0;
            x = ;
            y = ;
             = move;
            return false;
          }
        }

        function up(){
          dragok = false;
           = null;
        }

         = down;
         = up;

      }
    )();
  }
  -->
  </script>
</head>

<body>
<div  class="dragclass" style="left:600px;top:300px;">
  <div >
    <a href="#" onclick="ChatHidden();">-</a>
    <a href="#" onclick="ChatShow();">+</a>
    <a href="#" onclick="ChatClose();">x</a>
  </div>
  <div >
    <div ></div>
    <div >
      <form action="" name="chat" method="post">
      <textarea name="ChatValue" rows="3" style="width:350px"></textarea>
      <input name="Submit" type="button" value="Chat" onclick="ChatSend();" />
      </form>
    </div>
  </div>
</div>

</body>
</html>