//ÇÃ·¡½Ã
function flashOpen(flashSrc, flashWidth, flashHeight, flashVar){

	var stringVars = flashVar;

	document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" WIDTH="' + flashWidth + '" HEIGHT="' + flashHeight + '" id="flashObject" swLiveConnect="true">  ');

	document.write('<PARAM NAME=flashVars VALUE="'+ stringVars + '" />');
	document.write('<PARAM NAME=movie VALUE="' + flashSrc + '" />');
	document.write('<PARAM NAME=quality VALUE=high />');
	document.write('<PARAM NAME=menu VALUE=false />');
	document.write('<PARAM NAME=scale VALUE="exactfit" />');
	document.write('<PARAM NAME=allowScriptAccess VALUE=always />');

	document.write('<EMBED src="' + flashSrc + '" flashVars="' + stringVars + '" allowScriptAccess="always" quality="high" bgcolor="#FFFFFF"  WIDTH="' + flashWidth + '" HEIGHT="' + flashHeight + '" NAME="flashObject" TYPE = "application/x-shockwave-flash" PLUGINSPAGE = "http://www.macromedia.com/go/getflashplayer"></EMBED>');

	document.write('</OBJECT>');
}

//ÇÃ·¡½Ã (Åõ¸í)
function flashOpenTransparent(flashSrc, flashWidth, flashHeight, flashVar){

	var stringVars = flashVar;

	document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" WIDTH="' + flashWidth + '" HEIGHT="' + flashHeight + '" id="flashObject" swLiveConnect="true"> ');

	document.write('<PARAM NAME=flashVars VALUE="'+ stringVars + '" />');
	document.write('<PARAM NAME=movie VALUE="' + flashSrc + '" />');
	document.write('<PARAM NAME=quality VALUE=high />');
	document.write('<PARAM NAME=menu VALUE=false />');
	document.write('<PARAM NAME=scale VALUE="exactfit" />');
	document.write('<PARAM NAME=allowScriptAccess VALUE=always />');
	document.write('<PARAM NAME=wmode VALUE=transparent />');

	document.write('<EMBED src="' + flashSrc + '" flashVars="' + stringVars + '" wmode="transparent" allowScriptAccess="always" quality="high" bgcolor="#FFFFFF"  WIDTH="' + flashWidth + '" HEIGHT="' + flashHeight + '" NAME="flashObject" TYPE = "application/x-shockwave-flash" PLUGINSPAGE = "http://www.macromedia.com/go/getflashplayer"></EMBED>');

	document.write('</OBJECT>');
}

// ¿£ÅÍ ÁöÁ¤µÈ Æû Àü¼Û
function EnterCheck(frm){
	var frm = document.getElementById(frm);
	if (event.keyCode == 13){
		frm.submit();
	}
}

// ¿£ÅÍ ÁöÁ¤µÈ ÇÔ¼ö ½ÇÇà
function fExecuteFunction(str, arg1){
	var fname = str+"('"+arg1+"')";

	if (event.keyCode == 13){
		eval(fname);
	}
}

// °ø¹éÁ¦°Å
function trim(str){
	str = str.replace(/^\s*/,'').replace(/\s*$/, '');
	return str;
}

//flash ÀÇ º¸ÀÌ´Â ºÎºÐÀ» »ó´Ü º»¹® ¿¡ ¹ÐÂø½ÃÅ°±â À§ÇÑ ¼³Á¤
function initposition(val){

	var flashCopyR = document.getElementById("CPRight");
	flashCopyR.style.left = 0;
	var iVisibleAreaHeight = 50;	//ÇÃ·¡½Ã¿¡¼­ º¸ÀÌ´Â ºÎºÐ ³ôÀÌ
	var i320 = flashCopyR.offsetHeight - iVisibleAreaHeight; //ÇÃ·¡½Ã¿¡¼­ ÃÊ±â º¸ÀÌ´Â ºÎºÐÀÇ Top À§Ä¡
	flashCopyR.style.position="absolute";
	var vGap = val; //°´Ã¼ÀÇ top ¿¡ Ãß°¡ÇÒ °ª

	//ÇÃ·¡½Ã »ó´ÜÀÇ °ø¹éºÎºÐÀ» »ó´Ü º»¹®°ú °ãÄ¡°Ô ÇÏ¿© °ø¹éÀ» ÁÙÀÎ ÈÄ gap À» ¼³Á¤ÇÑ´Ù.
	flashCopyR.style.top=flashCopyR.offsetTop - i320 + vGap*1;

}

//iframe Å©±â ÀÚµ¿Á¶Àý
function iFrame_Resize()
{
	document.getElementById("frmContent").style.height=document.getElementById("frmContent").document.body.scrollHeight;
}

