function getBoardMode( Mode, IDX, TempIDX, intNowPage, CurLevel, CurUnit, CurPage, PathInfo) {
	var objFrm = document.searchFrm;
	objFrm.Mode.value = Mode;
	if ( typeof(IDX) != 'undefined' && IDX != '' ) objFrm.IDX.value = IDX;
	if ( typeof(TempIDX) != 'undefined' && TempIDX != '' ) objFrm.TempIDX.value = TempIDX;
	//if ( typeof(CATE_IDX) != 'undefined' && CATE_IDX != '' ) objFrm.CATE_IDX.value = CurLevel;
	if ( typeof(intNowPage) != 'undefined' && intNowPage != '' ) objFrm.intNowPage.value = intNowPage;
	if ( typeof(CurLevel) != 'undefined' && CurLevel != '' ) objFrm.CurLevel.value = CurLevel;
	if ( typeof(CurUnit) != 'undefined' && CurUnit != '' ) objFrm.CurUnit.value = CurUnit;
	if ( typeof(CurPage) != 'undefined' && CurPage != '' ) objFrm.CurPage.value = CurPage;
	if ( Mode == 'Delete' ){
		objFrm.action = "/Mall/Board/BoardDeleteProcess.asp";
	} else {
		//if ( typeof(PathInfo) != 'undefined' && PathInfo != '' )	objFrm.action = "/Mall/"+PathInfo+"/"+PathInfo+".asp";
		//if ( typeof(PathInfo) != 'undefined' && PathInfo != '' ) objFrm.action = "/Mall/CustomerCenter/CustomerCenter.asp";
	}
	objFrm.submit();
}

function getBoardFile(FileName) {
	//var popdown = window.open('/BBS/BBSDownLoad.asp?finfo='+ FileName +'&fname='+ FileName,'popdown','height=10,left=0,scrollbars=0,top=10, width=10')
	//top.hidBottom.document.location.href = '/BBS/BBSDownLoad.asp?finfo='+ FileName +'&fname='+ FileName;
	document.location.href = '/DownLoads/'+ FileName;
	//popdown.close();
}

function delBoardFile(bbs_idx, idx){
	//--top.hidBottom.document.location.href = '/Mall/Board/BoarddelFile.asp?bbs_idx='+ bbs_idx +'&idx='+ idx;
	document.location.href = '/Mall/Board/BoarddelFile.asp?bbs_idx='+ bbs_idx +'&idx='+ idx;
}

function searchBoard() {
	var a = document.searchFrm;
	if ( a.SearchValue.value == '' ) {
		a.SearchCate[1].checked = true;
		alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä');
		return false;
	}
	b=0;
	for(i=0; i<3; i++)
	{
		 if(a.SearchCate[i].checked == true)
			{
					b++;
			}
	}
	if ( b == 0 ) {
		alert('°Ë»öºÐ·ù¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä');
		return false;
	}
	a.intNowPage.value = "1";
	a.submit();
}


function setChangeCate(strTarName,nowCate,bbs_idx){
	var objS = eval("document.all."+strTarName);
	var intCate = objS.options[objS.options.selectedIndex].value;
	//top.hidBottom.document.location.href = '/Mall/Board/BoardchangeCate.asp?bbs_idx='+ bbs_idx +'&nowCate='+ nowCate +'&chgCate='+ intCate;
	document.location.href= '/Mall/Board/BoardchangeCate.asp?bbs_idx='+ bbs_idx +'&nowCate='+ nowCate +'&chgCate='+ intCate;
}

function removeTitle() {
	if ( document.commentFrm.comment.value == '·Î±×ÀÎÀ» ÇÏ½Ã¸é ±ÛÀ» ³²±â½Ç ¼ö ÀÖ½À´Ï´Ù.' ) {
		document.commentFrm.comment.value = '';
	}
}

function DeleteComment(intCommIDX,PathInfo){
	document.location.href = "/Mall/Board/BoardDeleteProcess.asp?idx="+ intCommIDX +"&mode=delComm&PathInfo="+ PathInfo;
}

function comment_submit() {
	if ( document.commentFrm.comment.value == '') {
		alert('²¿¸®±Û ³»¿ëÀ» ±âÀÔÇØÁÖ¼¼¿ä');
		return false;
	}
}

function GoodsComment_submit() {
	if ( document.commentFrm.Contents.value == '') {
		alert('»ç¿ë¼ö±â ³»¿ëÀ» ±âÀÔÇØÁÖ¼¼¿ä');
		return false;
	}
}

function GoodsReComment_submit(val) {
	var objFrm = eval(document.getElementById("recommentFrm"+val));
	var objName = document.getElementById("recomment"+val);
	var valContents = objName.value;
	if ( valContents == '') {
		alert('´ä±Û ³»¿ëÀ» ±âÀÔÇØÁÖ¼¼¿ä');
		objName.focus();
		return false;
	}
	objFrm.contents.value = valContents;
}


