var AtPopup = {
	open: function(no, title, url, left, top, width, height) {
		var box = DIV( { 'id':'popup_'+no, 'class':'popup_header', 'style':'position:absolute; left:'+left+'; top:'+top+'; width:'+width+'; height:'+height+'; z-index:10;text-align:left;' } );

		var div = DIV( {'class':'popup_top'} );

		div.innerHTML = '<table width="100%"><tr><td width="3%"><img src="images/popup_header01.gif"></td><td width="100%"><table class="popup_td"><tr><td style="width:'+(width-25)+';"><IMG src="images/dot.gif" align="absMiddle" hspace="4">'+title+'</td><td ><a onclick="return AtPopup.close('+no+')" href="#"><IMG hspace=3 src="images/box_x.gif" align=absMiddle></a></td></tr></table></td><td width="10%"><img src="images/popup_header02.gif"></td></tr></table>';

		appendChildNodes(box, div);

		var div = DIV( {'class':'popup_center', 'style':'width:'+(width)+'; height:'+(height)+';'} );
		
		div.innerHTML = '<table width="100%" height="100%"><tr><td width="7" background="images/popup_center01.gif"></td><td align="center"><iframe src="'+url+'" id="popup_container" frameborder="0" target="_parent" style="border:0px;width:'+(width-20)+'; height:100%;text-align:center;"></iframe></td><td width="7" background="images/popup_center02.gif"></td></tr></table>';

		//var _iframe	= document.createElement("iframe");
		//updateNodeAttributes(_iframe, { 'src': url, 'id':'popup_container','frameborder':'0', 'target':'_parent', 'style':'border:0px;width:'+(width-15)+'; height:100%;text-align:center;' } );

		// appendChildNodes(div, _iframe);

		appendChildNodes(box, div);

		var div = DIV( {'class':'popup_footer'} );
		div.innerHTML = '<table width="100%"><tr><td width="3%"><img src="images/popup_footer01.gif"></td><td width="100%" align="right"><table class="popup_ftd"><tr><td><INPUT type=checkbox style="BORDER: 0px;" onclick="return AtPopup.dontOpenClose('+no+')" value="checkbox" name=today class="box2"></td><td><a onclick="return AtPopup.dontOpenClose('+no+')" href="#">¿À´ÃÀº ±×¸¸ º¸±â</a></td></tr></table></td><td width="10%"><img src="images/popup_footer02.gif"></td></tr></table>';

		appendChildNodes(box, div);
		
		appendChildNodes(document.body, box);
		connect(box, 'onmousedown', Drag.start);
		connect(box, 'onclick', Drag._stop);
	},
	dontOpenClose: function (popupno)
	{
		AtCookie.setCookie('p'+popupno, '1', 1);
		AtPopup.close(popupno);
		return false;
	},
	close: function (popupno)
	{
		var w = $('popup_'+popupno);
		removeElement(w);
		return false;
	}
};
