//TABLE作成スクリプト

var TABLE_WIDTH=0;//TABALEの横幅
var TABLE_TEMP="";//TABLEタグ格納変数
var TABLE_TEMP2="";//背面TABLE用変数

var TABLE_BACK_COLER="#FAFAFA";
//var TABLE_BACK_COLER2="#4D4D4D";
var TABLE_BACK_COLER2="#4C6081";
var TABLE_LINE_COLER="#4C6081";//#838383 

var loop_cnt=0;//ループカウント変数
var list_cnt=0;//ループカウント変数

var qty_max_cnt_array =new  Array();//Qty格納配列
var format_array;//フォーマット格納配列
var format_array_link;//機種固有フォーマット格納配列
var frame_array;//フレームレート格納配列
var image_size_array;//解像度格納配列
var ratio_array;//圧縮率格納配列
var motion_array;//安全率格納配列
var hdd_array;//HDD容量格納配列

//画面左側のリスト作成
//引数flagの値を判定
//0:PAL
//1:NTSC
//その他:エラー
function create_Temporarily_list(flag)
{
	
	//TABLE情報のイニシャライズ
	/*TABLE_Information="WIDTH=100%";	
	
	TABLE_TEMP="<TABLE "+TABLE_Information+" border=1 cellspacing=0 cellpadding=1>\n";
	TABLE_TEMP2="<TABLE "+TABLE_Information+" bgcolor="+TABLE_BACK_COLER2+" cellspacing=0 cellpadding=0><TR><TD>\n";
	
	//head処理
	TABLE_TEMP=TABLE_TEMP2+TABLE_TEMP;
	TABLE_TEMP=TABLE_TEMP+"<TR><TD colspan=3 bgcolor="+TABLE_BACK_COLER+"><CENTER>　　　　検索項目一覧　　　　　　　　</CENTER></TD></TR>";
	
	
	if(flag==0)
	{
		list_cnt=cam_list.length;
	}
	else
	{
		list_cnt=cam_list_ntsc.length;
	}
	
	
	for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
	{
		TABLE_TEMP=TABLE_TEMP+"<TR>";
			TABLE_TEMP=TABLE_TEMP+"<TD width=15% bgcolor="+TABLE_BACK_COLER+"><img src="+cam_list[loop_cnt][0]+"></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=75% bgcolor="+TABLE_BACK_COLER+">"+cam_list[loop_cnt][1]+"</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=10% bgcolor="+TABLE_BACK_COLER+"><input type=checkbox></TD>\n";
		TABLE_TEMP=TABLE_TEMP+"</TR>\n";
	}
	TABLE_TEMP=TABLE_TEMP+"</TABLE>\n";
	TABLE_TEMP=TABLE_TEMP+"</TD></TR></TABLE>\n"
	
	document.writeln(TABLE_TEMP);*/
	//TABLE情報のイニシャライズ
	//2008.02.04	comment by 洪　
	//2008.02.04　　comment by 片山
	//動的から固定に変更
	TABLE_Information="WIDTH=250";　
	//2008.02.04　画面のサイズを修正する
	//TABLE_Information="WIDTH=80%";	
	TABLE_STYLE="style=\"border: solid 1px "+TABLE_LINE_COLER+";\"";
	TABLE_STYLE2="style=\"border-style: ridge; border-color: red ; border-right-width: 1px;der-bottom-width: 1px;border-top-width: 1px;}}\"";

	TABLE_TEMP="<div style=\"width: 93%; height: 360px; overflow-y: scroll; border: solid 1px #838383;background-color: white; scrollbar-base-color: #838383;\" align=\"center\"><TABLE "+TABLE_Information+" border=0 cellspacing=0  cellpadding=0 ><tbody>\n";
	TABLE_TEMP2="<TABLE "+TABLE_Information+" bgcolor="+TABLE_BACK_COLER2+" border=0 cellpadding=0 cellspacing=0><TR><TD "+TABLE_STYLE+"><p align=\"left\"><font size=1><br><br>&nbsp;&nbsp;&nbsp;<img src=\"../image/IPELA.gif\"><br><br><br><br><br><br></font></p><font size=4 color=white style=\"font-size: 18;\"><b>Product List</i></b></font>\n";
	
	//head処理
	TABLE_TEMP=TABLE_TEMP2+TABLE_TEMP;
	
	list_cnt=cam_list.length;
	
	var test_loopcnt=0;
	//for(test_loopcnt=0;test_loopcnt<=2;test_loopcnt++)
	//{
		for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		{
			if(flag==0)
			{
				TABLE_TEMP=TABLE_TEMP+"<TR>";
					TABLE_TEMP=TABLE_TEMP+"<TD bgcolor=white  "+TABLE_STYLE+"><img width=98 height=48  src="+cam_list[loop_cnt][0]+"></TD>\n";
					TABLE_TEMP=TABLE_TEMP+"<TD bgcolor=white  "+TABLE_STYLE+">"+cam_list[loop_cnt][1]+"</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"</TR>\n";
			}
			else if(flag==1)
			{
				TABLE_TEMP=TABLE_TEMP+"<TR>";
					TABLE_TEMP=TABLE_TEMP+"<TD bgcolor=white width=15% "+TABLE_STYLE+"><img width=98 height=48 src="+cam_list_ntsc[loop_cnt][0]+"></TD>\n";
					TABLE_TEMP=TABLE_TEMP+"<TD bgcolor=white  "+TABLE_STYLE+">"+cam_list_ntsc[loop_cnt][1]+"</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"</TR>\n";			
			}
			else
			{
				alert("引数が異常です");
				return;
			}
		}
	//}	
	TABLE_TEMP=TABLE_TEMP+"</tbody></TABLE></div>\n";
	TABLE_TEMP=TABLE_TEMP+"</TD></TR></TABLE>\n"

	//alert(TABLE_TEMP);
	document.writeln(TABLE_TEMP);
	

}

