/* 검색 */
var togsType = function(){
	UI.toogle('sTypeList');
};
var selsType = function(obj){
	var tobj = obj.parentNode;
	var typeTxt = tobj.getElementsByTagName('label')[0].innerHTML;
	document.getElementById('sType').innerHTML = typeTxt;
	togsType();
	document.getElementById('tsearch_input').focus();
};
var resetQuery = function(q) {
	if (!q.getAttribute("chkFocus")) {
		q.setAttribute("chkFocus", "1");
		q.value = "";
	}
};
/* 도움말 검색 */
var searchSubmit = function(){
}

/* 도움말 토글 */
var init_helpList = function (){
	var objEl = document.getElementById("HelpList");
};

/* 서비스명 검색 */
var searchService = function(form) {
	var kwd = "";
	for(i = 0; i < form.elements.length; i++){ 
		if (form.elements[i].name == "svcName") {
			kwd = UI.trim(form.elements[i].value);
		}
	}
	if (kwd == ""){
		alert("서비스명을 입력해주세요.");
		return;
	}

	var kwdLen = kwd.length;
	var service = ""
	var selList = new Array();
	var listEle = UI.$("SvcList");
	var list = listEle.getElementsByTagName("a");
	var listLen = list.length;
	for (var i = 0; i < listLen; i++) {
		list[i].className = "";
		if (list[i].firstChild) {
			service = UI.trim(list[i].firstChild.nodeValue);
			if (kwdLen == 1) {
				if (service == kwd) {
					selList[selList.length] = list[i];
				}
			}
			else {
				if (service.indexOf(kwd) >= 0) {
					selList[selList.length] = list[i];
				}
			}
		}
	}

	var selListLen = selList.length;
	if (selListLen >0) {
		for (var i = 0; i < selListLen; i++) {
			selList[i].className = "find";
		}

		// 서비스명 분류로 스크롤 이동
		try {
			var topPos = UI.getPosition(listEle).y;
			var dd = document.documentElement;
			var db = document.body;
			if (dd) {
				dd.scrollTop = topPos;
			}
			else if (db) {
				db.scrollTop = topPos;
			}
		}
		catch(e) {
		}
	}
	else {
		alert("검색어와 일치하는 서비스명이 없습니다.");
	}
};

/* 도움말 만족도 점수 주기 */
var doFaqScore = function(fid) {
	var form = UI.$("surveyForm_" + fid);
	var input = form.getElementsByTagName("input");
	var inputLen = input.length;
	var sendScore = null;
	var faqId = "";
	var score = "";
	for (var i = 0; i < inputLen; i++) {
		if (input[i].name == "sendScore") {
			sendScore = input[i];
		}
		if (input[i].name == "faqId") {
			faqId = input[i].value;
		}
		if (input[i].name == "score") {
			if (input[i].checked) {
				score = input[i].value;
			}
		}
	}

	if (sendScore.value == "Y") {
		alert("이미 답변 만족도를 보냈습니다.");
		return;
	}
	if (!faqId) {
		return;
	}
	if (!score){
		alert("만족도를 선택해주세요.");
		return;
	}

	var opt = {
		method: 'GET',
		param: 'svc=faq&faqId=' + faqId + '&score=' + score,
		url: form.action,
		onComplete: function() {},
		asynchronous: true,
		contentType: 'application/x-www-form-urlencoded',
		encoding: 'UTF-8'
	};
	var ajax = new UI.Ajax(opt);
	sendScore.value = "Y";
	alert("만족도가 입력되었습니다.");
};

/* 내문의내역  만족도 점수 주기 */
var doQnaScore = function(aid) {
	var form = UI.$("surveyForm_" + aid);
	var input = form.getElementsByTagName("input");
	var inputLen = input.length;
	var sendScore = null;
	var qstId = "";
	var ansId = "";
	var score = "";
	for (var i = 0; i < inputLen; i++) {
		if (input[i].name == "sendScore") {
			sendScore = input[i];
		}
		if (input[i].name == "qstId") {
			qstId = input[i].value;
		}
		if (input[i].name == "ansId") {
			ansId = input[i].value;
		}
		if (input[i].name == "score") {
			if (input[i].checked) {
				score = input[i].value;
			}
		}
	}

	if (sendScore.value == "Y") {
		alert("이미 답변 만족도를 보냈습니다.");
		return;
	}
	if (!qstId || !ansId) {
		return;
	}
	if (!score){
		alert("만족도를 선택해주세요.");
		return;
	}

	var opt = {
		method: 'GET',
		param: 'svc=qna&qstId=' + qstId + '&ansId=' + ansId + '&score=' + score,
		url: form.action,
		onComplete: function() {},
		asynchronous: true,
		contentType: 'application/x-www-form-urlencoded',
		encoding: 'UTF-8'
	};
	var ajax = new UI.Ajax(opt);
	sendScore.value = "Y";
	alert("만족도가 입력되었습니다.");
};

