function init(){      

              if( document.body.scrollWidth > (window.screen.availWidth-100) ){        

                      window.dialogWidth = (window.screen.availWidth-100).toString() + "px"    

               }

              else{        

                       window.dialogWidth = (document.body.scrollWidth +10).toString() + "px"    

                }           

              if( document.body.scrollHeight > (window.screen.availHeight-70) ){     

                      window.dialogHeight = (window.screen.availHeight-50).toString() + "px"    

               }else{        

                       window.dialogHeight = (document.body.scrollHeight +10).toString() + "px"    

               }    

                window.dialogLeft = ((window.screen.availWidth - document.body.clientWidth) / 2).toString() + "px" ;    

                window.dialogTop = ((window.screen.availHeight - document.body.clientHeight) / 2).toString() + "px"; \

         }

posted on 2012-08-22 17:46  NeverGiveUp_ZONE  阅读(5900)  评论(0编辑  收藏  举报