
function LayerPopOpen(elename, uri, w, h) {
	var iMyWidth = (window.screen.width/2) - (w/2 + 10);
	//alert(document.documentElement.scrollTop);
	var iMyHeight = (window.screen.height/2) - (h/2 + 80) + document.documentElement.scrollTop;
	
	var str_tmp = "";
	str_tmp = str_tmp +"<div id=\""+ elename +"\" style=\"left:0px; top:0px; z-index:1;overflow:hidden;display:none;position:absolute;\">";
	str_tmp = str_tmp +"<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" bgcolor=\"#666666\" id=\"table_1\" >";
	str_tmp = str_tmp +"<tr class=\"table1_bbs_tr\">";
	str_tmp = str_tmp +"<td height=\"26\" bgcolor=\"#efefef\" align=\"right\">";
	str_tmp = str_tmp +"<img src='/bklkkg/img/x_btn.gif' onClick=\"javascript:LayerPopClose('"+ elename +"');\" style='cursor:pointer;cursor:hand;'>&nbsp;&nbsp; ";
	str_tmp = str_tmp +"</td>";
	str_tmp = str_tmp +"</tr>";
	str_tmp = str_tmp +"<tr>";
	str_tmp = str_tmp +"<td><iframe name=\"layer_inner_frm\" src=\""+ uri +"\" border=\"0\" frameborder=\"0\" width=\"100%\" height=\""+ (h-29) +"\" ></iframe></td>";
	str_tmp = str_tmp +"</tr>";
	str_tmp = str_tmp +"</table>";
	str_tmp = str_tmp +"</div>";
	
	var eleMother = document.getElementById("layer_popup");
	eleMother.innerHTML = str_tmp; 
	
	var ele = document.getElementById(elename);
	
	if(ele.style.display == 'block') {
		ele.style.display = 'none';
		window.layer_inner_frm.location.href = '';
	} else {
		ele.style.width = w;
		ele.style.height = h;
		ele.style.top = iMyHeight;
		ele.style.left = iMyWidth;
		
		ele.style.display = 'block';
		window.layer_inner_frm.location.href = uri;
	}
}

function LayerPopOpen2(elename, uri, w, h) {
	var iMyWidth = (window.screen.width/2) - (w/2 + 10);
	//alert(document.documentElement.scrollTop);
	var iMyHeight = (window.screen.height/2) - (h/2 + 0) + document.documentElement.scrollTop;
	
	var str_tmp = "";
	str_tmp = str_tmp +"<div id=\""+ elename +"\" style=\"left:0px; top:0px; z-index:1;overflow:hidden;display:none;position:absolute;\">";
	str_tmp = str_tmp +"<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" bgcolor=\"#666666\" id=\"table_1\" >";
	str_tmp = str_tmp +"<tr class=\"table1_bbs_tr\">";
	str_tmp = str_tmp +"<td height=\"26\" bgcolor=\"#efefef\" align=\"right\">";
	str_tmp = str_tmp +"<img src='/bklkkg/img/x_btn.gif' onClick=\"javascript:LayerPopClose('"+ elename +"');\" style='cursor:pointer;cursor:hand;'>&nbsp;&nbsp; ";
	str_tmp = str_tmp +"</td>";
	str_tmp = str_tmp +"</tr>";
	str_tmp = str_tmp +"<tr>";
	str_tmp = str_tmp +"<td><iframe name=\"layer_inner_frm\" src=\""+ uri +"\" border=\"0\" frameborder=\"0\" width=\"100%\" height=\""+ (h-95) +"\" ></iframe></td>";
	str_tmp = str_tmp +"</tr>";
	str_tmp = str_tmp +"<tr>";
	str_tmp = str_tmp +"<td height=\"26\" bgcolor=\"#efefef\" align=\"right\">";
	str_tmp = str_tmp +"<img src='/www/offline/room/images/rd/rd_close_btn.gif' onClick=\"javascript:LayerPopClose('"+ elename +"');\" style='cursor:pointer;cursor:hand;'>";
	str_tmp = str_tmp +"</td>";
	str_tmp = str_tmp +"</tr>";
	str_tmp = str_tmp +"</table>";
	str_tmp = str_tmp +"</div>";
	
	var eleMother = document.getElementById("layer_popup");
       
	
	var ele = document.getElementById(elename);
	
	if(ele.style.display == 'block') {
		ele.style.display = 'none';
		window.layer_inner_frm.location.href = '';
	} else {
		ele.style.width = w;
		ele.style.height = h;
		ele.style.top = iMyHeight;
		ele.style.left = iMyWidth;
		
		ele.style.display = 'block';
		window.layer_inner_frm.location.href = uri;
	}
}

