// JavaScript Document

function web_form(isboard,isname,isother){
	switch(isboard){
	case "Shop"://店铺
		var is_shop = new Array("",document.getElementsByName(isname+"_1"),document.getElementsByName(isname+"_2"),document.getElementsByName(isname+"_3"));
		for (var x=1;x<is_shop.length;x++){
			if(x == isother){
				for (var y=0;y<is_shop[x].length;y++){
					is_shop[x][y].disabled = false;
				}
			}else{
				for (var y=0;y<is_shop[x].length;y++){
					is_shop[x][y].disabled = true;
				}
			}
		}
		break;
	case "ShopCheck"://检验选择哪家商铺
		var num = 0;
		for (var i=0;i<document.getElementsByName("Shop").length;i++){
			if(document.getElementsByName("Shop")[i].checked == true){
				num = (i+1);
				break;
			}
		}
		return num;
		break;
	case "Print"://打印
		var str="<html>";
		str +=	"<head>";
		str +=	"<meta http-equiv='content-type' content='text/html; charset=utf-8'>";
		str +=	"<title>"+document.title+"</title>";
		str +=	"<style type='text/css'>@import 'inc/css.css';</style>";
		str +=	"</head>";
		str +=	"<body>";
		str +=	"</body>";
		str +=	"</html>";
		document.write(str);
		break;
	}
}

function GetDate(){
	var i,Selected = "",Today = new Date();
	var Year = Today.getYear(),Month = Today.getMonth(),Day = Today.getDay();
	var Hours = Today.getHours(),Minutes = Today.getMinutes();
	document.write("<input name='Year' type='hidden' value='"+Year+"'>");
	document.write("<select name='Month'>");
	for(i=1;i<=12;i++){
		Selected = (i==(Month+1)?" selected='selected'":"");
		document.write("<option value='"+i+"'"+Selected+">"+i+"</option>");
	}
	document.write("</select>月 <select name='Day'>");
	for(i=1;i<=31;i++){
		Selected = (i==Day?" selected='selected'":"");
		document.write("<option value='"+i+"'"+Selected+">"+i+"</option>");
	}
	document.write("</select>日 <select name='Hours'>");
	for(i=1;i<=24;i++){
		Selected = (i==Hours?" selected='selected'":"");
		document.write("<option value='"+i+"'"+Selected+">"+i+"</option>");
	}
	document.write("</select>時 <select name='Minutes'>");
	for(i=1;i<=60;i++){
		Selected = (i==Minutes?" selected='selected'":"");
		document.write("<option value='"+i+"'"+Selected+">"+i+"</option>");
	}
	document.write("</select>分");
}