/* 폼 파일삭제 */
var deleteFile = function(str) {
	UI.$(str).value = "";
};

/* 인쇄하기 팝업 */
var popPrint = function(faq){	//url,id,w,h,r
	UI.popUp('../print/' + faq + '.html','csPrint','640','650');
	//UI.popUp(sUrl,sName,sW,sH[,sScroll[,sResize[,sStatus[,bCenter]]]])
};

/* 내메일로보내기 팝업 */
var popMail = function(faq){	//url,id,w,h,r
	UI.popUp('../scrap/' + faq + '.html','sendMail','530','330');
};

/* 댓글에 이모티콘 셀렉 */
var togEmo = function(){
	UI.toogle('Emoticon');
};

var seleType = function(obj){ // 이모티콘 타입 셀렉
	var tobj = obj.parentNode;
	var typeLabel= tobj.getElementsByTagName('label')[0];
	var getBgimgUrl = UI.getStyle(typeLabel,'backgroundImage');
	var imgUrl= getBgimgUrl.replaceAll('\"','');
	var reImgUrl = imgUrl.slice(4,imgUrl.length-1);
	document.getElementById('eTypeSrc').src = reImgUrl;
	togEmo();
	document.getElementById('content').focus();
};

/* 폼체크 */
function checkForm(form,type){
	if(!chkPriBox()){
		return false;
	} //개인 정보 제공 동의 체크
	
	var regEx = /\S+\@\S+\.\S+/; // 이메일 체크

	var sb = new UI.StringBuffer();
	sb.append("\n");
	
	for(i = 0; i < form.elements.length; i++){ 
		currentEl = form.elements[i]; 
		regtitle = currentEl.title; // 필수항목
		if( regtitle && UI.trim(currentEl.value) == "" ){
				alert(regtitle);
				currentEl.focus();
				return false;
		}
		if (regtitle && currentEl.name == "sendEmail") {
			if (!regEx.test(currentEl.value)) {
				alert('답변을 받으실 이메일주소를 정확하게 입력해주세요');
				currentEl.focus();
				return false;
			}
		}
		if (currentEl.name && currentEl.name.indexOf("sNum") > -1) {
			if (currentEl.name == "sNum1") {
				sb.append("*주민등록번호 : ");
				sb.append(currentEl.value);
				sb.append(" - ");
			}
			else if (currentEl.name == "sNum2") {
				sb.append(currentEl.value);
				sb.append("\n\n");
			}
			else {};
		}
		if (currentEl.name && currentEl.name.indexOf("label") > -1) {
			var textEl = UI.$(currentEl.name + "text");
			if (textEl) {
				sb.append("*");
				sb.append(textEl.innerHTML);
				sb.append(" : ");
			}
			sb.append(currentEl.value);
			sb.append("\n\n");
		}
	}
	if (type=='idNum'){
		sb.append("*진위확인정보 : " + UI.$("PIN_ISDATE").value + "\n\n");
		if(!chkNumForm()){
			return false;
		}
		if(UI.$("sNum1").value.length < 6 || UI.$("sNum2").value.length < 7) {
			alert("주민등록번호를 올바르게 기입하여 주세요.");
			UI.$("sNum1").focus();
			return false;
		}
	}
	form.content.value = sb.toString() + form.content.value;
	return true;
}

