
var trFrame = {
	instanceName : "trFrame",
	name : "iframe-trFrame",
	getHTML : function() {
		var s = '';
		s += '<iframe name="'+this.name+'" id="'+this.name+'" frameborder="0" scrolling="no" src="about:blank" style="position:absolute;left:-1000px;top:-1000px;visibility:hidden;width:1px;height:1px;"></iframe>';
		return s;
	},
	print : function() {
		document.write(this.getHTML());
	},
	initialize : function() {
		this.print();
	}
};
trFrame.initialize();



/* ¿µ¾÷¹®ÀÇ */
var requestForm = {
	instanceName : "requestForm",
	name : "form-requestForm",
	form : null,
	
	getUI : function() {
		return document.getElementById("index_flash");
	},
	focusUI : function() {
		try {
			this.getUI().focus();
		} catch(e) { }
	},
	displayFileName : function(_fileName, _index) {
		this.getUI().filename_req(_fileName, _index);
		this.focusUI();
	},
	displayResult : function(_errorCode, _msg) {
		var errorMsg = (_errorCode=="00") ? "ok" : _msg;
		if ($IS_TEST_MODE) {
			alert("Result Msg : " + errorMsg);
		}
		this.getUI().success_req(errorMsg);
		this.focusUI();
	},
	
	show : function() {
		this.form.style.display = "";
	},
	
	hide : function() {
		this.form.style.display = "none";
	},
	
	"submit" : function(_obj) {
		if ($IS_TEST_MODE) {
			var s = "";
			s += "- step1 : " + _obj.step1 + "\n";
			s += "- txt1 : " + _obj.txt1 + "\n";
			s += "- txt2 : " + _obj.txt2 + "\n";
			s += "- txt3 : " + _obj.txt3 + "\n";
			s += "- txt4 : " + _obj.txt4 + "\n";
			s += "- txt5 : " + _obj.txt5 + "\n";
			s += "- txt6 : " + _obj.txt6 + "\n";
			s += "- txt7 : " + _obj.txt7 + "\n";
			s += "- txt8 : " + _obj.txt8 + "\n";
			s += "- txt9 : " + _obj.txt9 + "\n";
			s += "\n";
			s += "- file1 : " + this.form.FILE_1.value + "\n";
			s += "- file2 : " + this.form.FILE_2.value + "\n";
			alert(s);
		}
		this.form.CATEGORY.value = _obj.step1;
		this.form.COMPANY.value = _obj.txt1;
		this.form.NAME.value = _obj.txt2;
		this.form.POSITION.value = _obj.txt3;
		this.form.DEPARTMENT.value = _obj.txt4;
		this.form.TEL.value = _obj.txt5;
		this.form.HP.value = _obj.txt6;
		this.form.EMAIL.value = _obj.txt7;
		this.form.TITLE.value = _obj.txt8;
		this.form.CONTENTS.value = _obj.txt9;
		
		this.form.method = "post";
		this.form.target = trFrame.name;
		this.form.action = "/apply/apply.request.tr.jsp";
		this.form.submit();
		this.hide();
	},
	
	reset : function() {
		this.form.reset();
	},
	
	getHTML : function() {
		var s = '';
		s += '<form name="'+this.name+'" method="post" enctype="multipart/form-data" style="display:none;">\n';
		s += '<input type="hidden" name="CATEGORY" />\n';
		s += '<input type="hidden" name="COMPANY" />\n';
		s += '<input type="hidden" name="NAME" />\n';
		s += '<input type="hidden" name="POSITION" />\n';
		s += '<input type="hidden" name="DEPARTMENT" />\n';
		s += '<input type="hidden" name="TEL" />\n';
		s += '<input type="hidden" name="HP" />\n';
		s += '<input type="hidden" name="EMAIL" />\n';
		s += '<input type="hidden" name="TITLE" />\n';
		s += '<input type="hidden" name="CONTENTS" />\n';
		s += '<input type="file" name="FILE_1" onChange="'+this.instanceName+'.displayFileName(this.value, \'1\');" style="width:100px;height:23px;position:absolute;left:640px;top:522px;filter:alpha(opacity=0);opacity:0;cursor:pointer;" />\n';
		s += '<input type="file" name="FILE_2" onChange="'+this.instanceName+'.displayFileName(this.value, \'2\');" style="width:100px;height:23px;position:absolute;left:640px;top:557px;filter:alpha(opacity=0);opacity:0;cursor:pointer;" />\n';
		s += '</form>\n';
		return s;
	},
	print : function() {
		document.write(this.getHTML());
	},
	initialize : function() {
		this.print();
		this.form = document[this.name];
	}
};
requestForm.initialize();


