//####################################################################################
// ÆË¾÷
//####################################################################################
//±âº»ÆË¾÷Ã¢
function openpop(url) {
	OpenWin = window.open (url,'popup','width=500,height=500,scrollbars=yes,status=no'); 
	OpenWin.focus() ; 
}
function openpop2(url) {
	OpenWin = window.open (url,'popup2','width=500,height=500,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,'check_NO','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,'check_ID','width=400,height=300,scrollbars=no,status=no');
	OpenWin.focus() ; 
}
// popup : niname check
function check_Nic() {
	var url = '/user/join/pop_check_nic.php';
	OpenWin = window.open(url,'check_Nic','width=400,height=300,scrollbars=no,status=no');
	OpenWin.focus() ; 
}
// popup : site check
function check_site() {
	var url = '/user/mypage/my_site/pop_check_site.php';
	OpenWin = window.open(url,'check_site','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 loginPopup(GoUrl) { 
	if(GoUrl) ref = "/login/LoginPop.php?return_page="+GoUrl;
	else ref = "/login/LoginPop.php";
	window.open(ref,'loginPopup','scrollbars=no,toolbar=no,resizable=no,status=no,top=6,left=100,width=600,height=400')
}
function loginLink(GoUrl) {
	//alert(GoUrl);
	if(appVer == "MSIE")  window.event.returnValue = false; // MSIE6,7 javascript onclick error!!!
	top.location.href = "/login/Login.php?return_page="+GoUrl;
}

//####################################################################################
// only image pop
//####################################################################################
function ImgViewer(ImgUrl) {
	window.open('/popup/pop_Img_Viewer.php?ImgUrl='+ImgUrl,'image_viewer','scrollbars=no,toolbar=no,resizable=no,status=no,top=6,left=100,width=600,height=420');
	OpenWin.focus() ; 
}
function ImgViewer2(ImgUrl,width,height){ 
	var width1 = width + 22;
	var height1 = height + 40;
	OpenWin=window.open("", "image_viewer2", "width="+width1+",height="+height1+",scrollbars=yes,status=no");
	OpenWin.focus() ;
	OpenWin.document.write("<html>");
	OpenWin.document.write("<head><title>ÀÌ¹ÌÁö¹Ì¸®º¸±â</title></head>");
	OpenWin.document.write("<body topmargin=0 leftmargin=0>");
	OpenWin.document.write("<img src="+ImgUrl+" onClick='self.close();' style='cursor:hand;' border='0' />");
	OpenWin.document.write("</body>");
	OpenWin.document.write("</html>");
	OpenWin.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';
}