//画面右側のリスト作成
//引数flagの値を判定
//0:PAL
//1:NTSC
//その他:エラー
function create_Sarched_list(flag)
{
	//TABLE情報のイニシャライズ
	TABLE_Information="WIDTH=100%";	
	
	TABLE_TEMP="<div style=\"width: 98%; height: 218px; overflow-y: scroll; border: solid 1px #838383;background-color: white; scrollbar-base-color: "+TABLE_LINE_COLER+";\" align=\"center\"><TABLE id=table1 "+TABLE_Information+" border=1 cellspacing=0 cellpadding=1>\n";
	TABLE_TEMP2="<TABLE id=table2 "+TABLE_Information+" bgcolor="+TABLE_BACK_COLER2+" cellspacing=0 cellpadding=0><TR><TD>\n";
	
	//head処理
	TABLE_TEMP=TABLE_TEMP2+TABLE_TEMP;
	
	list_cnt=cam_list.length;
	
	
	if(flag==0)
	{
		for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		{
			qty_max_cnt_array[0] = cam_list[loop_cnt][2];
			
			testtext = new String(cam_list_format[cam_list[loop_cnt][3]]);
			format_array = testtext.split(",");
			
			testtext = new String(cam_list_image_size[cam_list[loop_cnt][4]]);
			image_size_array = testtext.split(",");
			
			testtext = new String(cam_list_motion[cam_list[loop_cnt][5]]);
			motion_array = testtext.split(",");
			
			//testtext = cam_list[loop_cnt][6];
			format_array_link = cam_list[loop_cnt][6].split(",");
			
			
			
			
			TABLE_TEMP=TABLE_TEMP+"<TR>";
				TABLE_TEMP=TABLE_TEMP+"<TD width=10% bgcolor="+TABLE_BACK_COLER+"><img width=\"80\" height=\"30\" src="+cam_list[loop_cnt][0]+"></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=11% bgcolor="+TABLE_BACK_COLER+">"+cam_list[loop_cnt][1]+"</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=5% bgcolor="+TABLE_BACK_COLER+">"+create_pull_down(qty_max_cnt_array,"select_qty"+loop_cnt,loop_cnt,1)+"</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD   bgcolor="+TABLE_BACK_COLER+">"+create_pull_down(format_array,"select_format"+loop_cnt,loop_cnt,2)+"</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=5% bgcolor="+TABLE_BACK_COLER+"><select><option>　</option><option>1</option></select></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=10% bgcolor="+TABLE_BACK_COLER+">"+create_pull_down(image_size_array,"TEST",loop_cnt,0)+"</TD>\n";
	
				TABLE_TEMP=TABLE_TEMP+"<TD   bgcolor="+TABLE_BACK_COLER+"><select><option>Select format!</option></select></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD   bgcolor="+TABLE_BACK_COLER+">"+create_pull_down(motion_array,"TEST",loop_cnt,0)+"</TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>PerUnit<br>　　kbps<br>× Units<BR>　　kbps</TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>PerUnit<br>　　GB/day<br>× Units<BR>　　GB/day</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD width=5% bgcolor="+TABLE_BACK_COLER+"><input type=checkbox name=chk"+loop_cnt+" value="+loop_cnt+" onclick=\"check_box_count("+loop_cnt+")\"></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		}
	}
	else if(flag==1)
	{
		for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		{
			testtext = new String(cam_list_format[cam_list_ntsc[loop_cnt][3]]);
			format_array = testtext.split(",");
			
			testtext = new String(cam_list_image_size[cam_list_ntsc[loop_cnt][4]]);
			image_size_array = testtext.split(",");
			
			testtext = new String(cam_list_motion[cam_list_ntsc[loop_cnt][5]]);
			motion_array = testtext.split(",");
			
			
			
			TABLE_TEMP=TABLE_TEMP+"<TR>";
				TABLE_TEMP=TABLE_TEMP+"<TD width=10% bgcolor="+TABLE_BACK_COLER+"><img width=\"80\" height=\"30\" src="+cam_list_ntsc[loop_cnt][0]+"></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=11% bgcolor="+TABLE_BACK_COLER+">"+cam_list_ntsc[loop_cnt][1]+"</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=5% bgcolor="+TABLE_BACK_COLER+"><select><option>　　</option><option>0</option><option>1</option></select></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD   bgcolor="+TABLE_BACK_COLER+">"+create_pull_down(format_array,"TEST1",loop_cnt,0)+"</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=5% bgcolor="+TABLE_BACK_COLER+"><select><option>　</option><option>1</option></select></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=10% bgcolor="+TABLE_BACK_COLER+">"+create_pull_down(image_size_array,"TEST",loop_cnt,0)+"</TD>\n";
	
				TABLE_TEMP=TABLE_TEMP+"<TD   bgcolor="+TABLE_BACK_COLER+"><select><option>　</option></select></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD   bgcolor="+TABLE_BACK_COLER+">"+create_pull_down(motion_array,"TEST",loop_cnt,0)+"</TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>PerUnit<br>　　kbps<br>× Units<BR>　　kbps</TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>PerUnit<br>　　GB/day<br>× Units<BR>　　GB/day</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=150  bgcolor="+TABLE_BACK_COLER+" align=left>　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD width=5% bgcolor="+TABLE_BACK_COLER+"><input type=checkbox name=chk"+loop_cnt+" value="+loop_cnt+" onclick=\"check_box_count("+loop_cnt+")\"></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		}	
	}
	else
	{
		alert("引数の値が異常です");
		return;
	}
	TABLE_TEMP=TABLE_TEMP+"</TABLE>\n";
	TABLE_TEMP=TABLE_TEMP+"</div></TD></TR></TABLE>\n"
	TABLE_TEMP=TABLE_TEMP+"<input type=hidden name=tr_count value="+loop_cnt+">\n"
	TABLE_TEMP=TABLE_TEMP+"<input type=hidden name=chk_count value=0>\n"
	
	//alert(TABLE_TEMP);
	document.writeln(TABLE_TEMP);
	

}

//画面右側のリスト作成
//引数flagの値を判定
//0:PAL
//1:NTSC
//その他:エラー
function create_initial_list(flag)
{
	//TABLE情報のイニシャライズ
	//TABLE_Information="WIDTH=780";
	TABLE_Information="WIDTH=852";
	TABLE_STYLE=" style=\"border: solid 1px "+TABLE_LINE_COLER+";\"";
	
	TABLE_TEMP="<div style=\"width: 98%; height: 240px; overflow-y: scroll; border: solid 1px #838383;background-color: white; scrollbar-base-color: "+TABLE_LINE_COLER+";\" align=\"center\"><TABLE id=table1 "+TABLE_Information+" border=0 cellspacing=0 cellpadding=1>\n";
	TABLE_TEMP2="<TABLE id=table2 "+TABLE_Information+" bgcolor="+TABLE_BACK_COLER2+" cellspacing=0 cellpadding=0 border=0 ><TR><TD>\n";
	
	//head処理
	TABLE_TEMP=TABLE_TEMP2+TABLE_TEMP;
	
	if(flag==0)
	{
		list_cnt=cam_list.length;
	}
	else
	{
		list_cnt=cam_list_ntsc.length;
	}
	//list_cnt=cam_list.length;
	
	var model_master_name = new Array();//機種名
	
	//var model_master_str="<select name=\"select_model\" onchange=\"add_tables(this.form.select_model,";
	//var model_master_str2="><option>　</option>\n";
	
	//masta_data更新
	arr_flag = flag;
	
	if(flag==0)
	{	
		for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		{
			//model_master_str2 = model_master_str2+"<option value=";
			//model_master_str2 = model_master_str2+loop_cnt+">"+cam_list[loop_cnt][1]+"</option>\n";
			model_master_name[loop_cnt]=cam_list[loop_cnt][1];
		}
		//model_master_str2 = model_master_str2+"</select>";
		
		//for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		//for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		for(loop_cnt=0;loop_cnt<18;loop_cnt++)
		{
			qty_max_cnt_array[0] = cam_list[loop_cnt][2];
			
			testtext = new String(cam_list_format[cam_list[loop_cnt][3]]);
			format_array = testtext.split(",");
			
			testtext = new String(cam_list_image_size[cam_list[loop_cnt][4]]);
			image_size_array = testtext.split(",");
			
			testtext = new String(cam_list_motion[cam_list[loop_cnt][5]]);
			motion_array = testtext.split(",");
			
			//testtext = cam_list[loop_cnt][6];
			format_array_link = cam_list[loop_cnt][6].split(",");
			
			
			
			
			TABLE_TEMP=TABLE_TEMP+"<TR>";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=60 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+"><img width=\"80\" height=\"30\" src="+cam_list[loop_cnt][0]+"></TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=11% valign=\"top\" bgcolor="+TABLE_BACK_COLER+</font>">"+model_master_str+loop_cnt+")\""+model_master_str2+"</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=15 valign=\"top\" align=\"center\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" ><font style=\"font-size: 16;\">"+(loop_cnt+1)+"</font></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=25 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+"><input type=checkbox name=chk"+loop_cnt+" value="+loop_cnt+" onclick=\"check_box_count("+loop_cnt+")\" disabled></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=60 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">"+create_pull_down(model_master_name,"select_model",loop_cnt,3,-1)+"</TD>\n";	
				TABLE_TEMP=TABLE_TEMP+"<TD width=40 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=63 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";

				TABLE_TEMP=TABLE_TEMP+"<TD width=82 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";				
				TABLE_TEMP=TABLE_TEMP+"<TD  width=108 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=46 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				//TABLE_TEMP=TABLE_TEMP+"<TD width=80  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>PerUnit<br>　　kbps<br>× Units<BR>　　kbps</TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=50  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>PerUnit<br>　　GB/day<br>× Units<BR>　　GB/day</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=93 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";
				

			TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		}
	}
	else if(flag==1)
	{
		for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		{
			//model_master_str2 = model_master_str2+"<option value=";
			//model_master_str2 = model_master_str2+loop_cnt+">"+cam_list_ntsc[loop_cnt][1]+"</option>\n";
			model_master_name[loop_cnt]=cam_list_ntsc[loop_cnt][1];
		}
		//model_master_str2 = model_master_str2+"</select>";
		
		for(loop_cnt=0;loop_cnt<18;loop_cnt++)
		{
			qty_max_cnt_array[0] = cam_list_ntsc[loop_cnt][2];
			
			testtext = new String(cam_list_format[cam_list_ntsc[loop_cnt][3]]);
			format_array = testtext.split(",");
			
			testtext = new String(cam_list_image_size[cam_list_ntsc[loop_cnt][4]]);
			image_size_array = testtext.split(",");
			
			testtext = new String(cam_list_motion[cam_list_ntsc[loop_cnt][5]]);
			motion_array = testtext.split(",");
			
			//testtext = cam_list[loop_cnt][6];
			format_array_link = cam_list_ntsc[loop_cnt][6].split(",");
			
			
			TABLE_TEMP=TABLE_TEMP+"<TR>";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=60 valign=\"top\" bgcolor="+TABLE_BACK_COLER+"><img width=\"80\" height=\"30\" src="+cam_list[loop_cnt][0]+"></TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=11% valign=\"top\" bgcolor="+TABLE_BACK_COLER+">"+model_master_str+loop_cnt+")\""+model_master_str2+"</TD>\n";
				/*TABLE_TEMP=TABLE_TEMP+"<TD width=15 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=\"center\"><font style=\"font-size: 16;\">"+(loop_cnt+1)+"</font></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=25 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+"><input type=checkbox name=chk"+loop_cnt+" value="+loop_cnt+" onclick=\"check_box_count("+loop_cnt+")\" disabled></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=60 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">"+create_pull_down(model_master_name,"select_model",loop_cnt,3,-1)+"</TD>\n";	
				TABLE_TEMP=TABLE_TEMP+"<TD width=40 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=63 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD width=46 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=82 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD  width=100 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				//TABLE_TEMP=TABLE_TEMP+"<TD width=80 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+" align=left>PerUnit<br>　　kbps<br>× Units<BR>　　kbps</TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=50 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+" align=left>PerUnit<br>　　GB/day<br>× Units<BR>　　GB/day</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=95 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";
				*/
				TABLE_TEMP=TABLE_TEMP+"<TD width=15 valign=\"top\" align=\"center\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" ><font style=\"font-size: 16;\">"+(loop_cnt+1)+"</font></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=25 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+"><input type=checkbox name=chk"+loop_cnt+" value="+loop_cnt+" onclick=\"check_box_count("+loop_cnt+")\" disabled></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=60 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">"+create_pull_down(model_master_name,"select_model",loop_cnt,3,-1)+"</TD>\n";	
				TABLE_TEMP=TABLE_TEMP+"<TD width=40 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=63 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";

				TABLE_TEMP=TABLE_TEMP+"<TD width=82 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";				
				TABLE_TEMP=TABLE_TEMP+"<TD  width=108 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=46 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				//TABLE_TEMP=TABLE_TEMP+"<TD width=80  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>PerUnit<br>　　kbps<br>× Units<BR>　　kbps</TD>\n";
				//TABLE_TEMP=TABLE_TEMP+"<TD width=50  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>PerUnit<br>　　GB/day<br>× Units<BR>　　GB/day</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=93 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";


			TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		}	
	}
	else if(flag==2)
	{
		for(loop_cnt=0;loop_cnt<list_cnt;loop_cnt++)
		{
			model_master_name[loop_cnt]=cam_list_ntsc[loop_cnt][1];
		}
		
		for(loop_cnt=0;loop_cnt<18;loop_cnt++)
		{
			qty_max_cnt_array[0] = cam_list_ntsc[loop_cnt][2];
			
			testtext = new String(cam_list_format[cam_list_ntsc[loop_cnt][3]]);
			format_array = testtext.split(",");
			
			testtext = new String(cam_list_image_size[cam_list_ntsc[loop_cnt][4]]);
			image_size_array = testtext.split(",");
			
			testtext = new String(cam_list_motion[cam_list_ntsc[loop_cnt][5]]);
			motion_array = testtext.split(",");
			
			format_array_link = cam_list_ntsc[loop_cnt][6].split(",");
			
			
			TABLE_TEMP=TABLE_TEMP+"<TR>";
				TABLE_TEMP=TABLE_TEMP+"<TD width=15 valign=\"top\" align=\"center\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" ><font style=\"font-size: 16;\">"+(loop_cnt+1)+"</font></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=25 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+"><input type=checkbox name=chk"+loop_cnt+" value="+loop_cnt+" onclick=\"check_box_count("+loop_cnt+")\" disabled></TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=105 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";	
				TABLE_TEMP=TABLE_TEMP+"<TD width=40 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=63 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD width=46 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD width=82 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD  width=108 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  width=62 valign=\"top\" bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+">　</TD>\n";
				
				TABLE_TEMP=TABLE_TEMP+"<TD width=93 valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";
				TABLE_TEMP=TABLE_TEMP+"<TD  valign=\"top\"  bgcolor="+TABLE_BACK_COLER+TABLE_STYLE+" align=left>　</TD>\n";
				

			TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		}	
	}
	else
	{
		alert("引数の値が異常です");
		return;
	}
	TABLE_TEMP=TABLE_TEMP+"</TABLE>\n";
	TABLE_TEMP=TABLE_TEMP+"</div></TD></TR></TABLE>\n"
	TABLE_TEMP=TABLE_TEMP+"<input type=hidden name=tr_count value="+loop_cnt+">\n"
	TABLE_TEMP=TABLE_TEMP+"<input type=hidden name=chk_count value=0>\n"
	
	//alert(TABLE_TEMP);
	document.writeln(TABLE_TEMP);
	

}

//メニュー項目作成
function create_mane_table(flag)
{
	//TABLE情報のイニシャライズ
	//TABLE_Information="WIDTH=100%";	
	TABLE_Information="WIDTH=880";
	TABLE_STYLE="style=\"border: solid 1px "+TABLE_LINE_COLER+";\"";
	//TABLE_STYLE="style=\"border: solid 1px #838383;\"";
	TABLE_STYLE2="style=\"border-style: ridge; border-color: red ; border-right-width: 1px;der-bottom-width: 1px;border-top-width: 1px;}}\"";
	
	TABLE_TEMP="<TABLE  "+TABLE_Information+" border=0 cellspacing=0  cellpadding=0 >\n";
	TABLE_TEMP2="<TABLE "+TABLE_Information+" bgcolor="+TABLE_BACK_COLER2+" border=0 cellpadding=0 cellspacing=0><TR><TD>\n";
	
	//head処理
	TABLE_TEMP=TABLE_TEMP2+TABLE_TEMP;
	
	list_cnt=cam_list.length;

		TABLE_TEMP=TABLE_TEMP+"<TR style=\"border-style: solid; border-width: 1px;\">";
		TABLE_TEMP=TABLE_TEMP+"<TD width=625  "+TABLE_STYLE+" colspan=\"8\" align=\"left\" valign=\"bottom\"><br>&nbsp;<img src=\"../image/IPELA.gif\"><font style=\"font-size: 20px;\"><b>　Network Camera Storage Calculator</b></font><p align=\"right\"></p></TD>\n";
		TABLE_TEMP=TABLE_TEMP+"<TD width=260  "+TABLE_STYLE+"  align=\"right\" colspan=\"3\" valign=\"top\"><br><img src=\"../image/Sony_Logo.gif\">&nbsp;&nbsp;&nbsp;</TD>\n";
		
		TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		
		TABLE_TEMP=TABLE_TEMP+"<TR style=\"border-style: solid; border-width: 1px;\">";
			/*TABLE_TEMP=TABLE_TEMP+"<TD width=24% bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">Add Cameras</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=5%  bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">Qty</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=5% bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">tpa</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=10% bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">Resolution</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=9% bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">format</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=10% bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">rate</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=15% bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">TEST</TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=14% bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">TEST<br>TEST<br></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD  bgcolor="+TABLE_BACK_COLER+" "+TABLE_STYLE+">SELECT<br>TEST<br></TD>\n";*/
			
			/*TABLE_TEMP=TABLE_TEMP+"<TD width=19%  "+TABLE_STYLE+" align=\"center\"><font color=white>Add Cameras</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=6%   "+TABLE_STYLE+" align=\"center\"><font color=white>Qty</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=8%   "+TABLE_STYLE+" align=\"center\"><font color=white>Com<BR>pression<BR>format</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=6%   "+TABLE_STYLE+" align=\"center\"><font color=white>Frame rate<br>(fps)</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=9%  "+TABLE_STYLE+" align=\"center\"><font color=white>Image<BR>resolution</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=6%  "+TABLE_STYLE+" align=\"center\"><font color=white>Com<BR>pression<BR>ratio</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=10%  "+TABLE_STYLE+" align=\"center\"><font color=white>Percentage<br> of<BR>Motion</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=17%  "+TABLE_STYLE+" align=\"left\"><font color=white>Bandwidth<BR>Required</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=15%  "+TABLE_STYLE+"  colspan=\"2\"><font color=white>&nbsp;Storage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Select<BR>Required</font></TD>\n";
			//TABLE_TEMP=TABLE_TEMP+"<TD width=5%  "+TABLE_STYLE+" align=\"center\"><font color=white>&nbsp;&nbsp;&nbsp;Select</font></TD>\n";*/

			
			TABLE_TEMP=TABLE_TEMP+"<TD width=53 "+TABLE_STYLE+"   align=\"center\"><font color=white style=\"font-size: 14px;\">Select</font></TD>\n";
			
			if (flag==0)//2008.2.4　　洪　PALの場合
			{
				TABLE_TEMP=TABLE_TEMP+"<TD width=105  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Select Product<BR><!--<a href=\"javascript:win_open(2) \">Go Product list</a>--></font></TD>\n";
			}
			else if (flag==1)//2008.2.4　　洪　NTSCの場合
			{
				TABLE_TEMP=TABLE_TEMP+"<TD width=105  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Select Product<BR><!--<a href=\"javascript:win_open(3) \">Go Product list</a>--></font></TD>\n";
			} else//2008.2.4　　洪　引数が有効範囲外の場合
			{
				alert("引数の値が異常です");
				return;
			}
			TABLE_TEMP=TABLE_TEMP+"<TD width=45   "+TABLE_STYLE+" align=\"center\"><font color=white style=\"font-size: 14px;\">Qty</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=66   "+TABLE_STYLE+" align=\"center\"><font color=white style=\"font-size: 14px;\">Com-<BR>pression<BR>Format</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=86  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Image<BR>Resolution</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=106  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Quality<br>/Compression</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=48   "+TABLE_STYLE+" align=\"center\"><font color=white style=\"font-size: 14px;\">Frame<br>Rate<br>(fps)</font></TD>\n";
			//TABLE_TEMP=TABLE_TEMP+"<TD width=63  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Percen<br>tage<br> of<BR>Motion</font></TD>\n";

// 2007.09.07 Modified by Yoshiaki Abe - Motionの表記を変更
			//TABLE_TEMP=TABLE_TEMP+"<TD width=63  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Recording Time/Day</font></TD>\n";
			//2007.1.23katayama
			//2月修正分　表示名変更
			TABLE_TEMP=TABLE_TEMP+"<TD width=63  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Operation<BR>Hours (h)</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=63  "+TABLE_STYLE+"  align=\"center\"><font color=white style=\"font-size: 14px;\">Activity(%)</font></TD>\n";
			
			TABLE_TEMP=TABLE_TEMP+"<TD width=100  "+TABLE_STYLE+" align=\"center\"><font color=white style=\"font-size: 14px;\">Bandwidth<BR>Required</font></TD>\n";
			TABLE_TEMP=TABLE_TEMP+"<TD width=145  "+TABLE_STYLE+" align=\"center\"><font color=white style=\"font-size: 14px;\">Storage<BR>Required</font></TD>\n";

						
			
		TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		
	TABLE_TEMP=TABLE_TEMP+"</TABLE>\n";
	TABLE_TEMP=TABLE_TEMP+"</TD></TR></TABLE>\n"

	//alert(TABLE_TEMP);
	document.writeln(TABLE_TEMP);
	

}

//計算結果格納オブジェクト生成
function create_obj_table(flag)
{
	//TABLE情報のイニシャライズ
	//TABLE_Information="WIDTH=800";	
	TABLE_Information="WIDTH=852";

	TABLE_STYLE="style=\"border: solid 1px "+TABLE_LINE_COLER+";\"";
	TABLE_STYLE2="style=\"border-style: ridge; border-color: red ; border-right-width: 1px;der-bottom-width: 1px;border-top-width: 1px;}}\"";
	
	TABLE_TEMP="<TABLE id=table3 "+TABLE_Information+" border=0 cellspacing=0  cellpadding=0 >\n";
	TABLE_TEMP2="<TABLE id=table4 "+TABLE_Information+" bgcolor="+TABLE_BACK_COLER2+" border=0 cellpadding=0 cellspacing=0><TR><TD>\n";
	
	testtext = new String(cam_list_hdd[0]);
	hdd_array = testtext.split(",");

	if(flag!=0 && flag!=1)
	{
		alert("引数の値が異常です");
		return;
	}
	
	//head処理
	TABLE_TEMP=TABLE_TEMP2+TABLE_TEMP;
	
	list_cnt=cam_list.length;
	

		TABLE_TEMP=TABLE_TEMP+"<TR style=\"border-style: solid; border-width: 1px;\">";
		TABLE_TEMP=TABLE_TEMP+"<TD width=110 align=left  "+TABLE_STYLE+"><font color=white>　</font></TD>\n";
		TABLE_TEMP=TABLE_TEMP+"<TD width=519 align=left  "+TABLE_STYLE+"><font color=white style=\"font-size: 16;\">Totals ： 0 Cameras</font></TD>\n";
		TABLE_TEMP=TABLE_TEMP+"<TD width=108 align=right   "+TABLE_STYLE+"><font color=white style=\"font-size: 16;\">0.00kbps</font></TD>\n";
		TABLE_TEMP=TABLE_TEMP+"<TD width=115 align=right   "+TABLE_STYLE+"><font color=white style=\"font-size: 16;\">　0.00GB/day　</font></TD>\n";
		
		//TABLE_TEMP=TABLE_TEMP+"<TD   "+TABLE_STYLE+"><input type=text size=20>　　<input type=text size=20></TD>\n";
		
		TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		TABLE_TEMP=TABLE_TEMP+"<TR style=\"border-style: solid; border-width: 1px;\">";
		TABLE_TEMP=TABLE_TEMP+"<TD width=60% align=left  "+TABLE_STYLE+" colspan=4><font color=white style=\"font-size: 16;\">Storage Capacity of "+create_pull_down(hdd_array,"hdd_list",1,4,7)+" will last approximately<input type=text name=\"day_text\" readonly  size=3> Days and <input type=text name=\"hours_text\" readonly  size=3> Hours.</font></TD>\n";

		TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		
		TABLE_TEMP=TABLE_TEMP+"<TR style=\"border-style: solid; border-width: 1px;\">";
		if(flag==0)
		{
			TABLE_TEMP=TABLE_TEMP+"<TD width=60% align=center  "+TABLE_STYLE+" colspan=4><br>　　　　　　　　　　<input type=\"button\" value=\"　All Clear　\" onclick=\"All_Clear()\">　　　　　<input type=\"button\" value=\"Go to Printable page\" onclick=\"win_open(1)\"><br></TD>\n";
		}
		else
		{
			TABLE_TEMP=TABLE_TEMP+"<TD width=60% align=center  "+TABLE_STYLE+" colspan=4><br><br></TD>\n";

		}
		TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		
		
		TABLE_TEMP=TABLE_TEMP+"<TR style=\"border-style: solid; border-width: 1px;\">";
		if(flag==0)
		{
			TABLE_TEMP=TABLE_TEMP+"<TD align=left  "+TABLE_STYLE+" colspan=\"4\"><font color=black style=\"font-size: 13px;\">Copyright 2007 Sony Corporation<br><a href=\"javascript:win_open(0) \" style=\"font-size: 13px;\">Use Conditions</a></font> <input type=\"hidden\" name=\"totals_qty\" value=0> <input type=\"hidden\" name=\"totals_band_qty\" value=0> <input type=\"hidden\" name=\"totals_sto_qty\" value=0></TD>\n";
		}
		else
		{
			TABLE_TEMP=TABLE_TEMP+"<TD align=left  "+TABLE_STYLE+" colspan=\"4\"><font color=black style=\"font-size: 13px;\">Copyright 2007 Sony Corporation</font> <input type=\"hidden\" name=\"totals_qty\" value=0> <input type=\"hidden\" name=\"totals_band_qty\" value=0> <input type=\"hidden\" name=\"totals_sto_qty\" value=0></TD>\n";
		}
		TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		
		//TABLE_TEMP=TABLE_TEMP+"<TR style=\"border-style: solid; border-width: 1px;\">";
		//	TABLE_TEMP=TABLE_TEMP+"<TD align=left  "+TABLE_STYLE+" colspan=\"4\"><font color=black><a href=\"javascript:win_open() \" style=\"font-size: 13px;\">Service Condition</a></font></TD>\n";
		//	TABLE_TEMP=TABLE_TEMP+"</TR>\n";
		
	TABLE_TEMP=TABLE_TEMP+"</TABLE>\n";
	TABLE_TEMP=TABLE_TEMP+"</TD></TR></TABLE>\n"

	//alert(TABLE_TEMP);
	document.writeln(TABLE_TEMP);
	

}

//メニュー画面生成


//プルダウンメニュー生成
function create_pull_down(value_arrey,name,table_coordinate,change_flag,selected_idno)
{
	
	//ループカウント変数
	var arr_cnt = 0;	
	//配列長格納変数
	var arr_length=value_arrey.length;
	
	//Level値格納変数
	var level_str;
	
	//引数判定
	if(typeof(value_arrey)!="object")
	{

		alert("第一引数の型が異常です");
		return;
	}
	if(typeof(name)!="string")
	{

		alert("第二引数の型が異常です");
		return;
	}
	if(typeof(table_coordinate)!="number")
	{
		alert(typeof(table_coordinate));
		alert("第三引数の型が異常です");
		return;
	}	
	if(typeof(change_flag)!="number")
	{
		alert("第四引数の型が異常です");
		return;
	}	
	if(typeof(selected_idno)!="number")
	{
		alert("第五引数の型が異常です");
		return;
	}
	
	//プルダウンの初期値設定
	var selected_str="";

	
	//処理分岐フラグの判定
	//0:デフォルト
	//1:
	//2:
	//3:
	//4:
	//5:
	//6:
	//selectタグの生成を行う
	if(change_flag==0)
	{
		//セレクトタグテンプレート生成
		var temp_select="<SELECT name="+name+" onchange=\"individual_model_cal("+table_coordinate+")\">\n";
	}
	else if(change_flag==1)
	{
		//セレクトタグテンプレート生成
		//var temp_select="<SELECT name="+name+" onchange=\"change_format("+table_coordinate+",this.form.select_format"+table_coordinate+")\">\n<option value=\"\">　　　</option>\n";
		var temp_select="<SELECT name="+name+" onchange=\"individual_model_cal("+table_coordinate+")\">\n";
		
		arr_length = value_arrey[0];
	}
	else if(change_flag==2)
	{
		//セレクトタグテンプレート生成
		var temp_select="<SELECT name="+name+" onchange=\"change_format("+table_coordinate+",this.form.select_format"+table_coordinate+")\">";
	}
	else if(change_flag==3)
	{
		//セレクトタグテンプレート生成
		var temp_select="<SELECT name="+name+table_coordinate+" onchange=\"add_tables(this.form."+name+table_coordinate+","+table_coordinate+")\">\n<option value=\"\">　　　</option>\n";		
	}
	else if(change_flag==4)
	{
		//セレクトタグテンプレート生成
		//var temp_select="<SELECT name="+name+table_coordinate+" onchange=\"totals_cal()\">\n";		
		//セレクトタグテンプレート生成
		var temp_select="<SELECT name="+name+" onchange=\"totals_cal()\">\n";
	}
	else if(change_flag==5)
	{
		//セレクトタグテンプレート生成
		//var temp_select="<SELECT name="+name+table_coordinate+" onchange=\"add_tables(this.form."+name+table_coordinate+","+table_coordinate+")\">\n<option value=\"\">　　　</option>\n";		
		//セレクトタグテンプレート生成

// 2007.09.07 Modified by Yoshiaki Abe - Motionを変更すると再計算されるようにした。
		var temp_select="<SELECT name="+name+" onchange=\"individual_model_cal("+table_coordinate+")\">\n";
		
	}
	else if(change_flag==6)
	{
		//セレクトタグテンプレート生成
		//var temp_select="<SELECT name="+name+" onchange=\"test("+int_test+")\">\n<option value=\"\">　　　</option>\n";
			var temp_select="<SELECT name="+name+" onchange=\"individual_model_cal("+table_coordinate+")\">\n";
	
	}
	else
	{
		alert("引数の値が異常です");
		return;
	}

	//Optionタグの生成を行う
	for(arr_cnt=0;arr_cnt<arr_length;arr_cnt++)
	{
		if(selected_idno==arr_cnt)
		{
			selected_str=" selected";
		}
		else
		{
			selected_str="";	
		}

		if(change_flag==1)
		{
			temp_select=temp_select+"<OPTION value="+(arr_cnt+1)+selected_str+">"+(arr_cnt+1)+"</option>\n";			
		}
		else if(change_flag==2)
		{
			temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+format_array_link[arr_cnt]+selected_str+">"+value_arrey[arr_cnt]+"</option>\n";
		}
		else if(change_flag==3)
		{
			temp_select=temp_select+"<OPTION value="+arr_cnt+selected_str+">"+value_arrey[arr_cnt]+"</option>\n";
		}
		else if(change_flag==4)
		{
			temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+selected_str+">"+cam_list_hdd[1][arr_cnt]+"</option>\n";
		}
		else if(change_flag==5)
		{
// 2007.09.07 Modified by Yoshiaki Abe - Motionの単位を%からhに変更
			temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+selected_str+">"+value_arrey[arr_cnt]+"</option>\n";
		}
		else if(change_flag==6)
		{
			var str_unit="";//単位
			var fOBJ = document.form1;
			var index = fOBJ["select_format"+table_coordinate].selectedIndex;//フォーマットプルダウンの選択されたインデックス
			var str_format = fOBJ["select_format"+table_coordinate].options[index].text;//formatプルダウンの表示テキスト
			//if(str_format=="MPEG4" || str_format=="H.264")
			
			// 2007.10.24 Added by Yoshiaki Abe - JPEGコーデック時のLevel値表示対応
			//判定対象変更　変更案1
			if(str_format != "JPEG")
			{
				str_unit="kbps";
				temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+selected_str+">"+value_arrey[arr_cnt]+str_unit+"</option>\n";
			}
			else
			{
				level_str = new String((arr_cnt+1));
				str_unit = "Level " + level_str;
				temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+selected_str+">"+str_unit + " = " + value_arrey[arr_cnt] + "</option>\n";
			}

			//単位変更部分の持ちまわし変更　変更案2
			//str_unit=cam_list_format_unit[str_format][0];

//			temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+selected_str+">"+value_arrey[arr_cnt]+str_unit+"</option>\n";

		}
		else
		{
			//modify by hyh 2008-3-4
			if (arr_cnt==0)
			{
				if (name.indexOf("select_frame")<0)
				{
					temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+" selected"+">"+value_arrey[arr_cnt]+"</option>\n";
				} else {
					temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+selected_str+">"+value_arrey[arr_cnt]+"</option>\n";
				}
				
			} else {
				if (name.indexOf("select_frame")<0)
				{
					temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+">"+value_arrey[arr_cnt]+"</option>\n";
				} else {
					temp_select=temp_select+"<OPTION value="+value_arrey[arr_cnt]+selected_str+">"+value_arrey[arr_cnt]+"</option>\n";
				}
				
			}
			//modify end
		}
	}
	temp_select=temp_select+"</select>\n";

	return temp_select;
}

//メニュー画面生成
//子ウィンドウオープン
function win_open(flag)
{
	//2008.01.24　片山
	//Use Conditions の画面をオープンする
	if(flag==0)
	{
		loginw=window.open('./service_condition.html', 'condition', 'width=650,height=380,top=0,left=0,scrollbars=yes');
	}
	//2008.01.24　片山
	//印刷画面をオープンする
	else if(flag==1)
	{
		loginw=window.open('./template.htm', 'print','width=580,height=800,menubar=yes,scrollbars=yes,resizable=yes');
	}
	//2008.02.04　洪
	//NTSCのProduct List画面をオープンする
	else if(flag==2) {
		loginw=window.open('./NTSC_ProductList.html', 'product', 'width=300,height=550,top=0,left=0,scrollbars=no');
	}
	//2008.02.04　洪
	//PALのProduct List画面をオープンする
	else if(flag==3) {
		loginw=window.open('./PAL_ProductList.html', 'product', 'width=300,height=550,top=0,left=0,scrollbars=no');
	}
	//2008.01.24　片山
	//引数が有効範囲外の場合
	else
	{
		alert("引数が有効な値ではありません。");
	}
	return;
}
//エラーメッセージ格納オブジェクト生成
//計算結果格納オブジェクト生成
function create_hid_err()
{

	//HTML文格納変数の宣言
	var html_txt = "<input type=\"hidden\" value=\"\" name=\"err1\"><input type=\"hidden\" value=\"\" name=\"err2\"><input type=\"hidden\" value=\"\" name=\"err3\"><input type=\"hidden\" value=\"\" name=\"camera_totals_disp\"";
	document.writeln(html_txt);
}
