//----------------------------------------------------------------------------------------------------------------------------------------------------------
// a 테그로된 링크 새창 처리 함수
function fnLinkNewWindowProcess()
{
	if(document.links.length > 0)
	{
		for(var i=0; i<document.links.length; i++)
		{
			var strTitle		= document.links[i].getAttribute('title') ? document.links[i].getAttribute('title').toLowerCase() : '';

			if(strTitle.search(/새창\:/i) >= 0)
			{
				document.links[i].setAttribute('target', '_blank');
			}

			document.links[i].onfocus = document.links[i].blur;
		}
	}

	if(document.getElementsByTagName('AREA').length > 0)
	{
		for(var i=0; i<document.getElementsByTagName('AREA').length; i++)
		{
			var strTitle		= document.getElementsByTagName('AREA')[i].getAttribute('title') ? document.getElementsByTagName('AREA')[i].getAttribute('title').toLowerCase() : '';
			if(strTitle == '')
			{
				strTitle		= document.getElementsByTagName('AREA')[i].getAttribute('alt') ? document.getElementsByTagName('AREA')[i].getAttribute('alt').toLowerCase() : '';
			}

			if(strTitle.search(/새창\:/i) >= 0)
			{
				document.getElementsByTagName('AREA')[i].setAttribute('target', '_blank');
			}

			document.getElementsByTagName('AREA')[i].onfocus = document.links[i].blur;
		}
	}
}

fnAddEvent(window, 'onload', 'fnLinkNewWindowProcess()');


/*
function fnWindowResize()
{
	var dwWindowWidth		= window.document.body.offsetWidth;

	if(dwWindowWidth > 900 && dwWindowWidth < 1024)
	{
		window.document.body.className	= 'main_body_limit';
		window.document.body.width			= dwWindowWidth;
	}
	else
	{
		window.document.body.className	= 'main_body';
	}

	window.document.title		= dwWindowWidth +','+ window.document.body.className;
}

fnAddEvent(window, 'onload', 'fnWindowResize()');
fnAddEvent(window, 'onresize', 'fnWindowResize()');
*/


function fnPrintMoney(dwValue)
{
	dwValue				= String(dwValue);
	var dwLength			= dwValue.length;
	var nCount				= 0;
	var strBuf				= '';

	if(dwLength > 0)
	{
		for(var i=dwLength; i>0; i--)
		{
			if(nCount == 3)
			{
				strBuf	= dwValue.substring(i-1, i) + ',' + strBuf;
				nCount	= 0;
			}
			else
			{
				strBuf	= dwValue.substring(i-1, i) + strBuf;
			}
			
			nCount++;
		}
	}

	return strBuf;
}



//----------------------------------------------------------------------------------------------------------------------------------------------------------
// 해당 객체 가지고 오기
function fnGetObject(strName)
{
	var objObject	= null;
	
	if(objObject == null)
	{
		if(document.all)
		{
			objObject	= document.all(strName);
		}
	}
	else
	{
		return objObject;
	}

	if(objObject == null)
	{
		if(document.getElementById)
		{
			objObject	= document.getElementById(strName);
		}
	}
	else
	{
		return objObject;
	}

/*
	if(objObject == null && document.getElementsByName)
	{
		objObject	= document.getElementsByName(strName);

		if(objObject.length > 0)
		{
			objObject	= objObject[0];
		}
		else
		{
			objObject	= null;
		}
	}
	else
		return objObject;
*/
/*
	if(objObject == null)
	{
		for(var i=0; i<document.all.length; i++)
		{
			if(document.all[i].name)
			{
				if(document.all[i].name.toLowerCase() == strName.toLowerCase())
				{
					objObject	= document.all[i];
					break;
				}
			}
		}
	}
	else
		return objObject;
*/

	return objObject;
}
//----------------------------------------------------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------------------------------------------------------------
//	이벤트 추가
function fnAddEvent(objObject, strEvent, strEventstring)
{
	strEvent	= strEvent.toLowerCase();

	if(strEvent.substring(0, 2) == 'on')
	{
		strEvent	= strEvent.substring(2);
	}

	try
	{
		if(objObject.attachEvent)
		{
			objObject.attachEvent('on'+ strEvent, function (){ eval(strEventstring); });
		}
		else if(objObject.addEventListener)
		{
			objObject.addEventListener(strEvent, function (){ eval(strEventstring); }, false);
		}

	}
	catch (e)
	{
		window.status	= 'Error : 이벤트를 추가하지 못했습니다. ['+ strEventstring +']';
	}
}
//----------------------------------------------------------------------------------------------------------------------------------------------------------



//----------------------------------------------------------------------------------------------------------------------------------------------------------
// 윈도우 상태창 메세지 표시
function fnPrintMessageWindow(strMsg)
{
	window.status	= strMsg;
}
//----------------------------------------------------------------------------------------------------------------------------------------------------------


//----------------------------------------------------------------------------------------------------------------------------------------------------------
// 해당 아이디 내부에 해당 페이지 출력
function fnPrintSource(strId, strSource)
{
	var objPrintArea		= fnGetObject(strId);

	if(objPrintArea != null && strSource != '')
	{
		objPrintArea.innerHTML		= strSource;
	}
}

