
function Registration(val,w,h){
	newWindowOpen("Registration.html?Menu_ID=" + val,"Registration",w,h,"Y")
}

/*
function Registration_Arg(val, cval,w,h){
	newWindowOpen("Registration.html?Menu_ID=" + val + "&Code_ID=" + cval,"Authority",w,h,"Y")
}
function  Registration(val,w,h){	
	arg = showModalDialog( "Registration.html?Menu_ID=" + val, null,"font-family:Verdana; font-size:12; dialogWidth:"+w+"px; dialogHeight:"+h+"px");
	if(arg==null) return;
	
	var frm = document.listForm;
	var j = arg.length;
	var i;
	var val;

	var hiddenData = "<input type=hidden name=rValue"
	
	for (i=0; i<j; i++){
		val = arg[i].replace(",","!%")
		val = val.replace("'","!&")
		hiddenData = hiddenData + " value='" + val + "'>"
		frm.insertAdjacentHTML('BeforeEnd', hiddenData)
		hiddenData = "<input type=hidden name=rValue"
	}
	
	frm.action="Registration_Execute.html"
	frm.submit();
}
*/

function  Registration_Arg(val, cval, w, h){	
	arg = showModalDialog( "Registration.html?Menu_ID=" + val + "&Code_ID=" + cval, null,"font-family:Verdana; font-size:12; dialogWidth:"+w+"px; dialogHeight:"+h+"px");
	if(arg==null) return;
	
	var frm = document.listForm;
	var j = arg.length;
	var i;
	var val;

	var hiddenData = "<input type=hidden name=rValue"
	
	for (i=0; i<j; i++){
		val = arg[i].replace(",","!%")
		val = val.replace("'","!&")
		hiddenData = hiddenData + " value='" + val + "'>"
		frm.insertAdjacentHTML('BeforeEnd', hiddenData)
		hiddenData = "<input type=hidden name=rValue"
	}
	
	frm.action="Registration_Execute.html"
	frm.submit();
}


function  View_Arg(val, cval, w, h){	
	newWindowOpen("View.html?Menu_ID=" + val + "&Code_ID=" + cval,"Authority",w,h,"Y")
}

function  Distribute_Arg(cval, w, h){	
	newWindowOpen("Distribute.html?Code_ID=" + cval,"Point",w,h,"Y")
}

function Only_Main_Assign(cval, w, h){
	newWindowOpen("Main_Assign.html?Code_ID=" + cval,"MainAssign",w,h,"Y")
}

/*
function  DataUpdate(val){	
	arg = showModalDialog( "change.html?Menu_ID=" + val, null,"font-family:Verdana; font-size:12; dialogWidth:950px; dialogHeight:650px");
	if(arg==null) return;
	
	var frm = document.listForm;
	var j = arg.length;
	var i;
	var val;

	var hiddenData = "<input type=hidden name=rValue"
	
	for (i=0; i<j; i++){
		val = arg[i].replace(",","!%")
		val = val.replace("'","!&")
		hiddenData = hiddenData + " value='" + val + "'>"
		frm.insertAdjacentHTML('BeforeEnd', hiddenData)
		hiddenData = "<input type=hidden name=rValue"
	}
	
	frm.action="Update_Execute.html"
	frm.submit();
}
*/


function  DataUpdate(val,cval,w_width,w_height){	
	newWindowOpen("Update.html?Menu_ID=" + val + "&Code_ID=" + cval,"",w_width,w_height,"Y")
}

function ModalReturn() {
	if (checkValue(document.oForm)){
		var i,k,l;
		var j = document.oForm.length;
		var arr = new Array();
		var arrName
	
		k=0;
		
		for (i=0; i<j; i++){
			if (document.oForm[i].type == 'checkbox' && document.oForm[i].name.substring(0,5) != 'nouse'){
				if(document.oForm[i].checked){
					if (i!=0){
						if (document.oForm[i-1].name == document.oForm[i].name){
							arr[k-1]=arr[k-1] + "^" + document.oForm[i].value;
						}
						else{
							arr[k]=document.oForm[i].name + "%" + document.oForm[i].value;
							k=k+1;
						}
					}
					else{
						arr[k]=document.oForm[i].name + "%" + document.oForm[i].value;
						k=k+1;					
					}
				}
			}
			else if(document.oForm[i].type == 'radio' && document.oForm[i].name.substring(0,5) != 'nouse'){
				if(document.oForm[i].checked){
					arr[k]=document.oForm[i].name + "%" + document.oForm[i].value;
					k=k+1;					
				}
			}
			else if(document.oForm[i].type == 'select-multiple' && document.oForm[i].name.substring(0,5) != 'nouse'){
				for(l=0;l<document.oForm[i].length;++l){
					if(document.oForm[i].options[l].selected){
						if(typeof(arr[k])=='undefined'){
							arr[k]=document.oForm[i].name + "%" + document.oForm[i].options[l].value;
						}
						else{
							arr[k]=arr[k] + "^" + document.oForm[i].options[l].value;
						}
					}
				}
				k=k+1
			}
			else{
				if (document.oForm[i].value != '' && document.oForm[i].type != 'button' && document.oForm[i].name.substring(0,5) != 'nouse'){
					arr[k]=document.oForm[i].name + "%" + document.oForm[i].value;
					k=k+1;
				}
			}
		}

		window.returnValue = arr;
		window.close();
	}
}
		
function ModalClose() {
	window.close();
}

function Registration_Attatch_File(val){
	newWindowOpen("/Execute/Attatch_File.html?Code_ID=" + val,"Attatch_File",900,480,"Y")
}

function RouteToMe(val){
	var answer = confirm("Ticket Number " + val + "À» My Ticket Pool·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?")

	if (answer){
		location.href = "Route_Execute.html?Ticket_Code=" + val
	}
	else{
		alert("Ticket RoutingÀÌ Ãë¼ÒµÇ¾ú½À´Ï´Ù.");
	}
}