//####################################################################################
// ÆË¾÷
//####################################################################################
//±âº»ÆË¾÷Ã¢
function openpop(url) {
	OpenWin = window.open (url,'popup','width=400,height=300,scrollbars=yes,status=no'); 
	OpenWin.focus() ; 
}
function openpop2(url) {
	OpenWin = window.open (url,'popup2','width=400,height=300,scrollbars=yes,status=no'); 
	OpenWin.focus() ; 
}
//ÆË¾÷ ¸®»çÀÌÁî
function resize(width,height) {
	var width, height;
	self.resizeTo(width,height);
}
//####################################################################################
// ÆË¾÷(È¸¿ø)
//####################################################################################
// popup : id check
function check_NO() {
	var url = '/user/join/pop_check_no.php';
	OpenWin = window.open(url,'staffNO','width=400,height=300,scrollbars=no,status=no');
	OpenWin.focus() ; 
}
// popup : id check
function check_ID() {
	var url = '/user/join/pop_check_id.php';
	OpenWin = window.open(url,'staffID','width=400,height=300,scrollbars=no,status=no');
	OpenWin.focus() ; 
}
// popup : id check
function check_Nic() {
	var url = '/user/join/pop_check_nic.php';
	OpenWin = window.open(url,'staffID','width=400,height=300,scrollbars=no,status=no');
	OpenWin.focus() ; 
}
// popup : zip popup
function check_zipcode(formcode) {
	var url = "/zipcode/zipsearch.html?formcode="+formcode;
	OpenWin =window.open(url,'zipcode','width=400,height=300,scrollbars=yes,status=no');
	OpenWin.focus() ; 
}

//####################################################################################
// ÆË¾÷(¿©Çà)
//####################################################################################
//¿©ÇàÁöÁ¤º¸
function open_tour(tourID) {
	url = '/popup/pop_tour.php?tourID=' + tourID
	OpenWin = window.open (url,'pop_tour','width=400,height=500,scrollbars=yes,status=no'); 
	OpenWin.focus() ; 
}
//¿©ÇàÁö»çÁø
function open_tourimg(imgID) {
	url = '/popup/pop_tour_img.php?imgID=' + imgID
	OpenWin = window.open (url,'pop_tour_img','width=400,height=500,scrollbars=yes,status=no'); 
	OpenWin.focus() ; 
}
//####################################################################################
// only image pop
//####################################################################################

function ImgViewer_init() {
	var frm=document.viewImg;
	var iWidth  = frm.ShowImg.width + 24 ;
	var iHeight = frm.ShowImg.height + 100;
	window.resize(iWidth, iHeight);
}

function ImgViewer(ImgUrl) {

	var imgwin = window.open('','ImgViewer','scrollbars=no,status=no');
	imgwin.focus();
	imgwin.document.open();
	imgwin.document.write("<html>\n");
	imgwin.document.write("<head>\n");
	imgwin.document.write("<title>ImgViewer</title>\n");
	imgwin.document.write("<script language='javascript' src='/_js/common_pop.js'></script>\n");
	imgwin.document.write("</head>\n");
	imgwin.document.write("<body onload=ImgViewer_init();>\n");
	imgwin.document.write("<form name='viewImg'>\n");
	imgwin.document.write("<img src='"+ImgUrl+"' name='ShowImg' xwidth='100' xheight='90' onClick='self.close();' style='cursor:hand;' border='0' />\n");
	imgwin.document.write("</form>\n");
	imgwin.document.write("</body>\n");
	imgwin.document.write("</html>\n");
	imgwin.document.close();
}
//####################################################################################
// image previewer
//####################################################################################

function show_pic(form,img,names) {	
	//¹Ì¸®º¸±â
    document.images[img].style.display = "none";
    document.images[img].style.display = "";
    document.images[img].src = form.elements[names].value;
	swidth	= document.images[img].width;
	sheight	= document.images[img].height;
	imgsize	= document.images[img].fileSize/1024;//1024->¹ÙÀÌÆ®¸¦ KB·Î,
	simg	= Math.round(imgsize*10)/10; //¼Ò¼öÁ¡Á¦¾î 100:2ÀÚ¶ó, 1000:3ÀÚ¸®
	/*
	if (swidth > 500)		window.alert("ÀÌ¹ÌÁöÅ©±â¸¦ ÁÙ¿©ÁÖ½Ê½Ã¿À.\n\nÀÌ¹ÌÁöÅ©±â "+swidth+"x"+sheight+", ÆÄÀÏÅ©±â "+simg+"KB"); 
	else if (sheight > 500) window.alert("ÀÌ¹ÌÁöÅ©±â¸¦ ÁÙ¿©ÁÖ½Ê½Ã¿À.\n\nÀÌ¹ÌÁöÅ©±â "+swidth+"x"+sheight+", ÆÄÀÏÅ©±â "+simg+"KB"); 
	else if(simg > '400')	window.alert("ÆÄÀÏÅ©±â¸¦ ÁÙ¿©ÁÖ½Ê½Ã¿À.\n\nÀÌ¹ÌÁöÅ©±â "+swidth+"x"+sheight+", ÆÄÀÏÅ©±â "+simg+"KB"); 
	else					window.alert("µî·Ï°¡´ÉÇÕ´Ï´Ù.\n\nÀÌ¹ÌÁöÅ©±â "+swidth+"x"+sheight+", ÆÄÀÏÅ©±â "+simg+"KB"); 
	*/
}


//####################################################################################
// box open
// action => <a href="javascript:dipContents('faq18');" class='p11 a27'>view</a>
// print out => <div id="faq18" style='display:none'>contents</div>
//####################################################################################

var preobj=null;
function nBoxOn(content) {
	obj = eval(content);
	if(obj.style.display=="none") {
		obj.style.display = "";
		if(preobj != null && preobj != obj)
			preobj.style.display = "none";
		preobj = obj;
	} else {
		obj.style.display = "none";
	}
}
function nBoxOff(content) {
	obj = eval(content);
    obj.style.display = 'none';
}