/* ÀÔ»çÁö¿ø¼­ */
var careerForm = {
	instanceName : "careerForm",
	name : "form-careerForm",
	form : null,
	
	getUI : function() {
		return document.getElementById("index_flash");
	},
	focusUI : function() {
		try {
			this.getUI().focus();
		} catch(e) { }
	},
	displayFileName : function(_fileName, _index) {
		this.getUI().filename_car(_fileName, _index);
		this.focusUI();
	},
	displayResult : function(_errorCode, _msg) {
		var errorMsg = (_errorCode=="00") ? "ok" : _msg;
		if ($IS_TEST_MODE) {
			alert("Result Msg : " + errorMsg);
		}
		this.getUI().success_car(errorMsg);
		this.focusUI();
	},
	
	show : function() {
		this.form.style.display = "";
	},
	
	hide : function() {
		this.form.style.display = "none";
	},
	
	"submit" : function(_obj) {
		if ($IS_TEST_MODE) {
			var s = "";
			s += "- step1 : " + _obj.step1 + "\n";
			s += "- style : " + _obj.style + "\n";
			s += "- sex : " + _obj.sex + "\n";
			s += "- txt1 : " + _obj.txt1 + "\n";
			s += "- txt2 : " + _obj.txt2 + "\n";
			s += "- txt3 : " + _obj.txt3 + "\n";
			s += "- txt4 : " + _obj.txt4 + "\n";
			s += "\n";
			s += "- file1 : " + this.form.FILE_1.value + "\n";
			s += "- file2 : " + this.form.FILE_2.value + "\n";
			alert(s);
		}
		this.form.CATEGORY.value = _obj.step1;
		this.form.TYPE.value = _obj.style;
		this.form.GENDER.value = _obj.sex;
		this.form.NAME.value = _obj.txt1;
		this.form.TEL.value = _obj.txt2;
		this.form.HP.value = _obj.txt3;
		this.form.EMAIL.value = _obj.txt4;
		
		this.form.method = "post";
		this.form.target = trFrame.name;
		this.form.action = "/apply/apply.career.tr.jsp";
		this.form.submit();
		this.hide();
	},
	
	reset : function() {
		this.form.reset();
	},
	
	getHTML : function() {
		var s = '';
		s += '<form name="'+this.name+'" method="post" enctype="multipart/form-data" style="display:none;">\n';
		s += '<input type="hidden" name="CATEGORY" />\n';
		s += '<input type="hidden" name="TYPE" />\n';
		s += '<input type="hidden" name="GENDER" />\n';
		s += '<input type="hidden" name="NAME" />\n';
		s += '<input type="hidden" name="TEL" />\n';
		s += '<input type="hidden" name="HP" />\n';
		s += '<input type="hidden" name="EMAIL" />\n';
		s += '<input type="file" name="FILE_1" onChange="'+this.instanceName+'.displayFileName(this.value, \'1\');" style="width:100px;height:23px;position:absolute;left:640px;top:382px;filter:alpha(opacity=0);opacity:0;cursor:pointer;" />\n';
		s += '<input type="file" name="FILE_2" onChange="'+this.instanceName+'.displayFileName(this.value, \'2\');" style="width:100px;height:23px;position:absolute;left:640px;top:417px;filter:alpha(opacity=0);opacity:0;cursor:pointer;"/>\n';
		s += '</form>\n';
		return s;
	},
	print : function() {
		document.write(this.getHTML());
	},
	initialize : function() {
		this.print();
		this.form = document[this.name];
	}
};
careerForm.initialize();







/* Flash°¡ È£ÃâÇÏ´Â Function */
function apply_req(_obj) {
	requestForm.submit(_obj);
}
function reset_req() {
	requestForm.reset();
	requestForm.hide();
}
function show_req() {
	requestForm.show();
}
function hide_req() {
	requestForm.hide();
}

function apply_car(_obj) {
	careerForm.submit(_obj);
}
function reset_car() {
	careerForm.reset();
	careerForm.hide();
}
function show_car() {
	careerForm.show();
}
function hide_car() {
	careerForm.hide();
}



