/*
'-------------------------------------------------------------------------------
' È­ ÀÏ ¸í : Apply_Alb_Login.js
' ¿ë    µµ : ÀÔ»çÁö¿ø ·¹ÀÌ¾î - ·Î±×ÀÎ
' ÀÛ¼ºÀÏ½Ã : 2009-06-04 (ÀÌÇöÁø) 
' ¼öÁ¤ÀÏ½Ã : 
' ÁÖÀÇ»çÇ× :
'-------------------------------------------------------------------------------
*/
	if ($('txtUserID') != null ) {
		if ($('txtUserID').value != "") {
			layerloginform_clearbg('Layerid');
		}
	}

	function CheckEnterLayer(val) {
		if (event.keyCode == 13) {
			layerloginForm_SubMitFunc();
			return false;
		}
	}

	//º¸¾ÈÁ¢¼Ó Ã¼Å©
	function layerssl_check(id) {

		var strimg = document.getElementById('ison').src;
		var strssl = document.getElementById('SSL').value;

		if (strssl!='on') {
			strimg = strimg.replace("off.gif","on.gif");
			strssl = 'on';

		} else {
			strimg = strimg.replace("on.gif","off.gif");
			strssl = '';
		}

		document.getElementById('ison').src  = strimg;
		document.getElementById('SSL').value = strssl;

	}

	function layerloginform_clearbg(type) {
		if (type == 'id') {
			document.getElementById('txtUserID').style.backgroundImage = '';
			document.getElementById('txtUserID').style.backgroundColor  = '#ffffff';
		} else if (type == 'pw') {
			document.getElementById('txtPassword').style.backgroundImage = '';
			document.getElementById('txtPassword').style.backgroundColor  = '#ffffff';
		}
	}

	function layerloginForm_SubMitFunc() {

		var struserid = $('txtUserID').value;
		var strpassword = $('txtPassword').value;
		document.layerloginform.gotoURL.value = location.href;

		if (struserid == "") {
			alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
			$("txtUserID").focus();
			return false;
		}
		if (strpassword == "") {
			alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
			$("txtPassword").focus();
			return false;
		}

		if (document.getElementById("SSL").value == "on") {
			$('layerloginform').action = G_HOSTNAME_SSL_EDIT + "/login/loginprocess.asp";
		} else {
			$('layerloginform').action = G_HOSTNAME_EDIT + "/login/loginprocess.asp";
		}

		layerloginform.submit();
	}
