
//파일다운로드
function getFile(alias,file){
	location.href="/filedown?alias="+alias+"&file="+file;
}


/******************************************************************************/
/*                             기본 롤오버 함수                               */
/******************************************************************************/

function setPng24(obj) { 
    obj.width=obj.height=1; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = 
    "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

function chg(name,img){
name.src = img;
}

function chg1(name, flag) { // 마우스 오버
    if(flag == 1) {
        var imgSrcName = name.src.substring(0, name.src.lastIndexOf("."));
        name.src = imgSrcName+"1.gif";
    }
}

function chg2(name, flag) { // 마우스 아웃
    if(flag == 1) {
        var imgSrcName = name.src.substring(0, name.src.lastIndexOf(".")-1);
        name.src = imgSrcName+".gif";
    }
}


/******************************************************************************/
/*                             select box 이미지처리                          */
/******************************************************************************/

function SwitchMenu(spanid)
 {

 var object = document.all.tags("span");                                   

  if(object != null)
  {
	
		for(var i=0;i<object.length;i++)
		{
			 
			  
			  if(object(i).id == spanid && object(i).style.display != "")
			  {
						object(i).style.display = "";  // span를 보이게 한다.
			  }
			  else
			  {
						object(i).style.display = "none"; //span를 숨긴다.

			  }
		}
  }
}


/******************************************************************************/
/*                           팝업창 띄우기 함수                               */
/******************************************************************************/

function openWin(url, id, option) {
    window.open(url, id, option);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


/******************************************************************************/
/*                             플래쉬팝업창부분                               */
/******************************************************************************/
function openwin1(){ 
window.open("/citizen/citizen.asp","","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=617,height=620"); 
} 
function openwin2(){ 
window.open("/global/jebo.asp","","toolbar=no,location=no,status=no,menubar=no,scrollbars=no, resizable=no, width=600, height=570,top=150,left=200"); 
} 

function closeWin()	 {
self.close();
}


/******************************************************************************/
/*                         POPUP 관련 세팅 스크립트                           */
/******************************************************************************/
function setCookie( name, value, expiredays )
{
        	var todayDate = new Date();
        	todayDate.setDate( todayDate.getDate() + expiredays );
        	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie( name )
{
        	var nameOfCookie = name + "=";
        	var x = 0;
        	while ( x <= document.cookie.length )
        	{
                	var y = (x+nameOfCookie.length);
                	if ( document.cookie.substring( x, y ) == nameOfCookie ) {if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        	return unescape( document.cookie.substring( y, endOfCookie ) );
                	}
                	x = document.cookie.indexOf( " ", x ) + 1;
                	if ( x == 0 )
                        	break;
        	}
        	return "";
}
