系统换主题时变色的效果[转]

在蓝色上看到的实例,是35通行证的。里面的效果似乎还有其他的用途,先吧代码弄下来。。等有时间的(有用的时候)在研究一下。
实例:

<div style="height:100%;">
<img src="http://www.passport.35.com/images/logout_s.gif;jsessionid=VB_WieF2RHffbzgp" border="0" style="cursor:hand" title="退出35Passport" onclick="showConfirmMsg1()" />
</div>
<script>

  function isObject(obj){
    if (obj != null && typeof(obj) != "undefined")
      return true;
    else
      return false;
  }
    
    function focusFirstElement(formName){
        var form = document.forms[formName];
        if (!isObject(form) || form.tagName != "FORM")
            return;
            
        var elements = form.elements;
        for (var i = 0; i < elements.length; i++) {
            if (elements[i].type == 'text' && !elements[i].disabled) {
                elements[i].focus();
                break;
            }
        }
    }
    
    function fillNumbericOptions(start, end, val){
        var str = "";
        for (var i=start; i<=end; i++){
            str += "<option value='" + i + "'" ;
            if (i == val)
                str += " selected";
            str += " >" + i + "</option>";
        }

        document.write (str);
    }
    
    function fillOptions(data, val){
        var str = "";
        for (var i=0; i<data.length; i++){
            
            str += "<option value='" + data[i][0] + "'" ;
            if (data[i][0] == val)
                str += " selected";
            str += " >" + data[i][1] + "</option>";
            
        }
        
        document.write (str);
    }
    
    function fillQuestionOptions(val){
       fillOptions(hintQuestionList, val);
    }
    
    function fillIDTypeOptions(val){
       fillOptions(IDCardTypeList, val);
    }
    
    function fillSecureOptions(val){
        
       fillOptions(updateSecureList, val);
    }
    
    function getHintQuestion(val){
        if (val == "")
            return val;
            
        for (var i=0; i<hintQuestionList.length; i++){
            if (hintQuestionList[i][0] != "" && hintQuestionList[i][0] == val)
                return hintQuestionList[i][1];
        }
    }
    
    function getUpdateSecure(val){
        if (val == "")
            return val;
            
        for (var i=0; i<updateSecureList.length; i++){
            if (updateSecureList[i][0] != "" && updateSecureList[i][0] == val)
                return updateSecureList[i][1];
        }
    }
    
    function getIDCardType(val){
        if (val == "")
            return val;
            
        for (var i=0; i<IDCardTypeList.length; i++){
            if (IDCardTypeList[i][0] != "" && IDCardTypeList[i][0] == val)
                return IDCardTypeList[i][1];
        }
    }
    
    function getCountry(val){
        if (val == "")
            return val;
        
        for (var i=0; i<countryList.length; i++){
            if (countryList[i][0] != "" && countryList[i][0] == val)
                return countryList[i][1];
        }
    }
    
    function hideSelectForm(){
      var opts = document.getElementsByTagName("SELECT");
      if (opts == null || typeof(opts) == "undefined")
          return ;
          
      for (var i=0; i<opts.length; i++){
          opts[i].style.visibility = "hidden";
        }
    }
    
    function showSelectForm(){
        var opts = document.getElementsByTagName("SELECT");
        if (opts == null || typeof(opts) == "undefined")
            return ;
            
        for (var i=0; i<opts.length; i++){
            
            opts[i].style.visibility = "visible";
        }
    }
    
    function createBgDiv(id){
        if (!isObject(id))
            id = "backgroundDiv";
           
        offHeight = window.screen.height;
      var div = document.createElement("DIV");
      div.id = id;
      div.style.left = 0;
      div.style.top = 0;
      div.style.width=document.body.scrollWidth;
      div.style.height = document.body.scrollHeight;
      div.style.position = "absolute";
      div.style.display = "";
      div.style.zIndex = "999";
      //div.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
      div.style.backgroundColor="#2A4A6B";
      document.body.appendChild(div);
      hideSelectForm();
        
      fadeBg(10, id);
        
        return div;
    }
    
    function fadeBg(index, str){
      var obj = document.getElementById(str);
      obj.style.filter = "alpha(Opacity=" + index + ")";
      
      if (index < 50)
          window.setTimeout("fadeBg(" + (index+5) + ", '" + str + "')", 10);
      
  }
</script>
                        <div id="logoutInfoDiv" style="display:none; "></div>
                        <script language="javascript">
                            function showConfirmMsg1(){
                                if (!isObject(document.getElementById("logoutDiv")))
                                        createBgDiv("logoutDiv");
                                      
                                    var infoDiv = document.getElementById("logoutInfoDiv");
                                    
                                    infoDiv.innerHTML = generateConfirmLogoutMsg();
                                    
                                    with(infoDiv.style){
                                        zIndex = 1000; 
                                        position = "absolute"; 
                                        width = "300px";
                                        top = (document.body.offsetHeight-150)/2 + document.body.scrollTop; 
                                        left = (document.body.offsetWidth-400)/2;
                                        border = "1px #4372A5 solid"; 
                                        padding = "10px"; 
                                        backgroundColor = "#ffffff"; 
                                        filter = "Alpha(Opacity=90)";
                                        display = "block";
                                    }
                                    
                            }
                            
                            function cancelLogout(){
                                var aa = document.getElementById("logoutDiv");
                                var infoDiv = document.getElementById("logoutInfoDiv");
                                    infoDiv.style.display = "none";
                                
                                if (isObject(aa))
                                    document.body.removeChild(aa);     
                                
                                showSelectForm();
                           }
                               
                            function generateConfirmLogoutMsg(){
                                var msg = "";
                                
                                msg += '<table width="400"  border="0" cellspacing="0" cellpadding="0" >';
                                msg += '<tr>';
                                msg += '<td bgcolor="DEE8F3" class="Bold_font" height="30"> 确认退出</td>';
                                msg += '</tr>';
                                msg += '<tr>';
                                msg += '<td align="left" > </td>';
                                msg += '</tr>';
                                msg += '</table>';
                                msg += '<table width="400"  border="0" cellspacing="0" cellpadding="0" >';
                                msg += '<tr>';
                                msg += '<td class="register" height="30" align="left">您确定要退出35通行证吗?</td>';
                                msg += '</tr>';
                                msg += '<tr>';
                                msg += '<td align="center" >';
                                msg += '<input id="submitB" type="submit" value=" 退 出 " name="input" class="buttomw" onclick="window.location=\'http://login.passport.35.com/logout.srf \'">    ';
                                msg += '<input type="button" value=" 取 消 " name="input" class="buttomw" onclick="cancelLogout()">';
                                msg += '</td>';
                                msg += '</tr>';
                                msg += '</table>';
                                
                                return msg;
                             }
                            </script>

    我来说几句: