<!--

	//*************************************************************
	//**
	//**	유틸리티 스크립트 시작
	//**
	//*************************************************************




	//1. 링크 점선 없에기

		function allblur() {
		  for (i = 0; i < document.links.length; i++)
		  document.links[i].onfocus = document.links[i].blur;
		}

	//2. 마우스롤오버버튼

		//페이드효과
		function bt(name,after) { 

			eval(name+'.filters.blendTrans.stop();'); 
			eval(name+'.filters.blendTrans.Apply();'); 
			eval(name+'.src="'+after+'";'); 
			eval(name+'.filters.blendTrans.Play();'); 

		}

		//일반효과
		function img_up(img_name,src){
			img_name.src=src;
		}

		function img_def(img_name,src){
			img_name.src=src;
		}

		//링크주소처리
		function link_url(url){
			location.href(url);
		}



	//3. 기본팝업

		function de_popup(a,b,c,d,e,f){
			window.open(a + b, c ,'resizable=yes,width='+d+',height='+e+',scrollbars='+f);
		}

	//4. 이미지팝업
	
		function open_pic_view(file_full_path){
			var url = "/_Common/img_view.asp?path="+file_full_path;
			var N_win = window.open(url,'view','resizable=0,width=100,height=100,scrollbars=0');
		}


	//5. 프린트팝업
	
		function FUN_PrintContent(){
	
			var PreContent	= '<html><head><title>아름다운 빛깔구이 충북칠보!</title><link rel=stylesheet type=text/css href=/_Library/Css/normal_style.css></script></head><body topmargin=0 leftmargin=0 onload=javascript:window.print();>';
			
			var NextContent	= '</body></html>';
		
			var GetContent	= document.all('PrintContent').innerHTML;
		
			var PrintWindow	= window.open('', 'PrintWindow', 'width=640,height=500,scrollbars=yes,resizable=no,toolbar=yes');
		
			var InsertDoc	= PrintWindow.document;
			InsertDoc.open();
			InsertDoc.write(PreContent + GetContent + NextContent);
			InsertDoc.close();
		}
		
	//6. 액션팝업
	
		function MoveOpen(url,ld,td,w,h,s) {

			var heightspeed = 14; //리사이즈 세로 속도
			var widthspeed = 15; //리사이즈 가로 속도
			var leftdist = ld;
			var topdist = td;

			var winwidth = w;
			var winheight = h;
			var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=" + s );
			
			for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
			sizer.resizeTo("1", sizeheight);
			}
			
			for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
			sizer.resizeTo(sizewidth, sizeheight);
			}
			
			sizer.location = url;
		}	

	//7. 이미지 리사이즈 팝업
	
		function full_size_view(){

    var imgWidth = 780;        //** 설정 이미지 폭값
    var imgHeight = 600;      //** 설정 이미지 높이값
 

        var O_Width = view_pic.width;        //** 이미지의 실제 폭
        var O_Height = view_pic.height;     //** 이미지의 실제 높이
        var ReWidth = O_Width;        //** 변화된 폭 저장 변수
        var ReHeight = O_Height;      //** 변화된 높이 저장 변수
 
        if(ReWidth > imgWidth)
        {
            ReWidth = imgWidth;
            ReHeight = (O_Height * ReWidth) / O_Width;
        }
 
        if(ReHeight > imgHeight)
        {
            ReWidth = (ReWidth * imgHeight) / ReHeight;
            ReHeight = imgHeight;
        }

             view_pic.width = ReWidth;
             view_pic.height = ReHeight;	
            
			var xx = ReWidth;
			var yy = ReHeight;
			var sxx = 0; //창오픈 가로위치
			var syy = 0; //창오픈 세로위치


            
			var heightspeed = 15; //리사이즈 세로 속도
			var widthspeed = 14; // 리사이즈 가로속도
	
			var leftdist = sxx;
			var topdist = syy;

			var winwidth = xx + 11;
			var winheight = yy + 21;
			

			self.moveTo(sxx,syy);

			for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
			self.resizeTo("1", sizeheight);
			}
			
			for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
			self.resizeTo(sizewidth, sizeheight);
			}			

			window.title="충주시";
		}
		
		function w_close(){
			self.close();
		}
	
		function w_close2(){
			alert('\n이미지 파일이 없거나 로딩 중 문제가 발생하였습니다.\n\n창을 닫겠습니다.\n');
			self.close();
		}	
		

	//8. 실국페이지 팝업


		function openPage(form) {
			selection = form.openPage1.options[form.openPage1.selectedIndex].value;
		      win = window.open(selection, 'popupwinname', 'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=798,height=600,left=0,top=0');
		     win.focus();
		}

		function openPage2(link) {
		      win = window.open(link, 'popupwinname', 'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=798,height=600,left=0,top=0');
		     win.focus();
		}

		function openPage4(form) {
			selection = form.openPage4.options[form.openPage4.selectedIndex].value;
		      location.href = selection
		}

		function openPage3(form) {
			selection = form.region.options[form.region.selectedIndex].value;
			  win = window.open(selection, 'company', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=620,height=600,left=0,top=0');
		     win.focus();
		}
		function openPage5(form) {
			selection = form.type.options[form.type.selectedIndex].value;
			  win = window.open(selection, 'company', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=620,height=600,left=0,top=0');
		     win.focus();
		}		
		function namosw_goto_byselect(sel, targetstr)
			{
			  var index = sel.selectedIndex;
			  if (sel.options[index].value != '') {
			     if (targetstr == 'blank') {
			       window.open(sel.options[index].value, 'win1');
		     } else {
		      var frameobj;
		       if (targetstr == '') targetstr = 'self';
		       if ((frameobj = eval(targetstr)) != null)
		         frameobj.location = sel.options[index].value;
				     }
			  }
			}	

	//9. 서브메뉴 보이기

		function sub_menu_view(num){

			var tr_obj, edit_num;
		
			for (i=0;i<6;i++){
				if (i<6 && i>0){
					edit_num = '0'+i;
				}else{
					edit_num = i;
				}
		
				tr_obj = eval('main_menu_'+ edit_num+'.style');
			
				if (i == num){
					tr_obj.display = 'block';
				}else{
					tr_obj.display = 'none';
				}


			}
		}	
		
	//10. 쿠키 관련
	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 "";
	}

	function setCookie( name, value, expiredays ){
		var todayDate = new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
	}

	//11. 팝업윈도우관련
	function windowopen(url){
		window.open(url,'open','left=0,top=0,width=363, height=472 ,scrollbars=no');
	}
	//*************************************************************
	//**
	//**	유틸리티 스크립트 끝
	//**
	//*************************************************************

	//12. 플래시출럭관련
	function FUN_Flash_Print(strFlash_Name, strFlash_URL, nFlash_X, nFlash_Y, strFlashvars)
	{
		var appName  = navigator.appName;  
		var appVersion	= parseFloat(navigator.appVersion.split("MSIE")[1]);

		if(appName != "Microsoft Internet Explorer" || appVersion < 5.5) // 윈도우 익스플로러가 버전이 낮거나 익스플로러가 아닐경우
		{ 

			if(strFlashvars != "")
			{
				strFlashvars = strFlashvars.replace("'", "\'");
				var Element_05 = '<embed src="'+ strFlash_URL +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" quality="High" wmode="transparent" name="' + strFlash_Name + '" id="' + strFlash_Name + '" width="'+ nFlash_X +'" height="'+ nFlash_Y +'" FlashVars="'+ strFlashvars +'"/>';
			}
			else
			{
				var Element_05 = '<embed src="'+ strFlash_URL +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" quality="High" wmode="transparent" name="' + strFlash_Name + '" id="' + strFlash_Name + '" width="'+ nFlash_X +'" height="'+ nFlash_Y +'"/>';
			}

			document.write(Element_05);
		}
		else // 윈도우 익스플로러일 경우
		{ 

			document.write('<div id="Td' + strFlash_Name + '" name="Td' + strFlash_Name + '"></div>');

			if (document.getElementById)
			{
				var ObjectDocumentNow = document.getElementById("Td" + strFlash_Name);
			}
			else if(document.all)
			{
				var ObjectDocumentNow = document.all("Td" + strFlash_Name)
			}

			var myObjFlash = document.createElement('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" name="' + strFlash_Name + '" id="' + strFlash_Name + '" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+ nFlash_X +'" height="'+ nFlash_Y +'">');
			var Element_01 = document.createElement('<param name="movie" value="'+ strFlash_URL +'">');
			var Element_02 = document.createElement('<param name="quality" value="High">');
			var Element_03 = document.createElement('<param name="wmode" value="transparent">');


			myObjFlash.appendChild(Element_01);
			myObjFlash.appendChild(Element_02);
			myObjFlash.appendChild(Element_03);

			if(strFlashvars != "")
			{
				strFlashvars = strFlashvars.replace("'", "\'");

				var Element_04 = document.createElement('<param name="FlashVars" value="'+ strFlashvars +'">');
				myObjFlash.appendChild(Element_04);
			}

			ObjectDocumentNow.appendChild(myObjFlash);
		} 
	
	}

//-->

