/*         
 @author ´÷ÀÚÖÇ                                                                        
 @Company: ÄÏ·½¿ÆÄÜ                                                                    
 @Copyright: Copyright (c) 2007 
 */
function GlobalDiv(){
	
}//end GlobalDiv class

   GlobalDiv.prototype.show=function(){
     if(this.globalDiv==null){
      this.init();
     }
     //var bodyScrollWidth=document.documentElement.scrollWidth;
	 //var bodyScrollHeight=document.documentElement.scrollHeight;
	 var bodyScrollWidth=document.body.scrollWidth;
	 var bodyScrollHeight=document.body.scrollHeight;
	 bodyScrollWidth=(bodyScrollWidth<document.body.offsetWidth ? document.body.offsetWidth : bodyScrollWidth);
	 bodyScrollHeight=(bodyScrollHeight<document.body.offsetHeight ? document.body.offsetHeight : bodyScrollHeight);
	 //bodyScrollHeight=bodyScrollHeight;
     this.globalDiv.style.width=bodyScrollWidth+'px';
     this.globalDiv.style.height=bodyScrollHeight+'px';
     this.globalDiv.style.display = "block";
     this.hideElement("select");
     this.hideElement("input");
     this.hideElement("textarea");
   }
   
   GlobalDiv.prototype.hidden=function(){
     this.globalDiv.style.display='none';
     this.showElement("select");
     this.showElement("input");
     this.showElement("textarea");
   }
   GlobalDiv.prototype.resize=function(){
      //var bodyScrollWidth=document.documentElement.scrollWidth;
	  //var bodyScrollHeight=document.documentElement.scrollHeight;
	  var bodyScrollWidth=document.body.scrollWidth;
	 var bodyScrollHeight=document.body.scrollHeight;
	  var globalDiv=document.getElementById("globalDiv");
      globalDiv.style.width=bodyScrollWidth+'px';
      globalDiv.style.height=bodyScrollHeight+'px';
   }
   GlobalDiv.prototype.init=function(){
     var globalDiv=document.createElement('div');
     globalDiv.id='globalDiv';
	 globalDiv.style.display='none';
	 globalDiv.style.zIndex='1';
     globalDiv.style.top = '0px';
     globalDiv.style.left = '0px';
     globalDiv.style.width = '0px';
     globalDiv.style.height = '0px';
     globalDiv.style.position = "absolute";
     globalDiv.style.border = "#333333 0px solid";
     globalDiv.style.cursor = "default";
     globalDiv.style.background = "darkgray";		
     if(navigator.appName.indexOf("Explorer") > -1){
		globalDiv.style.filter="alpha(opacity=30)";
	 }else{
		globalDiv.style.opacity=30/100;
     }
        //document.body.insertAdjacentHTML("afterBegin",globalDiv);
		document.body.appendChild(globalDiv);
		this.globalDiv=globalDiv;
	
   }//end init
   
   GlobalDiv.prototype.hideElement=function(strElementTagName){
	try{
		for(i=0;i<window.document.all.tags(strElementTagName).length; i++){
			var objTemp = window.document.all.tags(strElementTagName)[i];
			objTemp.style.visibility = "hidden";
		}
	}catch(e){
		alert(e.message);
	}
   }//end hideElement
   
   GlobalDiv.prototype.showElement=function(strElementTagName){
	try{
		for(i=0;i<window.document.all.tags(strElementTagName).length; i++){
			var objTemp = window.document.all.tags(strElementTagName)[i];
			objTemp.style.visibility = "visible";
		}
	}catch(e){
		alert(e.message);
	}
   }//end showElement
   
var globalDiv=new GlobalDiv();
