







			function editTab()
			{
				    //  本来はここでボタンリストを代入 (ここの数に合わせて、ウインドウの縦サイズも変わる)
					this.scList = new Array();
					this.scList = ["item1","item2","item3", "item4","item5","item6"];
					
					//  表示切替用リスト
					this.indexList = new Array();
					for(var i=0;i<this.scList.length;i++)
					{
					this.indexList[i] = i;
					}
					
					//  本来はここでアイコンセットリストを代入
					this.iconSetList = new Array();
					this.iconSetList = ["_Clear", "_Solid"];
					this.iSet = 0;
					
					this.eTopEdge = null;

			}
			
			//  プロトタイプ
			editTab.prototype =
			{
				eDefTopEdge: 5,
				eSize: 20,
				
				etBuildUI: function()     //  UI
				{
					etObj = new Window("palette"," Edit Tab Info",[100,50,620,((this.eDefTopEdge+this.eSize)*this.scList.length)+190]);
					etObj.ddlObj = null;
					etObj.ddlObj = undefined;
					etObj.ddlObj = new Array();
					
					this.etReBuildUI(etObj);
					
				},
					
			    etReBuildUI: function(etReObj)     //  パネル内UI
			    {
			    	this.eTopEdge = this.eDefTopEdge;
			    	
			    	etReObj.settingGroup = etReObj.add("panel", [10,10, 510, 70]);
			    	etReObj.infoW = etReObj.settingGroup.add("statictext", [8, 10, 85, 25], "Btn Size Width :"); etReObj.infoW.justify="right";
			    	etReObj.infoW.helpTip = "ボタンサイズ 横";
			    	etReObj.setBtnW = etReObj.settingGroup.add("edittext", [88, 5, 130, 25], "50"); etReObj.setBtnW.justify="right";
			    	etReObj.infoH = etReObj.settingGroup.add("statictext", [8, 35, 85, 50], "Height :"); etReObj.infoH.justify="right";
			    	etReObj.infoH.helpTip = "ボタンサイズ 縦";
			    	etReObj.setBtnH = etReObj.settingGroup.add("edittext", [88, 30, 130, 50], "25"); etReObj.setBtnH.justify="right";
			    	
			    	etReObj.infoL = etReObj.settingGroup.add("statictext", [135, 10, 208, 25], "Interval  Hol:"); etReObj.infoL.justify="right";
			    	etReObj.infoL.helpTip = "ボタンの間隔 横";
			    	etReObj.setBtnL = etReObj.settingGroup.add("edittext", [211, 5, 253, 25], "5"); etReObj.setBtnL.justify="right";
			    	etReObj.infoT = etReObj.settingGroup.add("statictext", [135, 35, 208, 50], "Ver :"); etReObj.infoT.justify="right";
			    	etReObj.infoT.helpTip = "ボタンの間隔 縦";
			    	etReObj.setBtnT = etReObj.settingGroup.add("edittext", [211, 30, 253, 50], "5"); etReObj.setBtnT.justify="right";
			    	
			    	etReObj.infoS = etReObj.settingGroup.add("statictext", [263, 10, 330, 25], "EditBtn Size :"); etReObj.infoS.justify="right";
			        etReObj.infoS.helpTip = "Add、Edit、更新ボタンのサイズ (正方形)";
			    	etReObj.setBtnS = etReObj.settingGroup.add("edittext", [335, 5, 370, 25], "25"); etReObj.setBtnS.justify="right";
			    	etReObj.infoSI = etReObj.settingGroup.add("statictext", [263, 35, 330, 50], "Interval :"); etReObj.infoSI.justify="right";
			    	etReObj.infoSI.helpTip = "更新ボタンと１つ目のボタンとの間隔";
			    	etReObj.setBtnSI = etReObj.settingGroup.add("edittext", [335, 30, 370, 50], "5"); etReObj.setBtnSI.justify="right";
			    	
			    	etReObj.infoI = etReObj.settingGroup.add("statictext", [390, 8, 485, 25], "select Icon Set :"); etReObj.infoI.justify="left";
			        etReObj.infoI.helpTip = "アイコンセットの変更";
			    	etReObj.iconDDL = etReObj.settingGroup.add("dropdownlist",[390, 28, 490, 50], this.iconSetList);
			    	etReObj.iconDDL.selection = etReObj.iconDDL.items[this.iSet];
			    	
			    	
					etReObj.ddlGroup = etReObj.add("panel", [10, 75, 280, ((this.eDefTopEdge+this.eSize)*this.scList.length+125)]);
					etReObj.etInfo = etReObj.ddlGroup.add("statictext",[10, 5, 105, 30], "ボタンの並び替え"); etReObj.etInfo.justify="left";
					etReObj.etInfo.helpTip = "ボタンの並びを入れ替え";
					var etSelf = this;
					for(var i=0;i<this.scList.length;i++){
						ddlNum = etReObj.ddlGroup.add("statictext",[20, this.eTopEdge+30, 37, this.eSize + this.eTopEdge+30], i+1); ddlNum.justify="left";
						etReObj.ddlObj[i] = etReObj.ddlGroup.add("dropdownlist",[38, this.eTopEdge+30, 250, this.eSize + this.eTopEdge+30], this.scList);
						etReObj.ddlObj[i].id = i;
	                    etReObj.ddlObj[i].selection = etReObj.ddlObj[i].items[i];
	                    etReObj.ddlObj[i].onChange = function(){
	                    	                                             //  ドロップダウンリストで変更したら、重複した他のリスト表示と入れ替える
	                    	                                             var eID = this.id;
	                    	                                             var eIndex = etReObj.ddlObj[eID].selection.index;
	                    	                                             //alert(etObj.ddlObj[eID].selection.index);
	                    	                                             for(var ii=0;ii<etSelf.indexList.length;ii++){
	                    	                                             	if(etSelf.indexList[ii] == eIndex){
	                    	                                             		etSelf.indexList[ii] = etSelf.indexList[eID];
	                    	                                             		etSelf.indexList[eID] = eIndex;
	                    	                                             		etReObj.ddlObj[ii].selection = etReObj.ddlObj[ii].items[etSelf.indexList[ii]];
	                    	                                             	}
	                    	                                             }

	                                                                 };
	                    this.eTopEdge += this.eSize + this.eDefTopEdge;
					}
					
					etReObj.infoGroup = etReObj.add("panel", [290, 75, 510, ((this.eDefTopEdge+this.eSize)*this.scList.length+80)]);
					etReObj.infoTxt = etReObj.ddlGroup.add("statictext",[300, 85, 500, ((this.eDefTopEdge+this.eSize)*this.scList.length+70)], "");
					
					etReObj.cancelBtn = etReObj.add( "button" , [290, ((this.eDefTopEdge+this.eSize)*this.scList.length)+90, 390, ((this.eDefTopEdge+this.eSize)*this.scList.length)+125] , "Cancel" , {name:"cancel"} );
					etReObj.cancelBtn.onClick = function()
																	{
																		etReObj.Btnon = "Cansel";
																		etReObj.close();
																	};
					
					etReObj.okBtn = etReObj.add( "button" , [400, ((this.eDefTopEdge+this.eSize)*this.scList.length)+90, 510, ((this.eDefTopEdge+this.eSize)*this.scList.length)+125] , "OK" , {name:"ok"} );
					etReObj.okBtn.onClick = function()
																	{
																		etReObj.Btnon = "OK";
																		etReObj.close();
																	};
																	
					etReObj.onClose = function()
											{
												//  "OK" なら、取得
												if(etReObj.Btnon == "OK"){
													//  変更後の順番で表示
													etTxt = null;
													etTxt = etSelf.scList[etSelf.indexList[0]] + "_";
													for(var i=1;i<etSelf.scList.length;i++){
														etTxt += "_" + etSelf.scList[etSelf.indexList[i]];
													}
													
													alert(etTxt);
												}
											};
                    //  ダイアログ表示
					etReObj.center();
					etReObj.show();
				}
			}
			
			
            //  ****** メインスクリプト ******
            
		            var ET = new editTab();
		            ET.etBuildUI();

            
            
            
            