/* 회원정보 validation */
function checkFieldFormat(obj) {
	if (!obj.format) return true;
	if (obj.format && obj.format.indexOf("|") > -1) {
		formats = obj.format.split("|");
		fail = true;
		for (var k = 0; k < formats.length; k++) {
			if (regObj.isReg(obj.value, formats[k])) {
				fail = false;
				break;
			}
		}
		if (fail) {
			if (obj.formatLabel) {
				alert(obj.formatLabel + "의 형식이 잘못되었습니다.");	
			} else {
				alert("입력값의 형식이 잘못되었습니다.");
			}
			UI.$(obj.id).focus();
			return false;
		}
	} else {
		if (obj.format && !regObj.isReg(obj.value, obj.format)){
			if (obj.formatLabel) {
				alert(obj.formatLabel + "의 형식이 잘못되었습니다.");	
			} else {
				alert("입력값의 형식이 잘못되었습니다.");
			}
			UI.$(obj.id).focus();
			return false;
		}
	}
	return true;
}
function checkFormInfo(form, type){
	var array =[];
	for (var i = 0; i < form.elements.length; i++) {
		currentEl = form.elements[i];
		regtitle = currentEl.title; // 필수항목
		obj = null;
		if (currentEl.id){
			if (regtitle) {
				obj = {
						id : currentEl.id,
						title : regtitle,
						value : currentEl.value,
						format : currentEl.getAttribute("format"),
						formatLabel : currentEl.getAttribute("formatLabel")
					}
				if (currentEl.value==""){
					alert(currentEl.title);
					currentEl.focus();
					return false;
				}
			} else if (currentEl.value!="") { // 값 없으면 말고, 있으면 형식 체크.
				obj = {
						id : currentEl.id,
						title : "",
						value : currentEl.value,
						format : currentEl.getAttribute("format"),
						formatLabel : currentEl.getAttribute("formatLabel")
					}
			}
		} 
		if (obj) {
			array[array.length] = obj;
			if (checkFieldFormat(obj) == false) {
				return false;
			}
		}
	}
	
	if(!chkPriBox()){
		return false;
	} //개인 정보 제공 동의 체크
	
	return true;
}
function chkEmp(el){
	if(!el.value){
		alert(el.title);
		return false;
	}
}
/* 정규식 */
var chkReg = function(){
	this.regId = new RegExp('^[a-zA-Z0-9-_.]{3,15}$');
	this.regName = new RegExp('^[가-힣a-zA-z]{1,32}$');
	this.regName30 = new RegExp('^[가-힣a-zA-z0-9]{1,30}$');
	this.regNum =  new RegExp('^[0-9]+$');
	this.regNum2 =  new RegExp('^\\d{2}$');
	this.regNum3 =  new RegExp('^\\d{3}$');
	this.regNum5 =  new RegExp('^\\d{5}$');
	this.regNum6 =  new RegExp('^\\d{6}$');
	this.regNum7 =  new RegExp('^\\d{7}$');
	this.regPhone = new RegExp('^[0-9-]{7,20}$');
	this.regDrive = new RegExp('^..[\\s]?[0-9]{2}[\\-]?[0-9]{6}[\\-]?[0-9]{2}$');
	this.regDate = new RegExp('^(19|20)[0-9]{2}[\\s|\\.]?[01]?[0-9][\\s|\\.]?[0-3]?[0-9]$');
	this.regMail = new RegExp('^[_0-9a-zA-Z-]+(\\.[_0-9a-zA-Z-]+)*$');
	this.regMail2 = new RegExp('^[0-9a-zA-Z-]+\\.([0-9a-zA-Z-]+)$');
	this.regBirth1 = new RegExp('^[0-9]{2}[\\s|\\.]?[01]?[0-9][\\s|\\.]?[0-3]?[0-9]$');
	this.regYYMMDD = new RegExp("^(19|20)?[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])");
}
chkReg.prototype = {
	isReg : function(str,type){
		var result = false;
		switch(type) {
			case "yymmdd" : 
				result = this.regYYMMDD.test(str);
				break;
			case "name30" :
				result = this.regName30.test(str);
				if (result) result = byteCheck2(30, str);
				break;
			case 'id' : 
				result = this.regId.test(str);
				break;
			case 'name' :  
				result = this.regName.test(str); 
				if (result) result = byteCheck2(32, str);
				break;
			case 'num' : 
				result = this.regNum.test(str);
				break;
			case 'num2' :  
				result = this.regNum2.test(str);
				break;
			case 'num3' :  
				result = this.regNum3.test(str);
				break;
			case 'num5' :  
				result = this.regNum5.test(str);
				break;
			case 'num6' :  
				result = this.regNum6.test(str);
				break;
			case 'num7' :  
				result = this.regNum7.test(str);
				break;
			case 'phone' :  
				result = this.regPhone.test(str);
				break;
			case 'drive' :  
				result = this.regDrive.test(str);
				break;
			case 'date' :  
				result = this.regDate.test(str);
				break;
			case 'name' :  
				result = this.regName.test(str);
				break;
			case 'birth1' :  
				result = this.regBirth1.test(str);
				break;
			case 'mail' :  
				result = this.regMail.test(str);
				break;
			case 'mail2' :  
				result = this.regMail2.test(str);
				break;
			default :
				return;
		}
		return result;	
	}
}
var regObj = new chkReg();


