//<script type="text/javascript" src="GenPop.js">< /script>
//GenPop.OpenPop("��������",null,"300","85");
//Download by http://www.codefans.net
/***************
 * @ Name Div����
 * @ Version 2.0
 * @ Writer JSPGen
 * @ Time 2008��8��
 * @ Address www.jspgen.com
 * @ E-mail:jspgen@163.com  QQ 190582560
 ***************/

 /************
 * ����Div����
 ************/
var GenPop = {
	"init": null
	//���ֲ�
	,"Mask":function(){
		var DivStr = document.createElement("div"); DivStr.id = "Mask";
		if(window.XMLHttpRequest){
			DivStr.style.width = "100%"; DivStr.style.height = "100%";
		}else{
			var innerwh = Gen_temp.getInnerWH(); var offxy = Gen_temp.getScrollXY();
			DivStr.style.width = (innerwh[0] + offxy[0])+"px";
			DivStr.style.height = (innerwh[1] + offxy[1])+"px";
		}
		document.body.appendChild(DivStr);	Gen_temp.setAlpha("Mask",30);
		Gen_temp.HideShowSelect(0);
	}
	//�򿪴���
	,"OpenPopWin":function(title,url,popw,poph){
		//删除原来存在的窗口
		if($GenId("Pop"))document.body.removeChild($GenId("Pop"));
		if($GenId("Mask"))document.body.removeChild($GenId("Mask"));
		
		if(!url)url = "about:blank";		
		var DivStr = document.createElement("div"); DivStr.id = "Pop";
		DivStr.style.width = parseInt(popw)+"px";	 DivStr.style.height = (parseInt(poph)+30)+"px"; 
		DivStr.innerHTML = "<div class=\"Header\" onMouseDown=\"Gen_temp.StartMove('Pop',event);\" onMouseUp=\"Gen_temp.StopMove();\">"
				+ "	<div class=\"Title\">"+ title +"</div>"
				+ "	<div class=\"Close\" onClick=\"GenPop.ClosePop();\" title=\"关闭\"></div>"
				+ "</div>"
				+ "<div class=\"Content\">"
				+"	<iframe id=\"Pop_iframe\" SCROLLING=\"YES\" name=\"Pop_iframe\" allowTransparency=\"true\" src=\""+url+"\" frameborder=0 height="+poph+"px marginwidth=0 marginheight=0 scrolling=\"no\">�Բ��� ��������֧��IFrame ��ʹ��IE��FF��������°汾����</iframe>"
				+" </div>";
		document.body.appendChild(DivStr);	
		Gen_temp.setCenter("Pop");
		GenPop.Mask();
	}
	//�رղ���
	,"ClosePop":function(){
		document.body.removeChild($GenId("Pop"));
		document.body.removeChild($GenId("Mask"));
		Gen_temp.HideShowSelect(1);
	}
};