//ÅØ½ºÆ® ³¯¸®±â
function fBlurText(obj)
{
	var vObj = obj;
	vObj.value= '';
}



//ÇÃ·¡½Ã¿¡¼­ ¾²ÀÌ´Â ¸µÅ©
function goToPage(id,status){

	var id 	= id;
	var dev = "";
	var url = "";

	if( id.length==4 ){
		dev = id.substring(0,3)+"0"+id.substring(id.length-1,id.length);
	}else if( id.length==5 ){
		dev = id;
	}

	if(status=="RestPart"){
		url = "/portal/rod/nosun/nosun1/"+id+"/rod_"+dev+".jsp";
	}else if(status=="RestAll"){
		url = "/portal/rod/nosun/rest1/roadinfo_rest_templete.jsp";
	}else if(status=="TravelAll"){
		url = "/portal/rod/tra1/tra11/tra02.jsp";
	}else if(status=="TravelPart"){
		url = "/portal/rod/nosun/nosun2/"+id+"/rod_"+dev+".jsp";
	}

	self.location = url;

}

// È­¸éÅ©±â Å°¿ì±â
function zoomIn() {
	
	newZoom= parseInt(oZoom.style.zoom)+10+'%';

	if(parseInt(newZoom)>200) {
		alert("´õÀÌ»ó È®´ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		return;
	}

	oZoom.style.zoom =newZoom;
	quick.style.zoom =newZoom;
	var length=quick.style.left.length;
	var aa = quick.style.left;
	newZoom2= parseInt(aa.substring(length-2, 0)*1.1);
	quick.style.left = newZoom2;

}

//È­¸éÅ©±â ÁÙÀÌ±â
function zoomOut() {
	
	newZoom= parseInt(oZoom.style.zoom)-10+'%';

	if(parseInt(newZoom) < 50) {
		alert("´õÀÌ»ó Ãà¼ÒÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		return;
	}

	oZoom.style.zoom =newZoom;
	quick.style.zoom =newZoom;
	var length=quick.style.left.length;
	var aa = quick.style.left;
	newZoom2= parseInt(aa.substring(length-2, 0)/1.1);
	quick.style.left = newZoom2;

}

//·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿
function moveLogin() {
	//self.location="/portal/login/login.jsp";
	self.location="/portal/sso/Login/Portal/SSOLogin.jsp";
}

//¼¼¼ÇÁ¾·á, ·Î±×¾Æ¿ô
function fLogOut(){
	if(confirm("·Î±×¾Æ¿ôÇÏ½Ã°Ú½À´Ï±î?")){
		document.location.href="/portal/sso/Login/Portal/SSOLogout.jsp";
	}
}

//Æ¯¼ö¹®ÀÚÀÔ·ÂÁ¦ÇÑ
function checkkeycode(t){
	if((t.keyCode > 32 && t.keyCode < 48) || (t.keyCode > 57 && t.keyCode < 65)||(t.keyCode > 90 && t.keyCode < 97)){
   	t.returnValue = false;
   	alert("Æ¯¼ö¹®ÀÚ´Â ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
  	}
}

//Æ¯¼ö¹®ÀÚÀÔ·ÂÁ¦ÇÑ, @ Á¦¿Ü, °ø¹éÁ¦¿Ü : email ÀÔ·Â½Ã »ç¿ë
function checkEmailAddr(t){
	if((t.keyCode > 31 && t.keyCode < 45)||(t.keyCode==47) || (t.keyCode > 57 && t.keyCode < 64)||(t.keyCode > 90 && t.keyCode < 97)){
   	t.returnValue = false;
   	alert("Æ¯¼ö¹®ÀÚ´Â ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.");
  	}
}

//Æ¯¼ö¹®ÀÚ, ¹®ÀÚ ÀÔ·ÂÁ¦ÇÑ(ÀüÈ­¹øÈ£ ÀÔ·Â½Ã
function checkNember(t){
	if(t.keyCode < 48 || t.keyCode > 57)
	{
   	t.returnValue = false;
   	alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù. ");
  	}
}

//Æ¯¼ö¹®ÀÚ, ¹®ÀÚ ÀÔ·ÂÁ¦ÇÑ, enterkey Á¦¿Ü(ÀüÈ­¹øÈ£ ÀÔ·Â½Ã
function checkNemberNoEnterKey(t){
	if((t.keyCode < 48 || t.keyCode > 57)&&t.keyCode!=13)
	{
   	t.returnValue = false;
   	alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù. ");
  	}
}


//Æ¯¼ö¹®ÀÚÁ¦ÇÑ(ÆÐ½º¿öµå¿ë ¿µ¹®´ë¼Ò¹®ÀÚ, ¼ýÀÚ, ÀÏºÎ Æ¯¼ö¹®ÀÚ(!@#$%))
function checkkeycodepwd(t){
	if(!
				( (t.keyCode > 47 && t.keyCode < 58) 
			||(t.keyCode > 64 && t.keyCode < 91)
			||(t.keyCode > 96 && t.keyCode < 123)
			||(t.keyCode ==33 ||t.keyCode ==64 ||t.keyCode ==35 ||t.keyCode ==36 ||t.keyCode ==37||t.keyCode ==13))
		){
   		alert("ÆÐ½º¿öµå´Â ¿µ¹® ´ë¼Ò¹®ÀÚ, ¼ýÀÚ, ±×¸®°í ÀÏºÎ Æ¯¼ö¹®ÀÚ('!@#$%')¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù. ");
			t.returnValue = false;
  	}
}

//textarea ±ÛÀÚÁ¦ÇÑ

function onkeylengthMax(formobj, maxlength, objname)
{
	var li_byte = 0;
	var li_len = 0;

	for(var i=0; i< formobj.value.length; i++){
		if (escape(formobj.value.charAt(i)).length > 4)		li_byte += 2;
		else		li_byte++;

		if(li_byte <= maxlength)		li_len = i + 1;
	}

	obj = document.getElementById("content_byte");
	obj.innerText = li_byte + "/300byte";
	if(li_byte > maxlength){
		alert('ÃÖ´ë ±ÛÀÚ ÀÔ·Â¼ö¸¦ ÃÊ°ú ÇÏ¿´½À´Ï´Ù.');
		formobj.value = formobj.value.substr(0, li_len);
		obj.innerText = "300/300byte";
	}

	formobj.focus();
}

// °Ë»ö½Ã·ÎµùÃ³¸®
function progress(){
	$("ProcLayer").style.display = "block";
	$("ProcLayer1").style.display = "block";
}

// ·¹ÇÁÆ® naver ºí·Î±× º£³Ê ¸µÅ©
function go_NaverBlog(){
	window.open("http://blog.naver.com/openex","","");  
}

// ·¹ÇÁÆ® daum ºí·Î±× º£³Ê ¸µÅ©
function go_DaumBlog(){
	window.open("http://blog.daum.net/openex","","");  
}

// ·¹ÇÁÆ® °³ÀÎÁ¤º¸ ¶ô¿£¶ô º£³Ê ¸µÅ©
function go_personalInfo(){
	window.open("http://www.kisa.or.kr/privacy_study.html","","");  
}

function callCenterPop() 
{
	window.open("/portal/cus/puc/puc1/callCenterPop.jsp","pop","height=800,width=617,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes");
}

function go_twitter(){
	window.open("http://twitter.com/15882504","","");  
}


function FIND_LOAD(){
self.location="/portal/cor/int/int2/cor_int_02.jsp";
}

/***** °ø°ø¾ÆÀÌÇÉ °ü·Ã ½ºÅ©¸³Æ® Ãß°¡ 2009-12-17 *****/
/* °ø°ø¾ÆÀÌÇÉ ÀÎÁõÆäÀÌÁö ÀÌµ¿ **/
function goGPIN(rPage){
	wWidth		= 360;
	wHight		= 120;
	wX				= (window.screen.width - wWidth) / 2;
	wY				= (window.screen.height - wHight) / 2;

	var rPage	= rPage;
	var url			= "http://www.ex.co.kr/G-PIN/GPIN_Request.jsp?rPage="+rPage;
	var w			= window.open(url, "gPinLoginWin", "directories=no,toolbar=no,left="+wX+",top="+wY+",width="+wWidth+",height="+wHight);
}
/* ½Ç¸íÀÎÁõ¹æ¹ý ºÐ±â function (°ø°ø¾ÆÀÌÇÉ:GPIN, ÇÑ½ÅÆò:SKOR) **/
function radioCHK(arg){
	var arg	= arg.value;
	var lay	= document.all;

	if( arg == "G_PIN" ){
		lay.G_PIN.style.display			= "";
		lay.Sign_Korea.style.display	= "none";
	}else{
		lay.G_PIN.style.display			= "none";
		lay.Sign_Korea.style.display	= "";
	}
}
/* ÁøÇàÁß Ç¥½ÃÃ¢ **/
 function loadingBar(status){
	if( status=="on" ){
	   $("ProcLayer").style.display		= "";
	   $("ProcLayer1").style.display	= "";		
	}else{
		$("ProcLayer").style.display	= "none";
		$("ProcLayer1").style.display	= "none";
	}
}