/* 숫자체크 */
function chkNumForm(){
	var names = ["sNum1", "sNum2"];
	var regx = /[0-9-.]+/;
	
	for (var i = 0; i < names.length; i++) {
		var el = UI.$(names[i]);
		if (!regx.test(el.value)) {
			alert("입력 형식이 올바르지 않습니다. (숫자, 하이픈(-), 점(.) 만 가능).");
			el.focus();
			return false;
		}
	}
	return true;
}

/* Byte 수 체크 */
function byteCheck(byteCnt, mententname) {
	var strCount = 0;
	var tempStr, tempStr2;
	var str = UI.$(mententname).value;
	for (i = 0; i < str.length; i++) {
		tempStr = str.charAt(i);
		if (escape(tempStr).length > 4) strCount += 2;
		else strCount += 1;
	}
	if (strCount>byteCnt){
		return false;
	}
	else return true;
}

function byteCheck2(byteCnt, str) {
	var strCount = 0;
	var tempStr, tempStr2;
	for (var i = 0; i < str.length; i++) {
		tempStr = str.charAt(i);
		if (escape(tempStr).length > 4) strCount += 2;
		else strCount += 1;
	}
	if (strCount>byteCnt){
		return false;
	}
	else return true;
}

function initTitle(){
	titles = {
			type1 : [
			         {id: "label_id", title: "아이디를 입력하세요."},
			         {id: "label_name", title: "이름을 입력하세요."},
			         {id: "label_name2", title: ""},
			         {id: "sNum1", title: "주민등록번호 앞자리 6자리를 입력하세요."},
			         {id: "sNum2", title: "주민등록번호 뒷자리 7자리를 입력하세요."},
			         {id: "PIN_ISDATE", title: "진위확인정보를 입력하세요."},
			         {id: "emailId", title: "이메일 주소를 입력하세요."},
			         {id: "emailHostSelect", title: "이메일 주소를 입력하세요."},
			         {id: "label_cname", title: ""},
			         {id: "label_cNum", title: ""},
			         {id: "fNum", title: ""},
			         {id: "cName", title: ""},
			         {id: "label_cNum1", title: ""},
			         {id: "label_cNum2", title: ""},
			         {id: "label_cNum3", title: ""}
			         ]
     , type2 : [
                {id: "label_id", title: ""},
                {id: "label_name", title: ""},
                {id: "sNum1", title: ""},
                {id: "sNum2", title: ""},
                {id: "PIN_ISDATE", title: ""}
                ]
     , type3 : [
                {id: "label_cNum1", title: "사업자 등록번호를 입력해주세요."},
                {id: "label_cNum2", title: "사업자 등록번호를 입력해주세요."},
                {id: "label_cNum3", title: "사업자 등록번호를 입력해주세요."},
                {id: "label_cname", title: "법인명을 입력해주세요."},
                {id: "PIN_ISDATE", title: "진위확인정보를 입력하세요."}
               ]                
     , type4 : [
                {id: "label_id", title: ""},
                {id: "label_name", title: ""},
                {id: "label_name2", title: ""},
                {id: "sNum1", title: ""},
                {id: "sNum2", title: ""},
                {id: "label_cname", title: ""},
                {id: "label_cNum", title: ""},
                {id: "PIN_ISDATE", title: ""}
                ]                 
      , type5 : [
                {id: "fNum", title: "외국인 번호를 입력해주세요."},
                {id: "sNum1", title: ""},
                {id: "sNum2", title: ""},
                {id: "PIN_ISDATE", title: ""}
                ]                        
	}
	return titles;
}

/* 회원정보 */
var controlRadio = function(){
		this.radioList=[];
	}
