// JavaScript Document

function showFloat(targethtml){
	var float = document.getElementById('dFloating');
	var tagbody = document.getElementsByTagName('body');
	if(float == null){
		tagbody[0].innerHTML += '<div id="dbgFloating"></div>'
								+'<div id="dFloating">'
								+'<div id="closeBT">'
								+'<a href="#" onclick="closeFloat()"><img src="'+docmentFloatingBaseURL+'images/documentFloating/close.gif" border="0" /></a>'
								+'</div>'
								+'<div id="FT-border-up"></div>'
								+'<div id="FT-content">'
								+'<div id="FT-content-left"><div class="up"></div><div id="FT-lc" class="center"></div><div class="down"></div></div>'
								+'<div id="FT-content-bg-up"><div id="floatingContent"></div></div>'
								+'<div id="FT-content-right"><div class="up"></div><div id="FT-lr" class="center"></div><div class="down"></div></div>'
								+'</div>'
								+'<div id="FT-border-down"></div>'
								+'</div>';
	}
	var float = document.getElementById('dFloating');
	var floatbg = document.getElementById('dbgFloating');
	var floatcontent = document.getElementById('floatingContent');
	floatbg.style.height = (tagbody[0].offsetHeight+220)+"px";
	float.style.display = '';
	floatbg.style.display = '';
	dochange2('floatingContent',targethtml);
}
function closeFloat(){
	var float = document.getElementById('dFloating');
	var floatbg = document.getElementById('dbgFloating');
	float.style.display = 'none';
	floatbg.style.display = 'none';
	var fc = document.getElementById('floatingContent');
	fc.innerHTML = "";
	
}
function setAlignDiv(divtarget){
	var floatcontent = document.getElementById(divtarget);
	var tagbody = document.getElementsByTagName('body');
	var left = parseInt((tagbody[0].offsetWidth-floatcontent.offsetWidth)/2);
	floatcontent.style.left = left+'px';
	floatcontent.style.top = '100px';
	var ftlc = document.getElementById('FT-lc');
	var ftlr = document.getElementById('FT-lr');
	var fc = document.getElementById('floatingContent');
	ftlc.style.height = (fc.offsetHeight-465)+"px";
	ftlr.style.height = (fc.offsetHeight-465)+"px";
	//alert(tagbody[0].offsetWidth);
	//alert(floatcontent.offsetWidth);
	
}
function Inint_AJAX() {
   try { return new ActiveXObject("Msxml2.XMLHTTP");  } catch(e) {} //IE
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
   try { return new XMLHttpRequest();          } catch(e) {} //Native Javascript
   alert("XMLHttpRequest not supported");
   return null;
};
function dochange2(src, val) {
     var req = Inint_AJAX();
     req.onreadystatechange = function () { 
          if (req.readyState==4) {
               if (req.status==200) {
                    document.getElementById(src).innerHTML=req.responseText; //ÃÑº¤èÒ¡ÅÑºÁÒ
					setAlignDiv('dFloating');
               } 
          }
     };
     req.open("GET", val); //ÊÃéÒ§ connection
     req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); // set Header
     req.send(null); //Êè§¤èÒ
}