function LayerPopClose(elename) {
	var ele = document.getElementById(elename);
	ele.style.display = 'none';
	window.layer_inner_frm.location.href = '';
	
	var eleMother = document.getElementById("layer_popup");
	eleMother.style.width = 0;
	eleMother.style.height = 0;
	eleMother.style.top = 0;
	eleMother.style.left = 0;
	//eleMother.innerHTML = "&nbsp;";
}


function pop_room(v, m) {
	var uri = "/www/offline/room/pv/rd_main.asp?mmode="+m;
	
	var w = 910;
	var h = 565;
	
	var l = (window.screen.width/2) - (w/2);
	//var t = (window.screen.height/2) - (h/2+20) + document.documentElement.scrollTop;
	var t = (window.screen.height/2) - (h/2);
	
	var winobj = window.open(uri,"roodpop","top="+t+",left="+l+",toolbar=0,status=no,scrollbars=no,location=0,menubar=0,width="+w+",height="+h);
	winobj.focus();
	
	
}

function pop_room2(bw) {
	var uri = "/www/offline/room/pv/rd_main.asp?mmode=OF&bunwon="+bw;
	
	var w = 910;
	var h = 565;
	
	var l = (window.screen.width/2) - (w/2);
	//var t = (window.screen.height/2) - (h/2+20) + document.documentElement.scrollTop;
	var t = (window.screen.height/2) - (h/2);
	
	var winobj = window.open(uri,"roodpop","top="+t+",left="+l+",toolbar=0,status=no,scrollbars=no,location=0,menubar=0,width="+w+",height="+h);
	winobj.focus();
	
	
}

function pop_room3(bw) {
	var uri = "/www/offline/room/pv/rd_main.asp?mmode=AD&bunwon="+bw;
	
	var w = 910;
	var h = 565;
	
	var l = (window.screen.width/2) - (w/2);
	//var t = (window.screen.height/2) - (h/2+20) + document.documentElement.scrollTop;
	var t = (window.screen.height/2) - (h/2);
	
	var winobj = window.open(uri,"roodpop","top="+t+",left="+l+",toolbar=0,status=no,scrollbars=no,location=0,menubar=0,width="+w+",height="+h);
	winobj.focus();
	
	
}



function pop_room_collect(v,arr) {
	
	var uri = "/www/offline/room/pv/rd_sub.asp?collect_id="+v+"&arr="+arr;
	var w = 910;
	var h = 565;
	
	var l = (window.screen.width/2) - (w/2);
	//var t = (window.screen.height/2) - (h/2+20) + document.documentElement.scrollTop;
	var t = (window.screen.height/2) - (h/2);
	
	var winobj = window.open(uri,"roodpop","top="+t+",left="+l+",toolbar=0,status=no,scrollbars=no,location=0,menubar=0,width="+w+",height="+h);
	winobj.focus();
}

function pop_seat(v, arr) {
	
	if (v=="") {
		alert('°­ÀÇ½ÇÀÌ ¹èÁ¤µÇÁö ¾Ê¾Ò½À´Ï´Ù. \r\n \r\n°ü¸®ÀÚ¿¡°Ô ¹®ÀÇ ÇÏ¼¼¿ä. ¢Ï 02-872-8880 ');
	} else {
		if(winobj) {
			winobj.close();
		}
		var uri = "/www/offline/seat/html/"+v+".asp?arr="+arr;
		
		if(v=="201") {
			var w = 600;
			var h = 560;
			var sc = "no";
			
		} else if (v=="301") {
			var w = 617;
			var h = 600;
			var sc = "yes";
			
		} else if (v=="401") {
			var w = 600;
			var h = 540;
			var sc = "no";
			
		} else if (v=="501") {
			var w = 617;
			var h = 600;
			var sc = "yes";
		}
			
		
		
		var l = (window.screen.width/2) - (w/2);
		var t = ((window.screen.height/2) - (h/2))-50;
		
		var winobj = window.open(uri,"seatpop","top="+t+",left="+l+",toolbar=0,status=0,scrollbars="+sc+",location=0,menubar=0,width="+w+",height="+h);
		winobj.focus();
	}
}