controlRadio.prototype = {
	addRadio : function(radioId,type, formId){
			
			var self = this;
			this.radioList[this.radioList.length] = {
				rId:UI.$(radioId),
				type:type
			}
		UI.addEvent(UI.$(radioId),'click',function(){self.chgFormClass(type, formId);});
	},
	chgFormClass : function(type, formId) {
		UI.$('form1').className = type;
		UI.$("idForm.formId") ? UI.$("idForm.formId").value = formId : void(0);
		this.chgTitle(type);
	},
	chgTitle : function(type){
		var titles = initTitle();
		for (var i = 0; i < titles[type].length; i++) {
			el = titles[type][i];
			(UI.$(el.id)) ? UI.$(el.id).title = el.title : void(0);
		}
		if(UI.$('form1').className == 'type1' ){
			(UI.$('label_cname')) ? UI.$('label_cname').title="" : void(0);
		}
	}
}

/* 이미지 레이어 팝업 */
function helpConfirmDate(evt,type) {
	var e = evt || window.event;
	var el= e.target || e.srcElement;

	el.onmouseout = function() {
		if (!el.UItoolTip) return;
		el.UItoolTip.style.visibility = "hidden";
	}
	var scroll = UI.getScroll();
	var x = (e.clientX + scroll.left - 80) + "px";
	var y = (e.clientY+scroll.top - 250) + "px";

	if(!el.UItoolTip && type == 1) {
		el.stitle = "<img src=\"http://icon.daum-img.net/cs2/img/pop2.gif\" alt=\"발급일자 확인방법\" />";
		var d = document.createElement("DIV");
		el.UItoolTip = d;
		el.UItoolTip.className = "helpConfirmDate";
		el.UItoolTip.style.position = "absolute";
		document.body.appendChild(el.UItoolTip);
		el.UItoolTip.innerHTML = el.stitle;
	}
	else if(!el.UItoolTip && type == 2) {
		el.stitle = "<img src=\"http://icon.daum-img.net/cs2/img/pop1.gif\" alt=\"면허번호 확인방법\" />";
		var d = document.createElement("DIV");
		el.UItoolTip = d;
		el.UItoolTip.className = "helpConfirmDate";
		el.UItoolTip.style.position = "absolute";
		document.body.appendChild(el.UItoolTip);
		el.UItoolTip.innerHTML = el.stitle;
	}
	el.UItoolTip.style.left = x;
	el.UItoolTip.style.top = y;
	el.UItoolTip.style.visibility = "visible";
}

/* 자동포커스 */
function autoFocus(){
	var str = UI.$("sNum1").value.length;
	if (str == 6) {
		UI.$("sNum2").focus();
	}
}


/* bg 삭제 */
function removeBg(el){
	el.style.background = 'none';
}

/* copy form */
function copyValue(){
	var el = this;
	if (el.id.indexOf('Id') > -1) {
		var temp1 = UI.$('loginId').value;
		UI.$('label_id').value = temp1;
		removeBg(UI.$('label_id'));
	}
	else if(el.id.indexOf('Name') > -1){
		var temp2 = UI.$('userName').value;
		UI.$('label_name').value = temp2;
	}

	else {}
}
/* togAttHelp */
var togAttHelp = function(obj){
	var name = "AttHelp";
	var class_name = "togLayer";
	var str='';
		str += '<div>';
		str += '	<h5>첨부 방법 안내</h5>';
		str += '	<span class="close"><a href="javascript:;" onclick="UI.toogle(\'AttHelp\'); return false;"><img src="http://icon.daum-img.net/cs2/img/img18_02.gif" width="14" height="15" alt="닫기" /></a></span>';
		str += '	<ol>';
		str += '	<li>오른쪽의 찾아보기 버튼을 클릭</li>';
		str += '	<li>[파일 선택] 창이 뜨면, 첨부가 필요한 파일을 찾아 클릭</li>';
		str += '	<li>파일 첨부가 잘못 되었을 경우에는 [찾아보기] 버튼을 눌러 파일을 다시 선택</li>';
		str += '	</ol>';
		str += '	<p>* 특정 화면에 관련된 문의는 화면을 캡쳐하여 보내주시면 더욱 정확한 상담이 가능합니다.</p>';
		str += '	<h5>캡쳐 방법안내</h5>';
		str += '	<ol>';
		str += '	<li>캡쳐할 화면을 맨 앞으로 합니다.</li>';
		str += '	<li>키보드 우측 상단의 Print Screen 버튼을 누릅니다.</li>';
		str += '	<li>시작>프로그램>보조프로그램>그림판을 열고 저장합니다(Ctrl + V)</li>';
		str += '	<li>위의 첨부 방법에 따라 파일을 찾아 클릭합니다.</li>';
		str += '	</ol>';
		str += '</div>';
	if (!document.getElementById(name)) {
		var newEl = document.createElement("div");
		newEl.id = name;
		newEl.className = class_name;
		//newEl.style.position = 'absolute';
		document.body.appendChild(newEl);
	}
	var pos=UI.getPosition(obj);
	document.getElementById(name).style.top = pos.y - 215 + "px";
	document.getElementById(name).style.left = pos.x - 430 +  "px";
	document.getElementById(name).innerHTML = str;
	UI.toogle(name);
};

