function photoWindow(ref,L,M,P) {
	 var photo = eval(document.itemorder.photo);
	 
 	 var Middle = eval(document.itemorder.Middle);
	 var Large = eval(document.itemorder.Large);
	 ref = ref + "?photo=" + photo.value;
	 ref = ref + "&Middle=" + Middle.value;
	 ref = ref + "&Large=" + Large.value;
	 //var window_left = (screen.width-640)/2;
	 //var window_top = (screen.height-480)/2;
	// window.open(ref,"checkIDWin",'width=450,height=451,status=no,top=' + window_top + ',left=' + window_left + '');
	 window.open(ref,"checkIDWin",'status=no');
	}

function detail_1_Window(ref,L,M,SP) { //»óÇ°»ó¼¼È­¸é1
	 var Sphoto = eval(document.itemorder.Sphoto);
	 var Middle = eval(document.itemorder.Middle);
	 var Large = eval(document.itemorder.Large);
	 ref = ref + "?Sphoto=" + Sphoto.value;
	 ref = ref + "&Middle=" + Middle.value;
	 ref = ref + "&Large=" + Large.value;
	 //var window_left = (screen.width-640)/2;
	 //var window_top = (screen.height-480)/2;
	// window.open(ref,"checkIDWin",'width=450,height=451,status=no,top=' + window_top + ',left=' + window_left + '');
	 window.open(ref,"checkIDWin",'status=no');
}

function detail_2_Window(ref,L,M,PP) { //»óÇ°»ó¼¼È­¸é2
	 var Pphoto = eval(document.itemorder.Pphoto);
	 var Middle = eval(document.itemorder.Middle);
	 var Large = eval(document.itemorder.Large);
	 ref = ref + "?Pphoto=" + Pphoto.value;
	 ref = ref + "&Middle=" + Middle.value;
	 ref = ref + "&Large=" + Large.value;
	 //var window_left = (screen.width-640)/2;
	 //var window_top = (screen.height-480)/2;
	// window.open(ref,"checkIDWin",'width=450,height=451,status=no,top=' + window_top + ',left=' + window_left + '');
	 window.open(ref,"checkIDWin",'status=no');
}


function detail_3_Window(ref,L,M,TP) { //»óÇ°»ó¼¼È­¸é3
	 var Tphoto = eval(document.itemorder.Tphoto);
	 var Middle = eval(document.itemorder.Middle);
	 var Large = eval(document.itemorder.Large);
	 ref = ref + "?Tphoto=" + Tphoto.value;
	 ref = ref + "&Middle=" + Middle.value;
	 ref = ref + "&Large=" + Large.value;
	 //var window_left = (screen.width-640)/2;
	 //var window_top = (screen.height-480)/2;
	// window.open(ref,"checkIDWin",'width=450,height=451,status=no,top=' + window_top + ',left=' + window_left + '');
	 window.open(ref,"checkIDWin",'status=no');
}




//function photoWindow(ref,L,M,P) {
//	winObj = window.open('img/'+ref+'?'+'Large='+L+'&Middle='+M+'&Photo='+P, 'View', 'width=100,height=100');
//}
//¼ýÀÚ °Ë»ö ÀÚ¹Ù½ºÆ®¸³Æ®
        function Check_Num(tocheck) {
                var isnum = true;

                if (tocheck == null || tocheck == "") {
                        isnum = false;
                        return isnum;
                }

                for (var j = 0 ; j < tocheck.length; j++) {
                        if (tocheck.substring(j, j + 1) != "0" &&
                            tocheck.substring(j, j + 1) != "1" &&
                            tocheck.substring(j, j + 1) != "2" &&
                            tocheck.substring(j, j + 1) != "3" &&
                            tocheck.substring(j, j + 1) != "4" &&
                            tocheck.substring(j, j + 1) != "5" &&
                            tocheck.substring(j, j + 1) != "6" &&
                            tocheck.substring(j, j + 1) != "7" &&
                            tocheck.substring(j, j + 1) != "8" &&
                            tocheck.substring(j, j + 1) != "9") {
                                isnum = false;
                        }
                }
                return isnum;
        }

	function frm_send_cart(frm){

		if( frm.quantitys.value < 50 ){
			alert(" ¾ÆÀÌÂ¯½ºÄðÀÇ ÃÖ¼ÒÁÖ¹®´ÜÀ§´Â 50°³ÀÔ´Ï´Ù.. ");
			frm.quantitys.focus();
			return;
		}

	    thisfilednum = Check_Num(frm.quantitys.value);
        if (!thisfilednum) {
			alert("¼ö·®Àº ¼ýÀÚ¸¸ °¡´ÉÇÕ´Ï´Ù.");
            frm.quantitys.focus();
            return;
        }

		

		frm.action = "./order/item_cookie.php";
		frm.submit();

		return;
	}

	function frm_up_qty(frm){
	
		old_qty = parseInt(frm.quantitys.value);
		
		frm.quantitys.value = old_qty + 1;
		
		return;
	}
	
	function frm_down_qty(frm){
	
		old_qty = parseInt(frm.quantitys.value);
		
		if( old_qty > 0 ){
			frm.quantitys.value = old_qty - 1;
		}	

		return;
	}