// 페이지 가지고오기
/*
	인자값 순서
	0 : 페이지 경로
	1 : 페이지명
	2 : 내용 리턴 여부 true/false (기본:true)
	3 : 0-함수리턴, 1-변수리턴
	4 : 내용 리턴 함수명/변수명 예: fnPrint(내용)/g_strSource	-함수일경우 내용을 해당 값으로 변경
*/
function fnGetPageSource()
{
	var objXmlHttp			= null;
	var strUrl				= null;
	var blsReturn			= true;
	var bReturnType			= null;
	var strExecName			= null;

	if(arguments.length >= 2)
	{
		for(var i=0; i<arguments.length; i++)
		{
			try
			{
				if(i == 0)
				{
					arguments[i]	= arguments[i].replace(/\\/g, '/');

					if(arguments[i].substring(0, 1) != '/')		arguments[i] = '/' + arguments[i];
					if(arguments[i].substring(arguments[i].length - 1, arguments[i].length) != '/')		arguments[i] = arguments[i] + '/';
				}
			}
			catch (e)
			{}
		}
		
		strUrl		= arguments[0] + arguments[1];

		if(arguments[2] != null)
			blsReturn	= arguments[2] == false ? false : true;

		if(arguments[3] != null)
			bReturnType		= arguments[3];

		if(arguments[4] != null)
			strExecName		= arguments[4];

		if(window.XMLHttpRequest)
			objXmlHttp	= new XMLHttpRequest();
		else
			objXmlHttp	= new ActiveXObject("Microsoft.xmlhttp");
		
		if(objXmlHttp)
		{
			var blsAsync	= false;

			if(!blsReturn && bReturnType == 0)
			{
				objXmlHttp.onreadystatechange	= function () {fnGetPageSource_onreadystatechange(objXmlHttp, strUrl, strExecName, bReturnType) };

				blsAsync	= true;
			}

			objXmlHttp.open("GET", strUrl, blsAsync);

			objXmlHttp.send(null);

			if(blsReturn || bReturnType == 1)
			{
				var dwReadyStatus		= parseInt(objXmlHttp.readyState, 10);

				if(dwReadyStatus == 4)
				{
					var dwStatus		= parseInt(objXmlHttp.status, 10);

					if(dwStatus == 404)
					{
						fnPrintMessageWindow('Error : (1)파일 없음[경로 : '+ strUrl +']');

						if(blsReturn)
							return null;
						else if(bReturnType == 1)
						{
							eval(strExecName +'	= null;');
							return;
						}
					}
					else
					{
						if(blsReturn)
							return objXmlHttp.responseText;
						else if(bReturnType == 1)
						{
							eval(strExecName +"	= \'"+ objXmlHttp.responseText.replace(/\r\n/g, '\\r\\n').replace(/\n/g, '\\n').replace(/'/g, "\\'") +"\';");
							return;
						}
					}
				}
				else
				{
					fnPrintMessageWindow('Error : (2)파일 로딩실패[경로 : '+ strUrl +']');
				}
			}
			else
			{
				return;
			}
		}
	}
	else
	{
		fnPrintMessageWindow('Error : (3)fnGetPageSource() 호출 오류');
		return null;
	}
}

// 페이지 가지고오기 > 추가 완료함수
function fnGetPageSource_onreadystatechange(objXmlHttp, strUrl, strExecName, bReturnType)
{
	var dwReadyStatus		= parseInt(objXmlHttp.readyState, 10);

	if(dwReadyStatus == 4)
	{
		var dwStatus		= parseInt(objXmlHttp.status, 10);

		if(dwStatus == 404)
		{
			fnPrintMessageWindow('Error : (4)파일 없음[경로 : '+ strUrl +']');
		}
		else
		{
			fnPrintMessageWindow('Success : (5)파일 로딩완료[경로 : '+ strUrl +']');

			if(bReturnType == 0)
			{
				eval(strExecName.replace(/내용/g, "'"+ objXmlHttp.responseText.replace(/\r\n/g, '\\r\\n').replace(/\n/g, '\\n').replace(/'/g, "\\'") +"'"));
			}
			else
			{
				eval(strExecName.replace(/내용/g, "null"));
			}
		}
	}
	else
	{
		fnPrintMessageWindow('Error : (6)파일 로딩실패[경로 : '+ strUrl +']');
	}
}

//----------------------------------------------------------------------------------------------------------------------------------------------------------


//----------------------------------------------------------------------------------------------------------------------------------------------------------
//	폼 이벤트 추가함수

if(window.attachEvent)
{
	window.attachEvent('onload', fnFormAddEvent);
}
else if(window.addEventListener)
{
	window.addEventListener('load', fnFormAddEvent, false);
}

function fnFormAddEvent()
{
	var dwIndex		= document.forms.length;

	if(dwIndex > 0)
	{
		for(var i=0; i<dwIndex; i++)
		{
			var eventOnsubmit	= document.forms[i].onsubmit;

			if(!eventOnsubmit)
			{
				var blsAddEvent		= document.forms[i].getAttribute('addevent') ? document.forms[i].getAttribute('addevent') : false;
				var strProcessType	= document.forms[i].getAttribute('process') ? document.forms[i].getAttribute('process') : '';

				if(!blsAddEvent)
				{
					fnAddFormCheckEvent(document.forms[i]);
					document.forms[i].onsubmit	= function (){return fnFormAutoCheck(this); };
					document.forms[i].setAttribute('addevent', true);

					if(strProcessType.toLowerCase() == 'hidden')
					{
						var strIframeName	= 'iframe_'+ document.forms[i].name;


						var objFormTarget	= fnGetObject(strIframeName);
						if(objFormTarget == null)
						{
	//xxx
							document.forms[i].insertAdjacentHTML("afterEnd", '<iframe name="'+ strIframeName +'" id="'+ strIframeName +'" style="display: none;"></iframe>');
						}
						
						objFormTarget	= fnGetObject(strIframeName);
						if(objFormTarget)
						{
							document.forms[i].target		= strIframeName;
						}
					}
				}
			}
		}
	}
}
//----------------------------------------------------------------------------------------------------------------------------------------------------------


//----------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------
// 폼 내용체크 함수

function fnFormAutoCheck(objThis)
{
	var strReturn			= true;
	var dwElementsCount		= objThis.elements.length;

	var strConfirm			= objThis.getAttribute('confirm') ? objThis.getAttribute('confirm') : null;
	var strProcessType		= objThis.getAttribute('process') ? objThis.getAttribute('process') : '';

	for(var i=0; i<dwElementsCount; i++)
	{
		strReturn	= fnFormElementsCheckEvent(objThis.elements[i], 'submit')
	}

	if(strProcessType.toLowerCase() == 'hidden')
	{
		if(!fnGetObject('iframe_'+ objThis.name))
		{
			var objWindow	= window.open('', 'iframe_'+ objThis.name, 'width=10px, height=10px');
			objWindow.moveTo(-1000, -1000);
		}

		objThis.target		= 'iframe_'+ objThis.name;
	}

	if(strConfirm)
	{
		var blsAnswer	= confirm(strConfirm);
		if(!blsAnswer)
			return false;
	}

	if(strReturn)
	{
		objThis.submit();
		return false;
	}

	//return strReturn;
}

// 폼 자식들 입력체크 이벤트 추가
function fnAddFormCheckEvent(objThis)
{
	var objInput			= null;
	var dwElementsCount		= objThis.length;
	var objFocusFirst		= null;

	for(var i=0; i<dwElementsCount; i++)
	{
		objInput	= objThis.elements[i];

		var strCheck		= objInput.getAttribute('check') ? objInput.getAttribute('check') : null;
		var strFocusFirst	= objInput.getAttribute('focusfirst') ? objInput.getAttribute('focusfirst').toLowerCase() : 'false';

		if(strFocusFirst == 'true')
			objFocusFirst	= objInput;

		if(strCheck)
		{
			var strAddEvents	= objInput.getAttribute('addevents') ? objInput.getAttribute('addevents') : '';

			if(strCheck != '')
			{
				var arrCheck	= strCheck.split(',');

				for(var j=0; j<arrCheck.length; j++)
				{
					if(arrCheck[j].search(/입력시/) >= 0 && strAddEvents.search(/입력시/) < 0)
					{
						objInput.onpropertychange		= function (){ fnFormElementsCheckEvent(this, 'onpropertychange'); };

						objInput.onfocus				= function (){ fnOnfocus(this); };
						objInput.onblur					= function (){ fnOnBlur(this); };
					}
					else if(arrCheck[j].search(/선택시/) >= 0 && strAddEvents.search(/선택시/) < 0)
					{
						objInput.onpropertychange		= function (){ fnFormElementsCheckEvent(this, 'onpropertychange'); };
					}
				}
			}
		}

		try
		{
			objFocusFirst.focus();
		}
		catch (e){}
	}
}

var g_objFocusObject	= null;
function fnOnfocus(objThis)
{
	g_objFocusObject	= objThis;
}

function fnOnBlur(objThis)
{
	if(g_objFocusObject == objThis)
	{
		g_objFocusObject	= null;
	}
}


// 폼 자식들 내용체크
function fnFormElementsCheckEvent(objInput, strEventType)
{
	var strTagName			= objInput.tagName.toLowerCase() == 'input' ? objInput.type.toLowerCase() : objInput.tagName.toLowerCase() ;
	var strCheckName		= objInput.getAttribute('checkname') ? objInput.getAttribute('checkname') : objInput.name +' ['+ objInput.tagName +']';
	var strCheckType		= objInput.getAttribute('checktype') ? objInput.getAttribute('checktype') : null;
	var dwCheckMinLength	= objInput.getAttribute('checkminlength') ? parseInt(objInput.getAttribute('checkminlength'), 10) : null;
	var dwCheckMaxLength	= objInput.getAttribute('checkmaxlength') ? parseInt(objInput.getAttribute('checkmaxlength'), 10) : null;
	var strCheckMove		= objInput.getAttribute('checkmove') ? objInput.getAttribute('checkmove') : null;
	var strReturnValue		= true;

	// 체크양식
	if(strCheckType)
	{
		switch (strTagName)
		{
		case 'text':
			strReturnValue	= fnFormElementsCheck_Text(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength);
			break;
		case 'file':
			strReturnValue	= fnFormElementsCheck_File(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength);
			break;
		case 'checkbox':
			strReturnValue	= fnFormElementsCheck_Checkbox(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength);
			break;
		case 'radio':
			strReturnValue	= fnFormElementsCheck_Radio(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength);
			break;
		case 'textarea':
			strReturnValue	= fnFormElementsCheck_Textarea(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength);
			break;
		case 'select':
			strReturnValue	= fnFormElementsCheck_Select(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength);
			break;
		}

		if(!strReturnValue)
		{
			try
			{
				objInput.focus();
			}
			catch (e){}
		}
	}

	return strReturnValue;
}




// 폼 자식들 테그 종류별 세부 체크
	function fnFormElementsCheck_Text(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength)
	{
		var blsReturnValue		= true;
		var strAlertMsg			= '';

		if(g_objFocusObject != objInput)
		{
			return blsReturnValue;
		}

		var arrCheckType	= null;

		if(strCheckType != '')
			arrCheckType	= strCheckType.split(',');

		if(arrCheckType.length > 0)
		{
			for(var i=0; i<arrCheckType.length; i++)
			{
				switch (arrCheckType[i].toLowerCase())
				{
				case '':
					blsReturnValue		= true;
					break;
				case '*':
					blsReturnValue		= true;
					break;
				case '!빈값':
					if(objInput.value == '')
					{
						blsReturnValue	= false;
						strAlertMsg		= '내용을 입력해주시기 바랍니다.';
					}
					break;
				case '숫자':
					if(objInput.value.search(/\D/) != -1)
					{
						blsReturnValue	= false;
						strAlertMsg		= '숫자만 입력해주시기 바랍니다.';
					}
					break;
				case '!숫자':
					if(objInput.value.search(/\D/) != -1)
					{
						blsReturnValue	= false;
						strAlertMsg		= '숫자만 입력해주시기 바랍니다.';
					}
					break;
				case '한글':
					break;
				}

				if(!blsReturnValue)
					break;
			}
		}

		if(dwCheckMinLength)
		{
			if(objInput.value.length < dwCheckMinLength)
			{
				blsReturnValue	= false;
				strAlertMsg		= '<strong>['+ objInput.value.length +'/'+ dwCheckMinLength +']</strong> 입력 글자수가 '+ dwCheckMinLength +'글자 보다 크거나 같아야 합니다.';
			}
		}

		if(dwCheckMaxLength)
		{
			if(objInput.value.length > dwCheckMaxLength)
			{
				blsReturnValue	= false;
				strAlertMsg		= '<strong>['+ objInput.value.length +'/'+ dwCheckMaxLength +']</strong> 입력 글자수가 '+ dwCheckMaxLength +'글자 보다 작거나 같아야 합니다.';
			}
		}

		fnFormElementsCheck_PrintMsg(objInput, strEventType, blsReturnValue, strAlertMsg);
	}

	function fnFormElementsCheck_File(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength)
	{
		return true;
	}

	function fnFormElementsCheck_Checkbox(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength)
	{
		return true;
	}

	function fnFormElementsCheck_Radio(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength)
	{
		return true;
	}

	function fnFormElementsCheck_Textarea(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength)
	{
		return true;
	}

	function fnFormElementsCheck_Select(strEventType, objInput, strCheckName, strCheckType, dwCheckMinLength, dwCheckMaxLength)
	{
		return true;
	}

//xxx
//	각각 체크함수 처리

//----------------------------------------------------------------------------------------------------------------------------------------------------------
function fnFormElementsCheck_PrintMsg(objInput, strEventType, blsReturnValue, strAlertMsg)
{
	if(!blsReturnValue && strAlertMsg != '')
	{
		if(strEventType == 'onpropertychange')
		{
			var objDiv	= fnGetObject('div_'+ objInput.name);
			
			if(!objDiv)
			{
				objDiv	= document.createElement('div');
				objDiv.id	= 'div_'+ objInput.name;
				objDiv.className		= 'alertmsg';

				objInput.insertAdjacentElement("afterEnd", objDiv);
			}

			objDiv.innerHTML		= '<nobr>'+ strAlertMsg +'</nobr>';
		}
		else if(strEventType == 'submit')
		{
			strAlertMsg		= strCheckName +'(는/은) '+ strAlertMsg
			alert();
		}
	}
	else
	{
		if(strEventType == 'onpropertychange')
		{
			var objDiv	= fnGetObject('div_'+ objInput.name);

			if(objDiv)
			{
				objInput.parentNode.removeChild(objDiv);
			}
		}
	}
}
//----------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------
// 롤링처리
var arrRollingObjects		= new Array;

function scScrolling()
{
	this._MoveType		= null;
	this._MoveDivide		= null;
	this._GapTime			= null;
	this._ScrollStop			= null;

	this._ScrollCount		= null;

	this._parentObject		= null;
	this._parentWidth		= null;
	this._parentHeight		= null;

	this._childObject		= null;
	this._childWidth			= null;
	this._childHeight		= null;
	this._childPosX			= null;
	this._childPosY			= null;
}

function fnSetRolling(strId, strStartPosition, strEndPosition, dwMoveDivide, dwGapTime, blsStop)
{
	var objShowArea		= fnGetObject(strId);
	var dwIndex				= null;
	var bMoveType			= null;
	var objScrolling			= null;

	if(objShowArea != null)
	{
		dwIndex									= arrRollingObjects.length;
		arrRollingObjects[dwIndex]		= new scScrolling();

		with(arrRollingObjects[dwIndex])
		{
			_MoveDivide		= dwMoveDivide;
			_GapTime			= dwGapTime;
			_ScrollStop			= false;

			_ScrollCount		= 0;
		}

		objShowArea.style.position		= 'relative';
		objShowArea.style.overflow		= 'hidden';

		if(blsStop)
		{
			fnAddEvent(objShowArea, 'onmouseover', 'fnRollingStop('+ dwIndex +')');
			fnAddEvent(objShowArea, 'onmouseout', 'fnRollingStart('+ dwIndex +')');
		}

		var objInSlide			= document.createElement('DIV');
		if(objInSlide)
		{
			objInSlide.style.position				= 'relative';
			objInSlide.innerHTML					= objShowArea.innerHTML;
//			objInSlide.innerHTML					= objShowArea.innerHTML + objShowArea.innerHTML;

			objShowArea.innerHTML				= '';
			objShowArea.appendChild(objInSlide);
		}
		else
		{
			return false;
		}

		if(strStartPosition.toLowerCase() == 'left')
		{
			bMoveType		= 1;
		}
		else if(strStartPosition.toLowerCase() == 'right')
		{
			bMoveType		= 2;
		}
		else if(strStartPosition.toLowerCase() == 'top')
		{
			bMoveType		= 3;
		}
		else if(strStartPosition.toLowerCase() == 'bottom')
		{
			bMoveType		= 4;
		}

		with(arrRollingObjects[dwIndex])
		{
			_parentObject		= objShowArea;
			_parentWidth		= objShowArea.offsetWidth;
			_parentHeight		= objShowArea.offsetHeight;

			_childObject		= objInSlide;
			_childWidth			= objInSlide.offsetWidth;
			_childHeight		= objInSlide.offsetHeight;

			_MoveType		= bMoveType;
		}

		setTimeout(function () {fnRollingProcess(dwIndex);}, arrRollingObjects[dwIndex]._GapTime);
	}
}

function fnRollingStop(dwIndex)
{
	arrRollingObjects[dwIndex]._ScrollStop		= true;
}

function fnRollingStart(dwIndex)
{
	arrRollingObjects[dwIndex]._ScrollStop		= false;
}

function fnRollingProcess(dwIndex)
{
	if(!arrRollingObjects[dwIndex])
	{
		return false;
	}

	if(!arrRollingObjects[dwIndex]._ScrollStop)
	{
		with (arrRollingObjects[dwIndex])
		{
			var dwBufX	= 0;
			var dwBufY	= 0;

			// 좌->우 이동
			if(_MoveType == 1)
			{
				if(_parentWidth >= _childWidth)
				{
					return false;
				}

				dwBufX		= _MoveDivide * _ScrollCount;
				dwBufX		= dwBufX % (_childWidth + _parentWidth) - _childWidth;

				dwBufX		= dwBufX;
			}
			// 우->좌 이동
			else if(_MoveType == 2)
			{
				if(_parentWidth >= _childWidth)
				{
					return false;
				}

				dwBufX		= _MoveDivide * _ScrollCount;
				dwBufX		= dwBufX % (_childWidth + _parentWidth);

				dwBufX		= _parentWidth + dwBufX * (-1);
			}
			// 위->아래 이동
			else if(_MoveType == 3)
			{
				if(_parentHeight >= _childHeight)
				{
					return false;
				}

				dwBufY		= _MoveDivide * _ScrollCount;
				dwBufY		= dwBufY % (_childHeight + _parentHeight) - _childHeight;

				dwBufY		= dwBufY;
			}
			// 아래 -> 위 이동
			else if(_MoveType == 4)
			{
				if(_parentHeight >= _childHeight)
				{
					return false;
				}

				dwBufY		= _MoveDivide * _ScrollCount;
				dwBufY		= dwBufY % (_childHeight + _parentHeight);

				dwBufY		= _parentHeight + dwBufY * (-1);
			}

			if(dwBufX != null)
			{
				_childPosX						= dwBufX;
				_childObject.style.left		= dwBufX +'px';
			}

			if(dwBufY != null)
			{
				_childPosY						= dwBufY;
				_childObject.style.top		= dwBufY +'px';
			}

			_ScrollCount++;
		}
	}

	setTimeout(function () {fnRollingProcess(dwIndex);}, arrRollingObjects[dwIndex]._GapTime);
}


var g_blsRollingBannerStop		= false;
function fnRollingBanner(strPrintArea, dwShowCount, dwTimeGap)
{
	var objPrint			= fnGetObject(strPrintArea);

	if(objPrint != null)
	{
		fnAddEvent(objPrint, 'onmouseover', 'fnRollingBannerEvent(\'over\')');
		fnAddEvent(objPrint, 'onmouseout', 'fnRollingBannerEvent(\'out\')');

		var arrPrintNode		= new Array;

		for(var i=0; i<objPrint.childNodes.length; i++)
		{
			if(objPrint.childNodes[i].tagName.toLowerCase() == 'dl')
			{
				for(var j=0; j<objPrint.childNodes[i].childNodes.length; j++)
				{
					arrPrintNode[arrPrintNode.length]		= objPrint.childNodes[i].childNodes[j].innerHTML;
				}
			}
			else if(objPrint.childNodes[i].tagName.toLowerCase() == 'ol' || objPrint.childNodes[i].tagName.toLowerCase() == 'ul')
			{
				for(var j=0; j<objPrint.childNodes[i].childNodes.length; j++)
				{
					arrPrintNode[arrPrintNode.length]		= objPrint.childNodes[i].childNodes[j].innerHTML;
				}
			}
		}

		if(dwShowCount >= arrPrintNode.length)
			return;

		var strHTML		= '<dl>\n';
		for(var i=0; i<dwShowCount; i++)
		{
			strHTML		+= '<dd>'+ arrPrintNode[i] +'</dd>\n';
		}
		strHTML		+= '</dl>\n';

		
		setTimeout(function () {fnRollingBannerProcess(objPrint, dwShowCount, 1, arrPrintNode, dwTimeGap);}, dwTimeGap);
	}
}

function fnRollingBannerProcess(objPrintArea, dwShowCount, dwCount, arrPrintNode, dwTimeGap)
{
	var dwIndex		= 0;

	for(i=0; i<dwShowCount; i++)
	{
		if(!g_blsRollingBannerStop)
		{
			dwIndex			= (dwCount + i) % arrPrintNode.length;
			objPrintArea.childNodes[0].childNodes[i].innerHTML		= arrPrintNode[dwIndex];
		}
	}

	dwCount++;
	setTimeout(function () {fnRollingBannerProcess(objPrintArea, dwShowCount, dwCount, arrPrintNode, dwTimeGap);}, dwTimeGap);
}

function fnRollingBannerEvent(strType)
{
	strType		= strType.toLowerCase();

	if(strType == 'over')
	{
		g_blsRollingBannerStop	= true;
	}
	else
	{
		g_blsRollingBannerStop	= false;
	}
}


//----------------------------------------------------------------------------------------------------------------------------------------------------------

// 플래쉬 파일 삽입
function fnInsertFlashFile(strPrintAreaId, strId, strFilePaths, nWidth, nHeight, strValue, blsBackground)
{
	var objObject		= null;

	blsBackground	= blsBackground ? blsBackground : true;
	var strFilePath	= '';
	var arrFilePath	= strFilePaths.split(',');

	var dwSelectIndex	= Math.round(Math.random() * (arrFilePath.length - 1));

	if(dwSelectIndex < 0 && dwSelectIndex >= arrFilePath.length)
		dwSelectIndex	= 0;

	strFilePath			= arrFilePath[dwSelectIndex];

//	if(document.createElement('OBJECT'))

	var strAppName		= navigator.appName;
	var fAppVersion		= parseFloat(navigator.appVersion.split("MSIE")[1]);
	if(strAppName == "Microsoft Internet Explorer" || (strAppName == "Microsoft Internet Explorer" && fAppVersion >= 5.5))
	{
		objObject		= document.createElement('OBJECT');

		if(objObject)
		{
			with (objObject)
			{
				setAttribute('id', 'flash_'+ strId);
				setAttribute('classid', 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000');
				setAttribute('width', nWidth);
				setAttribute('height', nHeight);

				var objParamMovie		= document.createElement('PARAM');
				objParamMovie.setAttribute('name', 'movie');
				objParamMovie.setAttribute('value', strFilePath);
				appendChild(objParamMovie);

				var objParamSrc			= document.createElement('PARAM');
				objParamSrc.setAttribute('name', 'src');
				objParamSrc.setAttribute('value', strFilePath);
				appendChild(objParamSrc);

				var objParamMenu		= document.createElement('PARAM');
				objParamMenu.setAttribute('name', 'menu');
				objParamMenu.setAttribute('value', 0);
				appendChild(objParamMenu);

				var objParamQua		= document.createElement('PARAM');
				objParamQua.setAttribute('name', 'quality');
				objParamQua.setAttribute('value', 'high');
				appendChild(objParamQua);

				if(blsBackground)
				{
					var objParamMode		= document.createElement('PARAM');
					objParamMode.setAttribute('name', 'wmode');
					objParamMode.setAttribute('value', 'transparent');
					appendChild(objParamMode);
				}
			}
		}
	}
//	else if(document.createElement('EMBED'))
	else
	{
		objObject		= document.createElement('EMBED');

		if(objObject)
		{
			with (objObject)
			{
				setAttribute('id', 'flash_'+ strId);
				setAttribute('src', strFilePath);
				setAttribute('pluginspage', 'http://www.macromedia.com/go/getflashplayer');
				setAttribute('type', 'application/x-shockwave-flash');

				setAttribute('quality', 'high');
				setAttribute('wmode', 'transparent');
				setAttribute('width', nWidth);
				setAttribute('height', nHeight);
				setAttribute('FlashVars', strValue);
			}
		}
	}

	if(objObject)
	{
		var objPrintArea			= fnGetObject(strPrintAreaId);

		if(objPrintArea != null)
		{
			objPrintArea.appendChild(objObject);
			objPrintArea.innerHTML		= objPrintArea.innerHTML;
		}
	}
}

function InsertFlash(strPrintAreaId, strId, strFilePath, nWidth, nHeight, strValue, blsBackground)
{
	try
	{
		fnInsertFlashFile(strPrintAreaId, strId, strFilePath, nWidth, nHeight, strValue, blsBackground)	
	}
	catch (e)
	{
		fnOldFlashFilePrint(strId, strFilePath, nWidth, nHeight, strValue)
	}
}

// 구형 플래쉬 삽입
function fnOldFlashFilePrint(strId, strFilePath, nWidth, nHeight, strValue)
{
	var strAppName		= navigator.appName;
	var fAppVersion		= parseFloat(navigator.appVersion.split("MSIE")[1]);
	
	// 익스플로어 버전아니거나 하위 버전일 경우
	if(strAppName != "Microsoft Internet Explorer" || (strAppName == "Microsoft Internet Explorer" && fAppVersion < 5.5))
	{
		var strPrintTag		= '';
		var strAddValue		= '';
		
		if(strValue != '')
		{
			strAddValue	= ' FlashVars="'+ strValue +'"';
		}
		
		strPrintTag	= '<embed id="'+ strId +'" name="'+ strId +'" src="'+ strFilePath +'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="High" wmode="transparent" width="'+ nWidth +'" height="'+ nHeight +'"'+ strAddValue +'/>';
		
		document.write(strPrintTag);
	}
	// 윈도우 익스플로러 일경우
	else
	{
		var objOuter	= gfnGetObject(strId);
		
		if(objOuter)
		{
			var objParam	= new Array;
			var objFlash	= document.createElement('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" name="'+ strId +'" id="'+ strId +'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+ nWidth +'" height="'+ nHeight +'">');
			
			objParam[0]		= document.createElement('<param name="movie" value="'+ strFilePath +'">');
			objParam[1]		= document.createElement('<param name="quality" value="High">');
			objParam[2]		= document.createElement('<param name="wmode" value="transparent">');
			
			if(strValue != '')
			{
				objParam[3]		= document.createElement('<param name="FlashVars" value="'+ strValue +'">');
			}
			
			for(var i=0; i<objParam.length; i++)
			{
				objFlash.appendChild(objParam[i]);
			}
			
			objOuter.appendChild(objFlash);

			objOuter.innerHTML		= objOuter.innerHTML;
		}
	}
}



// 동영상 삽입
function fnInsertMovieFile(strPrintAreaId, strId, strFilePath, nWidth, nHeight, bAutoStart, bShowControls, nVolume, strAddOptions)
{
	var objObject		= null;

//	if(document.createElement('OBJECT'))

	var strAppName		= navigator.appName;
	var fAppVersion		= parseFloat(navigator.appVersion.split("MSIE")[1]);
	var strAddOptions	= strAddOptions ? strAddOptions : '';
	var arrAddOption		= strAddOptions != '' ? strAddOptions.split('|') : null;

	if(strAppName == "Microsoft Internet Explorer" || (strAppName == "Microsoft Internet Explorer" && fAppVersion >= 5.5))
	{
		objObject		= document.createElement('OBJECT');

		if(objObject)
		{
			with (objObject)
			{
				setAttribute('id', 'movie_'+ strId);
				setAttribute('classid', 'clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95');
				setAttribute('codebase', 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715');
				setAttribute('standby', 'Loading Player components...');
				setAttribute('type', 'application/x-oleobject');
				if(nWidth > 0)
					setAttribute('width', nWidth);

				if(nHeight > 0)
					setAttribute('height', nHeight);

				var objParam01			= document.createElement('PARAM');
				objParam01.setAttribute('name', 'filename');
				objParam01.setAttribute('value', strFilePath);
				appendChild(objParam01);

				var objParam02			= document.createElement('PARAM');
				objParam02.setAttribute('name', 'autostart');
				objParam02.setAttribute('value', bAutoStart);
				appendChild(objParam02);

				var objParam03			= document.createElement('PARAM');
				objParam03.setAttribute('name', 'ShowControls');
				objParam03.setAttribute('value', bShowControls);
				appendChild(objParam03);

				var objParam04			= document.createElement('PARAM');
				objParam04.setAttribute('name', 'ShowStatusBar');
				objParam04.setAttribute('value', bShowControls);
				appendChild(objParam04);

				var objParam05			= document.createElement('PARAM');
				objParam05.setAttribute('name', 'Volume');
				objParam05.setAttribute('value', (nVolume * 10) - 1000);
				appendChild(objParam05);

				if(strAddOptions != '')
				{
					var arrAddOption		= strAddOptions.split('|');

					for(var i=0; i<arrAddOption.length; i++)
					{
						var arrAddOptionValue		= arrAddOption[i].split(',');
						if(arrAddOptionValue.length == 2)
						{
							var strOptionName	= arrAddOptionValue[0];
							var strOptionValue	= arrAddOptionValue[1];

							var objParamAdd			= document.createElement('PARAM');
							objParamAdd.setAttribute('name', strOptionName);
							objParamAdd.setAttribute('value', strOptionValue);
							appendChild(objParamAdd);
						}
					}
				}
			}
		}
	}
//	else if(document.createElement('EMBED'))
	else
	{
		objObject		= document.createElement('EMBED');

		if(objObject)
		{
			with (objObject)
			{
				setAttribute('id', 'movie_'+ strId);
				setAttribute('src', strFilePath);
				setAttribute('pluginspage', 'http://www.microsoft.com/Windows/MediaPlayer/');
				setAttribute('type', 'application/x-mplayer2');

				setAttribute('autostart', bAutoStart);
				setAttribute('showcontrols', bShowControls);
				setAttribute('volume', nVolume);
				if(nWidth > 0)
					setAttribute('width', nWidth);

				if(nHeight > 0)
					setAttribute('height', nHeight);

				if(strAddOptions != '')
				{
					var arrAddOption		= strAddOptions.split('|');

					for(var i=0; i<arrAddOption.length; i++)
					{
						var arrAddOptionValue		= arrAddOption[i].split(',');
						if(arrAddOptionValue.length == 2)
						{
							var strOptionName	= arrAddOptionValue[0];
							var strOptionValue	= arrAddOptionValue[1];

							setAttribute(strOptionName, strOptionValue);
						}
					}
				}
			}
		}
	}

	if(objObject)
	{
		var objPrintArea			= fnGetObject(strPrintAreaId);

		if(objPrintArea != null)
		{
			objPrintArea.appendChild(objObject);
			objPrintArea.innerHTML		= objPrintArea.innerHTML;
		}
	}
}

function InsertMovie(strPrintAreaId, strId, strFilePath, nWidth, nHeight, bAutoStart, bShowControls, nVolume, strAddOptions)
{
	fnInsertMovieFile(strPrintAreaId, strId, strFilePath, nWidth, nHeight, bAutoStart, bShowControls, nVolume, strAddOptions);
}



function fnInsertAudioFile(strPrintAreaId, strId, strFilePath, nWidth, nHeight, bAutoStart, bShowControls, nVolume, strAddOptions)
{
	var objObject		= null;

	objObject		= document.createElement('EMBED');

	if(objObject)
	{
		with (objObject)
		{
			setAttribute('id', 'movie_'+ strId);
			setAttribute('src', strFilePath);
			setAttribute('pluginspage', 'http://www.microsoft.com/Windows/MediaPlayer/');
			setAttribute('type', 'audio/x-ms-asf');

			setAttribute('autostart', bAutoStart);
			setAttribute('showcontrols', bShowControls);
			setAttribute('volume', nVolume);
			if(nWidth > 0)
				setAttribute('width', nWidth);

			if(nHeight > 0)
				setAttribute('height', nHeight);

			if(strAddOptions != '')
			{
				var arrAddOption		= strAddOptions.split('|');

				for(var i=0; i<arrAddOption.length; i++)
				{
					var arrAddOptionValue		= arrAddOption[i].split(',');
					if(arrAddOptionValue.length == 2)
					{
						var strOptionName	= arrAddOptionValue[0];
						var strOptionValue	= arrAddOptionValue[1];

						setAttribute(strOptionName, strOptionValue);
					}
				}
			}
		}
	}

	if(objObject)
	{
		var objPrintArea			= fnGetObject(strPrintAreaId);

		if(objPrintArea != null)
		{
			objPrintArea.appendChild(objObject);
			objPrintArea.innerHTML		= objPrintArea.innerHTML;
		}
	}
}


function InsertAudio(strPrintAreaId, strId, strFilePath, nWidth, nHeight, bAutoStart, bShowControls, nVolume, strAddOptions)
{
	fnInsertAudioFile(strPrintAreaId, strId, strFilePath, nWidth, nHeight, bAutoStart, bShowControls, nVolume, strAddOptions);
}




//----------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------

function fnAreaPrintSet(strId)
{
	var objPrint			= fnGetObject(strId);

	if(objPrint != null)
	{
		var strHTML	= '';
		var strHeader		= '';
		strHeader		+= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';
		strHeader		+= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">';
		strHeader		+= '<head>';
		strHeader		+= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
		strHeader		+= '<title>'+ document.title +'</title>';
		strHeader		+= '<link rel="stylesheet" rev="stylesheet" type="text/css" media="all" charset="utf-8" href="/_library/css/default.css" />';
		strHeader		+= '<link rel="stylesheet" rev="stylesheet" type="text/css" media="all" charset="utf-8" href="/_library/css/site_sub_main.css" />';
		strHeader		+= '<link rel="stylesheet" rev="stylesheet" type="text/css" media="all" charset="utf-8" href="/_library/css/site_sub06.css" />';
		strHeader		+= '<style>#pagevote_area{display: none;}</style>';
		strHeader		+= '</head>';
		strHeader		+= '<body onload="javascript:window.print();self.close();">';

		var strSource		= objPrint.innerHTML;
		strSource 	= strSource.replace(/\r\n/g, "@!knhead_br!@");
		strSource 	= strSource.replace(/<scr+ip.*?\/scr+ipt>|<\!--인쇄버튼시작--\>.*?<\!--인쇄버튼끝--\>/gi, "");
		strSource 	= strSource.replace(/onclick=/gi, "onclick=//");
		strSource 	= strSource.replace(/onload=/gi, "onload=//");
		strSource 	= strSource.replace(/@!knhead_br!@/g, "\r\n");

		var strBottom	= '</body></html>'

		strHTML			= strHeader + strSource + strBottom;

		var objWindow	= window.open('', 'PrintWindow', 'width=670,height=600,scrollbars=yes,resizable=no,toolbar=yes');
		if(objWindow)
		{
			objWindow.document.open();
			objWindow.document.write(strHTML);
			objWindow.document.close();
		}
	}
}


// 메인 페이지 !--충북뉴스 가지고 오기 함수
function fnGetCBNewsEvent(strPrintAreaName, strMenuName)
{
	var strProgramPath		= '/main/';
	var strProgramFilename	= '_proc_main_cjnew.asp';
	var strProgramGetValue	= '';
	
	var objPrintArea		= fnGetObject(strPrintAreaName);
	
	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
		
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}

// 메인 페이지 게시판 가지고 오기 함수
function fnGetMainBoard(strPrintAreaName, strBoardId, strMenuName)
{
	var strProgramPath		= '/main/';
	var strProgramFilename	= '_proc_board_print.asp';
	var strProgramGetValue	= 'boardid='+ escape(strBoardId) +'&menuname='+ escape(strMenuName);

	var objPrintArea		= fnGetObject(strPrintAreaName);
	
	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
		
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}

// 메인 페이지 !--MBC행사안내 가지고 오기 함수
function fnGetMainEvent(strPrintAreaName, strBoardId, strMenuName)
{
	var strProgramPath		= '/main/';
	var strProgramFilename	= '_proc_event_print.asp';
	var strProgramGetValue	= 'boardid='+ escape(strBoardId) +'&menuname='+ escape(strMenuName);
	
	var objPrintArea		= fnGetObject(strPrintAreaName);
	
	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
		
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}


// 메인 페이지 설문조사 가지고 오기 함수
function fnGetMainVote(strPrintAreaName, strMenuName)
{
	var strProgramPath		= '/main/';
	var strProgramFilename	= '_proc_vote_print.asp';
	var strProgramGetValue	= 'menuname='+ escape(strMenuName);
	
	var objPrintArea		= fnGetObject(strPrintAreaName);
	
	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
		
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}


// 메인 구인 가지고 오기
function fnGetMainGuin(strPrintAreaName, strBoardId, strMenuName)
{
	var strProgramPath		= '/main/';
	var strProgramFilename	= '_proc_guin_print.asp';
	var strProgramGetValue	= 'boardid='+ escape(strBoardId) +'&menuname='+ escape(strMenuName);
	
	var objPrintArea		= fnGetObject(strPrintAreaName);
	
	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
		
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}

// 메인 구직 가지고 오기
function fnGetMainGugik(strPrintAreaName, strBoardId, strMenuName)
{
	var strProgramPath		= '/main/';
	var strProgramFilename	= '_proc_gugik_print.asp';
	var strProgramGetValue	= 'boardid='+ escape(strBoardId) +'&menuname='+ escape(strMenuName);
	
	var objPrintArea		= fnGetObject(strPrintAreaName);
	
	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
		
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}


// 여성포토에세이 메인 페이지 게시판 가지고 오기 함수
function fnGetWomenMainBoard(strPrintAreaName, strBoardId, strMenuName)
{
	var strProgramPath		= '/women_story/main/';
	var strProgramFilename	= '_proc_board_print.asp';
	var strProgramGetValue	= 'boardid='+ escape(strBoardId) +'&menuname='+ escape(strMenuName);

	var objPrintArea		= fnGetObject(strPrintAreaName);


	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
	
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}

// 여성포토에세이 메인 페이지 갤러리 게시판 가지고 오기 함수
function fnGetWomenMainGallery(strPrintAreaName, strBoardId, strMenuName)
{
	var strProgramPath		= '/women_story/main/';
	var strProgramFilename	= '_proc_gallery_print.asp';
	var strProgramGetValue	= 'boardid='+ escape(strBoardId) +'&menuname='+ escape(strMenuName);

	var objPrintArea		= fnGetObject(strPrintAreaName);


	if(objPrintArea != null)
	{
		var blsPreGetSource		= objPrintArea.getAttribute('getsource') ? objPrintArea.getAttribute('getsource') : false;
		var strPreSource		= objPrintArea.innerHTML;
	
		if(blsPreGetSource == false)
		{
			fnGetPageSource(strProgramPath, strProgramFilename +'?'+ strProgramGetValue, false, 0, 'fnPrintSource(\''+ strPrintAreaName +'\', 내용)');
			
			objPrintArea.setAttribute('getsource', true);
		}
	}
}