var togFaq = function(obj){
	if (obj == null || typeof(obj) == "object") {
		obj = window.location.href;
	}
	var id = obj.split("#hList_",obj.length-1)[1];
	var tarList= UI.$("hList_"+id);
	var tarDesc= UI.$("hDesc_"+id);
	if (!tarDesc) {
		// 페이지가 다른 경우...우쨔?
		return;
	}

	// 선택한 도움말을 제외하고 모든 내용을 닫는다
	try {
		var allList = UI.$("HelpList").getElementsByTagName("li");
		var allDesc = UI.$("HelpList").getElementsByTagName("div");
		var allListCnt = allList.length;
		var allDescCnt = allDesc.length;

		for (var i = 0; i < allListCnt; i++) {
			if (allList[i].id.indexOf("hList_") == 0) {
				if (tarList.id != allList[i].id) { 
					allList[i].className = "";
				}
			}
		}
		for (var i = 0; i < allDescCnt; i++) {
			if (allDesc[i].id.indexOf("hDesc_") == 0) {
				if (tarDesc.id != allDesc[i].id) { 
					allDesc[i].style.display = "none";
				}
			}
		}		
	}
	catch(e) {
	}

	if(UI.getStyle(tarDesc,'display')=='none'){
		tarDesc.style.display='block';
		tarList.className='on';
	}else{
		tarDesc.style.display='none';
		tarList.className='';
	}

	// 해당 도움말 위치로 scroll 이동
	try {
		var topPos = UI.getPosition(tarList).y;
		var dd = document.documentElement;
		var db = document.body;
		if (dd) {
			dd.scrollTop = topPos;
		}
		else if (db) {
			db.scrollTop = topPos;
		}
	}
	catch(e) {
	}
	return false;
};

var init_HelpList = function(obj){
	if(obj){
		UI.$("hList_"+obj).className='on';
		UI.$("hDesc_"+obj).style.display='block';
	}
};

/* validate mail-cs checkBox (anonymous)*/

function chkPriBox(){
	if (UI.$('pri_chkBox') && !(UI.$('pri_chkBox').checked)) {
		alert('위의 "개인정보 수집 및 이용"에 동의해 주세요.');
		return Boolean(UI.$('pri_chkBox').checked);
	} else {
		return true;
	}
}



function showEmailHostInput(ele) {
	var  ehost = UI.$("emailHostDirect");
	if (ele.value == "direct") {
		ehost.style.display = "inline";
		ehost.title="이메일을 입력해주세요"
		ehost.focus();
	}
	else {
		ehost.style.display = "none";
		ehost.title=""
	}
}
/* ########## COMMON MODULE ######### */
String.prototype.replaceAll = function(findStr, newStr){
	return this.replace(new RegExp(findStr, "gi"), newStr);
}

var _csSA = function (u,q,s,c,f,k,t) {
	new UI.Ajax({url: u,param: 'q='+q+'&s='+s+'&c='+c+'&f='+f+'&k='+k+'&t='+t,onComplete:function(){return;},onError:function(){return;}});
}

function ForceError(msg, url, lno) {
	var parm = document.location.toString();
	if (parm.indexOf('?debug')>=0) alert('주소:'+url+'\n라인:'+lno+'\n에러메시지:'+msg);
	return true;
}
// window.onerror = ForceError;


