﻿// Quick Link 관련 설정
function selectChange()
{
	var oSel = document.getElementById("selLink");
	if (oSel.value != "-") {
	    location.href = oSel.value;
	}
}


function brdrColor(txtbox, num)
{
	switch(num)
	{
		case 1: txtbox.style.borderColor = "#CC6600";   break;
		case 2: txtbox.style.borderColor = "#c6c6c6";   break;
	}
}

String.prototype.trim = function()
{
	var txt = this;
	if (this.search(/^\s+/) >= 0) txt = txt.replace(/^\s+/g,"");
	if (this.search(/\s+$/) >= 0) txt = txt.replace(/\s+$/g,"");
	return txt;
}

function checker1(form_name, num, msg)
{
	var bul = false;
	if (form_name.value.replace(/ /g, "").length < num) {
		alert(msg);
		form_name.focus();
		form_name.value = "";
		bul = true ;
	}
	return bul;
}
function checker2(form_name, num, msg)
{
	var bul = false;
	if (form_name.value.replace(/ /g, "").length < num) {
		alert(msg);
		form_name.focus();
		form_name.select();
		bul = true;
	}
	return bul;
}

function getEsc(e)
{
    if (document.all) { e = window.event; }
    if (e.keyCode == 27 ) { self.close(); }
}