预览模式: 普通 | 列表

倾听王菲网站关闭的通知

不好意思,各位,倾听王菲(www.ofaye.com)因为种种原因要暂时关闭一段时间,在此本人向所有支持倾听王菲的网友表示抱歉。

开放时间另行通知,希望大家能够谅解!谢谢大家~

倾听王菲QQ群号码:8966464

纯CSS解决DIV垂直居中的样式

XML/HTML代码
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  2. <html xmlns="http://www.w3.org/1999/xhtml">  
  3. <head>  
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  
  5. <title>无标题文档</title>  
  6. <style type="text/css">  
  7. .a {width:200px;height:200px;border:1px solid #333;display:table;vertical-align:middle;}   
  8. .a p {position:relative;left:0;top:50%;width:100%;text-align:center;display:table-cell;vertical-align:middle;}   
  9. .a img {height:50px;border:1px solid #f30;position:relative;top:-50%;}   
  10. </style>  
  11. </head>  
  12. <div  
  13. <body>  
  14. <div class="a"><p><img src="http://www.google.com/intl/en/images/logo.gif" /></p></div>  
  15. </body>  
  16. </html>  
标签: CSS 垂直居中

获取字符串长度的函数(ASP/VB/JS)

JavaScript代码
  1. function strLen(str){   
  2.     var len=0;   
  3.     for(var i=0;i<str.length;i++){   
  4.         var intCode=str.charCodeAt(i);   
  5.         if(intCode>=0 && intCode<=128){   
  6.             len = len + 1;   
  7.         }else{   
  8.             len = len + 2;   
  9.         }   
  10.     }   
  11.     return len;   
  12. }  

 

ASP/Visual Basic代码
  1. Function strLen(iTxt)   
  2.     Dim txt: txt = Trim(iTxt)   
  3.     Dim x: x = Len(txt)   
  4.     Dim y: y = 0   
  5.     Dim ii   
  6.     For ii = 1 To x   
  7.         If Asc(Mid(txt, ii, 1)) <= 255 Then  
  8.             y = y + 2   
  9.         Else    
  10.             y = y + 1   
  11.         End If    
  12.     Next  
  13.     strLen = y   
  14. End Function  

PHP的MSSql的操作类

PHP代码
  1. <?php   
  2. /*MSSql的操作类*/  
  3. class MSSql {   
  4.     var $link;   
  5.     var $querynum = 0;   
  6.   
  7.     /*连接MSSql数据库,参数:dbsn->数据库服务器地址,dbun->登陆用户名,dbpw->登陆密码,dbname->数据库名字*/  
  8.     function Connect($dbsn$dbun$dbpw$dbname) {   
  9.         if($this->link = @mssql_connect($dbsn$dbun$dbpw, true)) {   
  10.             $query = $this->Query('SET TEXTSIZE 2147483647');   
  11.             if (@mssql_select_db($dbname$this->link)) {   
  12.             } else {   
  13.                 $this->halt('Can not Select DataBase');   
  14.             }   
  15.         } else {   
  16.             $this->halt('Can not connect to MSSQL server');   
  17.         }   
  18.     }   
  19.   
  20.     /*执行sql语句,返回对应的结果标识*/  
  21.     function Query($sql) {   
  22.         if($query = @mssql_query($sql$this->link)) {   
  23.             $this->querynum++;   
  24.             return $query;   
  25.         } else {   
  26.             $this->querynum++;   
  27.             $this->halt('MSSQL Query Error'$sql);   
  28.         }   
  29.     }   
  30.   
  31.     /*执行Insert Into语句,并返回最后的insert操作所产生的自动增长的id*/  
  32.     function Insert($table$iarr) {   
  33.         $value = $this->InsertSql($iarr);   
  34.         $query = $this->Query('INSERT INTO ' . $table . ' ' . $value . '; SELECT SCOPE_IDENTITY() AS [insertid];');   
  35.         $record = $this->GetRow($query);   
  36.         $this->Clear($query);   
  37.         return $record['insertid'];   
  38.     }   
  39.   
  40.     /*执行Update语句,并返回最后的update操作所影响的行数*/  
  41.     function Update($table$uarr$condition = '') {   
  42.         $value = $this->UpdateSql($uarr);   
  43.         if ($condition) {   
  44.             $condition = ' WHERE ' . $condition;   
  45.         }   
  46.         $query = $this->Query('UPDATE ' . $table . ' SET ' . $value . $condition . '; SELECT @@ROWCOUNT AS [rowcount];');   
  47.         $record = $this->GetRow($query);   
  48.         $this->Clear($query);   
  49.         return $record['rowcount'];   
  50.     }   
  51.   
  52.     /*执行Delete语句,并返回最后的Delete操作所影响的行数*/  
  53.     function Delete($table$condition = '') {   
  54.         if ($condition) {   
  55.             $condition = ' WHERE ' . $condition;   
  56.         }   
  57.         $query = $this->Query('DELETE ' . $table . $condition . '; SELECT @@ROWCOUNT AS [rowcount];');   
  58.         $record = $this->GetRow($query);   
  59.         $this->Clear($query);   
  60.         return $record['rowcount'];   
  61.     }   
  62.   
  63.     /*将字符转为可以安全保存的mssql值,比如a'a转为a''a*/  
  64.     function EnCode($str) {   
  65.         return str_replace('''''''str_replace(''''$str));   
  66.     }   
  67.   
  68.     /*将可以安全保存的mssql值转为正常的值,比如a''a转为a'a*/  
  69.     function DeCode($str) {   
  70.         return str_replace('''''''$str);   
  71.     }   
  72.   
  73.     /*将对应的列和值生成对应的insert语句,如:array('id' => 1, 'name' => 'name')返回([id], [name]) VALUES (1, 'name')*/  
  74.     function InsertSql($iarr) {   
  75.         if (is_array($iarr)) {   
  76.             $fstr = '';   
  77.             $vstr = '';   
  78.             foreach ($iarr as $key => $val) {   
  79.                 $fstr .= '[' . $key . '], ';   
  80.                 $vstr .= ''' . $val . '', ';   
  81.             }   
  82.             if ($fstr) {   
  83.                 $fstr = '(' . substr($fstr, 0, -2) . ')';   
  84.                 $vstr = '(' . substr($vstr, 0, -2) . ')';   
  85.                 return $fstr . ' VALUES ' . $vstr;   
  86.             } else {   
  87.                 return '';   
  88.             }   
  89.         } else {   
  90.             return '';   
  91.         }   
  92.     }   
  93.   
  94.     /*将对应的列和值生成对应的insert语句,如:array('id' => 1, 'name' => 'name')返回[id] = 1, [name] = 'name'*/  
  95.     function UpdateSql($uarr) {   
  96.         if (is_array($uarr)) {   
  97.             $ustr = '';   
  98.             foreach ($uarr as $key => $val) {   
  99.                 $ustr .= '[' . $key . '] = '' . $val . '', ';   
  100.             }   
  101.             if ($ustr) {   
  102.                 return substr($ustr, 0, -2);   
  103.             } else {   
  104.                 return '';   
  105.             }   
  106.         } else {   
  107.             return '';   
  108.         }   
  109.     }   
  110.   
  111.     /*返回对应的查询标识的结果的一行*/  
  112.     function GetRow($query$result_type = MSSQL_ASSOC) {   
  113.         return mssql_fetch_array($query$result_type);   
  114.     }   
  115.   
  116.     /*清空查询结果所占用的内存资源*/  
  117.     function Clear($query) {   
  118.         return mssql_free_result($query);   
  119.     }   
  120.   
  121.     /*关闭数据库*/  
  122.     function Close() {   
  123.         return mssql_close($this->link);   
  124.     }   
  125.   
  126.     function halt($message = ''$sql = '') {   
  127.         $message .= '<br />MSSql Error:' . mssql_get_last_message();   
  128.         if ($sql) {   
  129.             $sql = '<br />sql:' . $sql;   
  130.         }   
  131.         exit("DataBase Error.<br />Message:$message $sql");   
  132.     }   
  133. }   
  134. ?>  

在下的照片(密码是我的手机号)

该日志已被加密
SQL代码
  1. --====================================/=======================================   
  2. --Powered By CMSDream Copyright © 2007-2008 All rights reserved.   
  3. --13:32 2008-12-26   
  4. --通用获取父节点/子节点/子节点下所有节点ID的存储过程   
  5. --====================================/=======================================   
  6. create proc [dbo].[cmsdream_SP_Navigate](   
  7.     @Type varchar(20),      -- parent/sub/all   
  8.     @TableName varchar(50),     --表名   
  9.     @PrimaryField varchar(50),  --数据表的主ID字段   
  10.     @ParentField varchar(50),   --数据表中的父ID字段   
  11.     @CurrentID int,         --表中当前主ID   
  12.     @OutputField varchar(1000) = '',   
  13.     @OrderField varchar(50) = ''  
  14. )AS  
  15. begin  
  16.     if @CurrentID <= 0 return  
  17.     set @Type = lower(@Type)   
  18.     if @OutputField = '' set @OutputField = '*'  
  19.     declare @sql nvarchar(4000)   
  20.     declare @IDList nvarchar(2000)   
  21.   
  22.     if @Type = 'all'  
  23.     begin  
  24.         set @IDList = cast(@CurrentID As nvarchar(12))   
  25.   
  26.         declare @IDTemp1 nvarchar(2000) set @IDTemp1 = @IDList   
  27.         declare @IDTemp2 nvarchar(2000) set @IDTemp2 = ''  
  28.         declare @SubCount int set @SubCount = 1   
  29.   
  30.         while @SubCount > 0   
  31.         begin  
  32.             set @IDTemp2 = ''  
  33.             if len(@IDTemp1) > 0   
  34.             begin  
  35.                 set @sql = 'select @IDTemp2 = @IDTemp2 + '','' + cast([' + @PrimaryField + '] As nvarchar(12)) from ' + @TableName + ' where [' + @ParentField + '] IN (' + @IDTemp1 + ')'  
  36.                 exec sp_executesql @sql,N'@IDTemp2 nvarchar(2000) output',@IDTemp2 output  
  37.             end  
  38.   
  39.             if len(@IDTemp2) > 1   
  40.             begin  
  41.                 set @IDTemp2 = substring(@IDTemp2,2,len(@IDTemp2)-1)   
  42.                 set @IDList = @IDList + ',' + @IDTemp2   
  43.             end  
  44.             set @IDTemp1 = @IDTemp2   
  45.   
  46.             set @SubCount = 0   
  47.             if len(@IDTemp2) > 1   
  48.             begin  
  49.                 set @sql = 'select @SubCount = count(*) from ' + @TableName + ' where [' + @ParentField + '] IN (0' + @IDTemp2 + ')'  
  50.                 exec sp_executesql @sql,N'@SubCount int output',@SubCount output  
  51.             end  
  52.         end  
  53.         if @OrderField = ''  
  54.             exec('select ' + @OutputField + ' from ' + @TableName + ' where [' + @PrimaryField + '] IN (' + @IDList + ')')   
  55.         else  
  56.             exec('select ' + @OutputField + ' from ' + @TableName + ' where [' + @PrimaryField + '] IN (' + @IDList + ') Order BY ' + @OrderField)   
  57.     end  
  58.   
  59.     if @Type = 'parent'  
  60.     begin  
  61.         set @IDList = cast(@CurrentID As nvarchar(12)) + ','  
  62.         declare @ParentID int set @ParentID = 0   
  63.            
  64.         set @sql = 'select @ParentID = [' + @ParentField + '] from ' + @TableName + ' where [' + @PrimaryField + '] = ' + cast(@CurrentID As nvarchar(12))   
  65.         exec sp_executesql @sql,N'@ParentID int output',@ParentID output  
  66.   
  67.         while @ParentID > 0   
  68.         begin  
  69.             set @IDList = @IDList + cast(@ParentID As nvarchar(12)) + ','  
  70.             set @sql = 'select @ParentID = [' + @ParentField + '] from ' + @TableName + ' where [' + @PrimaryField + '] = ' + cast(@ParentID As nvarchar(12))   
  71.             exec sp_executesql @sql,N'@ParentID int output',@ParentID output  
  72.         end  
  73.         set @IDList = substring(@IDList,1,len(@IDList)-1)   
  74.         if @OrderField = ''  
  75.             exec('select ' + @OutputField + ' from ' + @TableName + ' where [' + @PrimaryField + '] IN (' + @IDList + ')')   
  76.         else  
  77.             exec('select ' + @OutputField + ' from ' + @TableName + ' where [' + @PrimaryField + '] IN (' + @IDList + ') Order BY ' + @OrderField)   
  78.     end  
  79.   
  80.            
  81.     if @Type = 'sub'  
  82.     begin  
  83.         if @OrderField = ''  
  84.             exec('select ' + @OutputField + ' from ' + @TableName + ' where [' + @ParentField + '] = ' + @CurrentID + ' OR [' + @PrimaryField + '] = ' + @CurrentID)   
  85.         else  
  86.             exec('select ' + @OutputField + ' from ' + @TableName + ' where [' + @ParentField + '] = ' + @CurrentID + ' OR [' + @PrimaryField + '] = ' + @CurrentID + ' Order BY ' + @OrderField)   
  87.     end  
  88. end  
  89.   
  90.   
  91. /*   
  92.     --测试   
  93.     exec cmsdream_SP_Navigate 'parent','cmsdream_Nodes','NodeID','ParentID',116,'NodeID,Name','NavSort Desc'  
  94.     exec cmsdream_SP_Navigate 'sub','cmsdream_Nodes','NodeID','ParentID',76,'NodeID,Name'  
  95.     exec cmsdream_SP_Navigate 'all','cmsdream_Nodes','NodeID','ParentID',4,'NodeID,Name'  
  96. */  

【效果】精辟的抖动效果

XML/HTML代码
  1. <img id="win" style='position:relative' src="http://ghost.cmsdream.com/samples/quake/img.jpg"><br /><br />     
  2. <button onclick="quake()">振动</button>     
  3. <script type="text/javascript">     
  4. var a=['top','left'],b=0;      
  5. function quake(u){      
  6.     u=setInterval(function(){      
  7.         document.getElementById('win').style[a[b%2]]=(b++)%4<2?0:4;      
  8.         if(b>15){clearInterval(u);b=0}      
  9.     },32);      
  10. }      
  11. </script>  

预览效果

完美js模拟网页对话框效果(可拖曳)

JavaScript代码
  1. /**  
  2.     Powered By CMSDream Copyright © 2007-2008 All rights reserved.  
  3.     23:25 2008-5-3  
  4. **/  
  5. var msgbox_scripts = document.getElementsByTagName("script");   
  6. msgbox_path = msgbox_path.substring(0, msgbox_path.lastIndexOf('/')+1);   
  7.   
  8. var CMSMsgBox = function(oWidth, oHeight, oSkin, oTitle){   
  9.     this.Id = 'msgbox_'+Math.random().toString().replace('\.''_');   
  10.     /*  
  11.      * 位置  
  12.      * =================  
  13.      * ===== 1 2 3 =====  
  14.      * ===== 4 5 6 =====  
  15.      * ===== 7 8 9 =====  
  16.      * =================  
  17.      */  
  18.     this.Position = 5;   
  19.   
  20.     this.Skin = oSkin || 'default';   
  21.     this.Width = oWidth || 500;   
  22.     this.Height = oHeight || 260;   
  23.        
  24.     this.Title = oTitle || 'CMSDream:';   
  25.     this.Value = '';   
  26.     this.Float = true;   
  27.     this.Mask = false;   
  28.     this.Drag = true;   
  29.     this.Return = false;   
  30.     this.BoxDiv = null;   
  31. };   
  32.   
  33. CMSMsgBox.prototype.show = function(){   
  34.     /* 加载样式表 */  
  35.     if(!this.$('msgbox_styles')){   
  36.         var css = document.createElement('link');   
  37.         css.setAttribute('href', msgbox_path + 'msgbox.css');   
  38.         css.setAttribute('id''msgbox_styles');   
  39.         css.setAttribute('rel''stylesheet');   
  40.         css.setAttribute('type''text/css');   
  41.         document.getElementsByTagName('head')[0].appendChild(css);   
  42.     }   
  43.     if(this.$(this.Id))return false;   
  44.     this.Return = true;   
  45.     this.BoxDiv = this.createDiv(document.body, 'div''block'this.Id, 'msgbox_main_div');       
  46.     if(this.Mask)this.createMask();    
  47.     this.showBox();   
  48. };   
  49.   
  50. CMSMsgBox.prototype.showBox = function(){   
  51.     var self = this;   
  52.     var div = new Array();   
  53.        
  54.     div['box'] = this.createDiv(this.BoxDiv, 'div''block'this.Id+'bgcolor_div''msgbox_box msgbox_box_'+this.Skin);   
  55.     if(this.Width)div['box'].style.width = this.Width+'px';   
  56.     if(this.Height && this.Skin != 'loading')div['box'].style.height = this.Height+'px';   
  57.        
  58.     div['title'] = this.createDiv(div['box'], 'div'nullnull'msgbox_title');   
  59.   
  60.     /* =====================================  
  61.      * 拖曳效果  
  62.      *=====================================**/  
  63.     if(this.Drag){   
  64.         div['move'] = this.createDiv(this.BoxDiv, 'div''none'null'msgbox_move_div');         
  65.         div['title'].style.cursor = 'move';   
  66.         div['title'].onmousedown = function(e){   
  67.             var X = document.all ? event.clientX : e.pageX;   
  68.             var Y = document.all ? event.clientY : e.pageY;   
  69.             var T = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;   
  70.             var cLeft = div['code'].offsetLeft + div['box'].offsetLeft;   
  71.             var cTop = div['code'].offsetTop + div['box'].offsetTop - T;   
  72.             if((X > cLeft && X < (cLeft + div['code'].offsetWidth)) && (Y > cTop && Y < (cTop + div['code'].offsetHeight)))   
  73.             return;   
  74.             this.style.zIndex += 10;       
  75.             this.setAttribute('MD''1');   
  76.             this.setAttribute('XCX', parseInt(X - div['box'].offsetLeft).toString());   
  77.             this.setAttribute('XCY', parseInt(Y - div['box'].offsetTop).toString());   
  78.             div['move'].style.width = parseInt(div['box'].offsetWidth-10) + 'px';   
  79.             div['move'].style.height = parseInt(div['box'].offsetHeight - 10) + 'px';   
  80.             div['move'].style.left = div['box'].offsetLeft + 'px';   
  81.             div['move'].style.top = div['box'].offsetTop + 'px';   
  82.             div['move'].style.display = 'block';   
  83.         };   
  84.         document.onmousemove = function(e){   
  85.             if(div['title'].getAttribute('MD')!='1')return;   
  86.             var XCX = div['title'].getAttribute('XCX');   
  87.             var XCY = div['title'].getAttribute('XCY');   
  88.             var X = document.all ? event.clientX : e.pageX;   
  89.             var Y = document.all ? event.clientY : e.pageY;   
  90.             div['move'].style.left = parseInt(X - XCX) + 'px';   
  91.             div['move'].style.top = parseInt(Y - XCY) + 'px';   
  92.         };   
  93.         document.onmouseup = function(e){   
  94.             if(div['title'].getAttribute('MD')!='1')return;   
  95.             div['title'].setAttribute('MD''0');   
  96.             div['title'].setAttribute('XCX''0');   
  97.             div['title'].setAttribute('XCY''0');   
  98.             div['box'].style.left = div['move'].offsetLeft + 'px';   
  99.             div['box'].style.top = div['move'].offsetTop + 'px';   
  100.             if(self.IsObject(div['mask'])){   
  101.                 div['mask'].style.left = div['move'].offsetLeft + 'px';   
  102.                 div['mask'].style.top = div['move'].offsetTop + 'px';   
  103.             }      
  104.             div['move'].style.display = 'none';   
  105.         };   
  106.     }   
  107.     div['span'] = this.createDiv(div['title'], 'span''block'this.Id+'_msgTitle');   
  108.     div['span'].innerHTML = this.Title;   
  109.   
  110.     /* =====================================  
  111.      * 关闭按钮  
  112.      *=====================================**/  
  113.     div['code'] = this.createDiv(div['title'], 'code''block');   
  114.     div['code'].setAttribute('title''close');   
  115.     div['code'].style.position = 'relative';   
  116.     div['code'].innerHTML = "close";   
  117.     div['code'].onclick = function(){self.close();};   
  118.        
  119.     /* =====================================  
  120.      * 文本区域  
  121.      *=====================================**/  
  122.     div['text'] = this.createDiv(div['box'], 'div''block'this.Id+'_msgContent''msgbox_content');   
  123.     div['value'] = this.createDiv(div['text'], 'div''block'this.Id+'_msgValue''msgbox_container');   
  124.     div['clear'] = this.createDiv(div['text'], 'div''block'null'msgbox_clear');   
  125.     if(this.Height && this.Skin != 'loading'){   
  126.         div['value'].style.height = (div['box'].offsetHeight - div['title'].offsetHeight - 16) + 'px';   
  127.         div['value'].style.overflowY = 'auto';   
  128.     }   
  129.     div['value'].innerHTML = this.Value;   
  130.   
  131.     /* =====================================  
  132.      * 创建一个iframe档住select   
  133.      *=====================================**/  
  134.     if(document.all && !this.Mask){   
  135.         div['mask'] = this.createDiv(this.BoxDiv, 'iframe''block'null'msgbox_frame');   
  136.         div['mask'].style.width = div['box'].offsetWidth+'px';   
  137.         div['mask'].style.height = div['box'].offsetHeight+'px';   
  138.     }      
  139.        
  140.        
  141.     mDiv_Float();      
  142.     if(this.Float){   
  143.         if(window.addEventListener){   
  144.             window.addEventListener('resize', mDiv_Float, false);   
  145.             window.addEventListener('scroll', mDiv_Float, false);   
  146.         }else{   
  147.             window.attachEvent('onresize', mDiv_Float);   
  148.             window.attachEvent('onscroll', mDiv_Float);   
  149.         }   
  150.     }   
  151.   
  152.     /* =====================================  
  153.      * 漂浮效果  
  154.      *=====================================**/  
  155.     function mDiv_Float(){   
  156.         var t = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;   
  157.         var h = document.documentElement.clientHeight ? Math.min(document.documentElement.clientHeight, document.body.clientHeight) : document.body.clientHeight;   
  158.         var w = document.documentElement.clientWidth ? document.documentElement.scrollWidth : document.body.scrollWidth;   
  159.            
  160.         switch(self.Position){   
  161.             case 1:  {var l = 1;var r = t + 1;break;}   
  162.             case 2:  {var l = parseInt((w/2)-(div['box'].offsetWidth/2));var r = t + 1;break;}   
  163.             case 3:  {var l = parseInt(w-div['box'].offsetWidth-1);var r = t + 1;break;}   
  164.             case 4:  {var l = 1;var r = parseInt(t+((h/2)-(div['box'].offsetHeight/2)));break;}   
  165.             case 5:  {var l = parseInt((w/2)-(div['box'].offsetWidth/2));var r = parseInt(t+((h/2)-(div['box'].offsetHeight/2)));break;}   
  166.             case 6:  {var l = parseInt(w-div['box'].offsetWidth-1);var r = parseInt(t+((h/2)-(div['box'].offsetHeight/2)));break;}   
  167.             case 7:  {var l = 1;var r = parseInt(t+(h-div['box'].offsetHeight-1));break;}   
  168.             case 8:  {var l = parseInt((w/2)-(div['box'].offsetWidth/2));var r = parseInt(t+(h-div['box'].offsetHeight-1));break;}   
  169.             case 9:  {var l = parseInt(w-div['box'].offsetWidth-1);var r = parseInt(t+(h-div['box'].offsetHeight-1));break;}   
  170.             default: {var l = parseInt((w/2)-(div['box'].offsetWidth/2));var r = parseInt(t+((h/2)-(div['box'].offsetHeight/2)));break;}   
  171.         }   
  172.            
  173.         div['box'].style.left = l+'px';   
  174.         div['box'].style.top = r+'px';   
  175.         if(document.all && !self.Mask){   
  176.             div['mask'].style.left = l+'px';   
  177.             div['mask'].style.top = r+'px';   
  178.         }   
  179.     }   
  180. };   
  181.   
  182. /* 蒙板 */  
  183. CMSMsgBox.prototype.createMask = function(){   
  184.     var self = this;   
  185.     var div = new Array(1);   
  186.     if(document.all)   
  187.     div['mask_ifr'] = this.createDiv(this.BoxDiv, 'iframe''block'null'msgbox_mask_frame');   
  188.     div['mask_div'] = this.createDiv(this.BoxDiv, 'div''block'null'msgbox_mask_div');   
  189.        
  190.     function window_onresize(){   
  191.         var h = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);           
  192.         var w = document.all ? Math.min(document.documentElement.scrollWidth, document.body.scrollWidth) :    
  193.                 Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);   
  194.            
  195.         div['mask_div'].style.width = w + 'px';   
  196.         div['mask_div'].style.height = h + 'px';   
  197.         if(document.all){   
  198.             div['mask_ifr'].style.width = div['mask_div'].offsetWidth + 'px';   
  199.             div['mask_ifr'].style.height = div['mask_div'].offsetHeight + 'px';   
  200.         }   
  201.     }   
  202.        
  203.     if(window.addEventListener){   
  204.         window.addEventListener('scroll', window_onresize, false);   
  205.         window.addEventListener('resize', window_onresize, false);   
  206.     }else{   
  207.         window.attachEvent('onscroll', window_onresize);   
  208.         window.attachEvent('onresize', window_onresize);   
  209.     }   
  210.     if(this.Skin=='loading')div['mask_div'].ondblclick = function(){self.close();};   
  211.     window_onresize();   
  212. };   
  213.   
  214. /* 创建一个元素  */  
  215. CMSMsgBox.prototype.createDiv = function(iParent, element, display, id, clsname){   
  216.     var ii = document.createElement(element);   
  217.     if(typeof(display)=='string')ii.style.display = display;   
  218.     if(typeof(clsname)=='string')ii.className = clsname;   
  219.     if(typeof(id)=='string')ii.setAttribute('id', id);   
  220.     iParent.appendChild(ii);   
  221.     return ii;   
  222. };   
  223.   
  224. /* 关闭 */  
  225. CMSMsgBox.prototype.close = function(){    
  226.     if(this.IsObject(this.BoxDiv) && this.BoxDiv.parentNode){   
  227.         this.BoxDiv.parentNode.removeChild(this.BoxDiv);   
  228.     }   
  229. };   
  230.   
  231. CMSMsgBox.prototype.$ = function(o){   
  232.     return document.getElementById(o);   
  233. };   
  234.   
  235. CMSMsgBox.prototype.IsObject = function(o){   
  236.     return typeof(o)!='undefined' && o!=null;   
  237. };   
  238.   
  239. CMSMsgBox.prototype.setBackgroundColor=function(iColor){   
  240.     if(!this.$(this.Id+'bgcolor_div'))return;   
  241.     this.$(this.Id+'bgcolor_div').style.backgroundColor = iColor;   
  242. };   
  243.   
  244. CMSMsgBox.prototype.setColor=function(iColor){   
  245.     if(!this.$(this.Id+'_msgValue'))