//·Î±×ÀÎ Ã¼Å©
function logincheck() {

	if(!logform.uid.value)	{
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		logform.uid.focus();
		return false;
		}

	if(!logform.upasswd.value){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		logform.upasswd.focus();
		return false;
	}
		logform.submit();
}

//·Î±×ÀÎ Ã¼Å©
function logincheck_1() {

	if(!signform.uid.value)	{
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		signform.uid.focus();
		return false;
		}

	if(!signform.upasswd.value){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		signform.upasswd.focus();
		return false;
	}
		signform.submit();
}


function login_alert(){
	alert("·Î±× ÈÄ ¿¡ »ç¿ë °¡´É ÇÕ´Ï´Ù.");
	return false;
}

//¾ÆÀÌµð °Ë»ö Ã¢ 
function search_id(name) {
	ref = "../Include/id_search.php?name="+name;
	window.open(ref,'id_search','width=300,height=197,scrollbars=yes,left=500,top=300');
}



//»óÇ° ÀÌ¹ÌÁö ¹Ì¸®º¸±â ÆäÀÌÁö
function ProImgView(imgname,pcode) {	

	ref = "/shopping/zoom.php?imgname="+imgname+"&pcode="+pcode;
	window.open(ref, "preview", "toolbar=no,scrollbars=yes,status=no,resizable=yes,width=500,height=620,top=110,left=110");

}

//»óÇ° ÀÌ¹ÌÁö ¹Ì¸®º¸±â ÆäÀÌÁö
function ImgView(imgname,pcode) {	

	ref = ref = "/Binclude/pop_imgview.php?imgname="+imgname;
	window.open(ref, "preview", "toolbar=no,scrollbars=yes,status=no,resizable=yes,width=500,height=620,top=110,left=110");

}


//¾ÆÀÌµð ªO±â
function IdfindWin() {
	ref = "../Member/pop_idfinddate.php"
	window.open(ref,'id_search','width=321,height=238,scrollbars=no,left=500,top=300');
}

//ºñ¹øÃ£±â
function PwfindWin() {
	ref = "../Member/pop_pwfinddate.php"
	window.open(ref,'id_search','width=321,height=265,scrollbars=no,left=500,top=300');
}




//===== ¿À¸¥ÂÊ ¸¶¿ì½º ¸·´Â ½ºÅ©¸³Æ®½ÃÀÛ ======= //
/*
document.oncontextmenu = function(){return false}
if(document.layers) {
	window.captureEvents(Event.MOUSEDOWN);
	window.onmousedown = function(e){
		if(e.target==document)return false;
	}
}
else {
	document.onmousedown = function(){return false}
}
*/
//===== ¿À¸¥ÂÊ ¸¶¿ì½º ¸·´Â ½ºÅ©¸³Æ® ³¡ ======= //

//===== ¿À¸¥ÂÊ ¸¶¿ì½º ¸·´Â ½ºÅ©¸³Æ®½ÃÀÛ 2======= //
/*
function click() {
if ((event.button==2) || (event.button==3)) {
alert('¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ°Àº »ç¿ëÇÒ¼ö ¾ø½À´Ï´Ù.');
}
}
document.onmousedown=click
*/
//===== ¿À¸¥ÂÊ ¸¶¿ì½º ¸·´Â ½ºÅ©¸³Æ® ³¡ 2 ======= //

function Popup_schinfo(theURL,winName,features) { //v2.0
//ÁÖ¼Ò, À©µµ¿ì ÀÌ¸§, Ã¢¿É¼Ç
  window.open(theURL,winName,features);
}






//ÇÃ·¡½¬ ¿¡¼­ »ç¿ëÇÏ´Â °æ°íÃ¢ÀÌ´Ù.
function MM_popupMsg(msg) {
  alert(msg);
}


//»óÇ°°Ë»ö ÇÏ±â
function ProsearchCheck(){

	if(!prosearchform.key.value){
		alert("°Ë»öÇÒ »óÇ°À» ÀÔ·ÂÇÏ¼¼¿ä");
		prosearchform.key.focus();
		return false;
	}

	return true;
}

//»óÇ°ÂòÇÏ±â 
function ZzimAdd(pcode,type) {

	ref = "/mypage/wishlist_ok.php?type="+type+"&pcode="+pcode;	
	//location.href=ref;
	window.open(ref,'zzimadd','width=200,height=200,top=200');
}



//¸¶¿ì½º µå·¹±× ¸·±â

/*
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
*/
//´Þ·Â Ã¢ ¿­±â ½ºÅ©¸³Æ® teyp=´Þ·Â Á¾·ù°ªÀ» °¡Áö°í °£´Ù. 1,2,3 #### 
function OpenWin(type)	{

	ref = "/Sadmin/Linclude/calendar.php?type="+type;	

	w_width=170;
	w_height=180;

	var xpos = ( screen.width - w_width) / 2;
	var ypos = ( screen.height - w_height)  / 2;	

	msgWindow=window.open(ref,'calendar','toolbar=no,status=no,top='+ ypos +',left='+ xpos +',width=' + w_width + ',height=' + w_height +',directories=no,scrollbars=no,location=no,resizable=no,border=0,menubar=no');
	msgWindow.focus();
}


// input box ³»¿ë Áö¿ì´Â°Å.
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
        thefield.value = ""
} 



//*********** ÆûÃ¼Å© ÇÔ¼ö ****************//
function trim( value )
{
	var ReturnValue = "";
	if( value == "" ) return false;
	for(i=0;i<value.length;i++)
	{
		if(value.charAt(i) != " ") ReturnValue = ReturnValue + value.charAt(i);
	}
	return ReturnValue;
}


function form_writeCheck(form){
	var Msg;
	for (var i=0, I=form.elements.length; i<I; i++){
		var form_ele = form.elements[i];
		var form_value = form_ele.value;
		if(form_ele.Altval){
				if(form_ele.type == "select-one") Msg = "À»(¸¦) ¼±ÅÃÇØÁÖ¼¼¿ä.";
				else Msg = "À»(¸¦) ÀÔ·ÂÇÏ¼¼¿ä.";
				if (trim(form_value) =="" && !form_ele.chk_str){
					if(!form_ele.Altmsg2) alert(form_ele.Altmsg + "" + Msg);
					else alert(form_ele.Altmsg2+"");
					if (form_ele.type != "hidden") form_ele.focus();
					return false;
				}
		}
	}
}
//*********** end ÆûÃ¼Å© ÇÔ¼ö ****************//



/************************************************
	temp1 ÀÌµ¿À» Ã¼Å©ÇÏ´Â ¼ýÀÚ
	temp2 ÆûÀÌ¸§
	temp3ÇöÀç input name
	temp4 ÀÌµ¿ÇÒ input name
*************************************************/
function next_move(temp1, temp2, temp3, temp4){ 

	var now_input = eval('document.'+temp2+'.'+temp3)
	var next_input = eval('document.'+temp2+'.'+temp4)
	
	if (now_input.value.length >= temp1){
		next_input.focus();
	}

}