function writeCheck() {
	var subject = document.writeFrm.subject.value;
	var contents = document.writeFrm.contents.value;

	String.prototype.trim = function() {
   	return this.replace(/(^\s*)|(\s*$)/g, "");
	}

	if (subject.trim().length == 0)
	{
		alert("Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.writeFrm.subject.focus();
		return false;
	}

	if (contents.trim().length == 0)
	{
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		document.writeFrm.contents.focus();
		return false;
	}
	return true;
}

function MBoardSearch(CATE_IDX){
	if ( parseInt(CATE_IDX)  == 1 ){
		document.location.href ="/Mall/EventZone/EventZone.asp?CATE_IDX="+ CATE_IDX +"&mode=List";
	}else{
		document.location.href ="/Mall/CustomerCenter/CustomerCenter.asp?CATE_IDX="+ CATE_IDX +"&mode=List";
	}
}

function topMenuLink(ItCode){
	if(ItCode != "event"){
		document.location.href = strHost + "/Mall/Goods/Goods.asp?UpperCatCode=" + ItCode;
	}else{
		document.location.href = strHost + "/Mall/Goods/GoodsEvent.asp?UpperCatCode=" + ItCode;
	}
}

var winX, winY
function screenCenter(objX, objY){
	if (parseInt(navigator.appVersion) >= 4) {
		winX = ((screen.availWidth*.5)-(objX*.5));
		winY = ((screen.availHeight*.5)-(objY*.5));
	}
}

function viewBookimg(intGroupCode, intLevel, intUnut){
	if ( intGroupCode != "" ){
		popupwinX = "1000";
		popupwinY = "700";
		screenCenter(Number(popupwinX),Number(popupwinY));
		var opop = window.open("/Mall/PreViewBook/PreViewBook_1.asp?GCode="+ intGroupCode+ "&Level="+ intLevel+ "&Unit="+ intUnut,"", "width="+ popupwinX +",height="+ popupwinY +",scrollbars=no,resizable=no,left=" + winX + ",top=" + winY);
		opop.focus();
	}
}

function goMyStepTest(){
	screenCenter(582, 700);
	var opop = window.open('/Mall/Popup/MyStudyStep.asp','','resizable=no,scrollbars=yes,width=582,height=700,left=' + winX + ',top=' + winY);
	opop.focus();
}

function SongJSPlayID(strURL, strID){
	//document.write( '<embed src="'+ strURL +'" width="'+strwidth+'" height="'+strheight+'" loop="false"  showstatusbar="1"  menu="true" style="filter: gray()"></embed>' );
	document.write("<OBJECT classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' id='"+strID+"' name='"+strID+"' CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' type='application/x-oleobject' standby='Loading Microsoft Media Player components...' width=0 height=0 style='display:none'>\r");
	document.write("<param name='AutoStart' value='false'>\r");
	document.write("<param name='hidden' value='ture'>\r");
	document.write("<param name='TransparentAtStart' value='false'>\r");
	document.write("<param name='ShowControls' value='0'>\r");
	document.write("<param name='ShowDisplay' value='0'>\r");
	document.write("<param name='ShowStatusBar' value='0'>\r");
	document.write("<param name='AutoSize' value='0'>\r");
	document.write("<param name='AnimationAtStart' value='false'>\r");
	document.write("<param name='FileName' value='"+strURL+"'>\r");
	document.write("</object>");

}



var settCheckbox = function(val1, val2){
	//document.frmGoods.chkGoods[val1].checked = false;
	//document.frmGoods.GoodsInfo[val1].value = "";
	if(document.frmGoods.selStyleNo[val1].value == ""){
		document.frmGoods.chkGoods[val1].checked = false;
		document.frmGoods.GoodsInfo[val1].value = "";
	}else{
		document.frmGoods.GoodsInfo[val1].value = val2;
	}
}

var checkValueSett = function(val1, val2){
	//alert(val1 + " " +val2)
	if(typeof(val2) == 'undefined' || val2 == ''){
		alert("Æ¼¼ÅÃ÷ »çÀÌÁî¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.");
		document.frmGoods.selStyleNo[val1].focus();
	}else{
		document.frmGoods.GoodsInfo[val1].value = val2;
	}
}


var settCheckbox2 = function(obj){
	V(obj).parent().parent().find('input[name=GoodsInfo]').val(V(obj).val());
	//alert(V(obj).parent().parent().find('input[name=GoodsInfo]').val());
}

var checkValueSett2 = function(obj){
	var val1 = V(obj).parent().parent().find('select[name=selStyleNo]').val();
	if(val1 == undefined || val1 == ''){
		alert("ÀÎÆ÷¹êµå¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.");
	}else{
		V(obj).parent().parent().find('input[name=GoodsInfo]').val(val1);
	}

}


