/*
**********************  Window オープン  **************/

function winPop(url,width,height) {

        // Use to pop a new window with browser buttons

        if (url != null) {

                if (width == null) width = 640;

                if (height == null) height = 480;

                var atts = "width=" + (width + 15) + ",height=" + (height + 15) + ",resizable,scrollbar,scrollbars,locationbar,location,menubar,personalbar,statusbar,status,toolbar,directories";

                var newwin = window.open(url, "newwin", atts);

                newwin.focus();

        }

}

function winPopnon(url,width,height) {

        // Use to pop a new window with browser buttons

        if (url != null) {

                if (width == null) width = 640;

                if (height == null) height = 480;

                var atts = "width=" + (width + 15) + ",height=" + (height + 15) + ",resizable";

                var newwin = window.open(url, "newwin", atts);

                newwin.focus();

        }

}
/*
******************  フォーム 数量入力チェック（商品ページ用）  **************/

function existValue(){
	var formLength = document.ToBasket.elements.length;
	var i,j;
	var okStr = '0123456789'
	//alert (formLength);
	var dummy = 0;
	// フォームに値（数量）が入っているかチェック
	for (i=1; i<formLength; i++){
		if (document.ToBasket.elements[i].value != ""){
			dummy = 1;
		}
	}
	if (dummy != 1){
		alert("ご購入したい商品の数量を入力してください。");
		return false;
	// 入力されている文字が半角の数字のみかチェック
	}else{
		for (i=1; i<formLength; i++){
			var str = document.ToBasket.elements[i].value;
			for (j=0; j<str.length; j++){
				if (okStr.indexOf(str.charAt(j)) == -1) {
					dummy++;
				}
    			if (dummy != 1) {
    				alert('入力は半角の数字でお願いします。');
    				return false;
    			} 
    		}
		}
	}
}






/*
**********************  フォーム 値取得（お試し用）  **************/

function sumForm(){
	
}
