﻿
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.




// ---------------------------- FS Command ObjEvent ----------------------------
function ObjEvent_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.ObjEvent : document.ObjEvent;
 	

//    alert(command);
//    alert(code);

	if (command.toLowerCase() == "goevent")
	{	    
 	    var tmp = code.split('&');
     	
 	    var type = tmp[0];
 	    var url = tmp[1];
 	    var seq = tmp[2];
		GoEventView(type, url, seq);
	}
	
}

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub ObjEvent_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call ObjEvent_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}






// ---------------------------- FS Command reviewList ----------------------------
function reviewList_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.reviewList : document.reviewList;
 	
 	switch(command)
 	{
 	
 		case "goMenu" : gGoMenu(code); break;
 		case "ProReveiw" : ProReveiw(code); break;
 		case "KnowReview" : KnowReview(code); break;
 		case "VodReview" : VodReview(code); break;    
        
 	}
}

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub reviewList_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call reviewList_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}


// ---------------------------- FS Command prdFlashList ----------------------------
function prdFlashList_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.prdFlashList : document.prdFlashList;
 	if(command=="goMenu")
	{
		// 글로벌메뉴 호출
		gGoMenu(code);
	}
	if (command == "SetModCode")
	{
		SetModCode(code);
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub prdFlashList_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call prdFlashList_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// ---------------------------- FS Command motoProduct ----------------------------
function motoProduct_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.motoProduct : document.motoProduct;

	//alert("command=" + command + "\ncode=" + code);

	switch(command.toLowerCase())
	{
		case "gomenu" : gGoMenu(code); break;
		case "setmodcode" : SetModCode(code); break;
		case "price" : gCoPrice(code); break;

		case "review" : gGoURL(code); break;
		case "download" : gGoURL(code); break;
		case "event" : gGoEvent(code); break;
		case "showroom" : gGoShowRoom(code); break;
		case "ad" : gGoURL(code); break;
		case "desktop" : gGoURL(code); break;
		case "know" : gGoURL(code); break;
		case "deco" : gGoURL(code); break;
		case "bluetooth" : gGoURL(code); break;
		case "lnprocess" : gGoLNProcess(code); break;
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub motoProduct_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call motoProduct_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}


// ---------------------------- FS Command left_navi_prt ----------------------------
function left_navi_prt_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.left_navi_prt : document.left_navi_prt;
 	if(command=="goMenu")
	{
		// 글로벌메뉴 호출
		gGoMenu(code);
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub left_navi_prt_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call left_navi_prt_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// ---------------------------- FS Command flocation ----------------------------
function flocation_DoFSCommand(command, code)
{
	var flocation_tempObj = isInternetExplorer ? document.all.flocation : document.flocation;
 	if(command=="goMenu")
	{
		// 글로벌메뉴 호출
		gGoMenu(code);
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub flocation_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call flocation_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// ---------------------------- FS Command right_navi ----------------------------
function right_navi_DoFSCommand(command, code)
{
	var right_navi_tempObj = isInternetExplorer ? document.all.right_navi : document.right_navi;

	//alert("command=" + command + "\ncode=" + code);

	switch(command.toLowerCase())
	{
		case "gomenu" : gGoMenu(code); break;
		case "gomode" : SetModInfo(code); break;

		case "review" : gGoURL(code); break;
		case "download" : gGoURL(code); break;
		case "event" : gGoEvent(code); break;
		case "showroom" : gGoShowRoom(code); break;
		case "ad" : gGoURL(code); break;
		case "desktop" : gGoURL(code); break;
		case "know" : gGoURL(code); break;
		case "deco" : gGoURL(code); break;
		case "bluetooth" : gGoURL(code); break;
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub right_navi_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call right_navi_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// ---------------------------- FS Command topNavi ----------------------------
function topNavi_DoFSCommand(command, code)
{
	var topNavi_tempObj = isInternetExplorer ? document.all.topNavi : document.topNavi;
	if (command == "mymotoOpen")
	{
		var obj = document.all[code];
		mymotoOpen(obj);
	}
 	if(command=="goMenu")
	{
		// 글로벌메뉴 호출
		gGoMenu(code);
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub topNavi_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call topNavi_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// ---------------------------- FS Command left_navi_temp ----------------------------
function left_navi_temp_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.left_navi_temp : document.left_navi_temp;
	if(command=="goMenu")
	{
		// 글로벌메뉴 호출
		gGoMenu(code);
	}
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub left_navi_temp_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call left_navi_temp_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// 전자파 흡수율보기
function gGoLNProcess(code)
{
	var url = "http://rfhealth-sar.motorola.com/SAR/sar-LNprocess.jsp?region=Asia&country=Korea&standard=IEEE-3&language=Korean";
	window.open(url, 'pop_event', 'top=0,left=0,toolbar=yes,menubar=yes,scrollbars=yes,status=0,resizable=yes')

}

// URL 이동
function gGoURL(code)
{
	window.location.href = code;
}

// 제품 이벤트
function gGoEvent(code)
{
  window.open(code, 'pop_event', 'top=0,left=0,width=700,height=600,toolbar=no,menubar=yes,status=0,resizable=0')

}

// 가격정보 이벤트
function gCoPrice(code)
{
  window.open(code, 'pop_event', 'top=0,left=0,width=700,height=600,toolbar=yes,menubar=yes,scrollbars=yes,status=0,resizable=yes')

}

// 쇼룸
function gGoShowRoom(code)
{
	switch(code.toLowerCase())
	{
		case "/product/show/shwms150.aspx": go_showroom(code); break;
		case "/product/show/shwms200.aspx": go_showroom(code); break;
		case "/product/show/shwms250.aspx": go_showroom(code); break;
		case "/product/show/shwms280.aspx": go_showroom(code); break;
		case "/product/show/shwms300.aspx": go_showroom(code); break;
		case "/product/show/shwms330.aspx": go_showroom(code); break;
		case "/product/show/shwms340.aspx": go_showroom(code); break;
		case "/product/show/shwms350.aspx": go_showroom(code); break;
		case "/product/show/shwms400.aspx": go_showroom(code); break;
		case "/product/show/shwm600.aspx": go_showroom(code); break;
		case "/product/show/shwrazr.aspx": go_showroom(code); break;
		case "/product/show/shwstartac.aspx": go_showroom(code); break;
		case "/product/show/shwstartacse.aspx": go_showroom(code); break;
		default : go_pop(code); break;
	}
}

function go_pop(code)
{
  window.open(code, 'pop_show', 'top=0,left=0,width='+(screen.availWidth-10)+',height='+(screen.availHeight-30)+',toolbar=0,status=0,resizable=0')
}

function go_showroom(code)
{
  window.open(code, 'pop_show', 'top=0,left=0,width=590,height=270,toolbar=0,status=0,resizable=0');
}


// Global GoMenu
function gGoMenu(code)
{    
    if(code == "010402" || code == "010405" || code == "010403"  || code == "010404")
    {
        alert("Coming soon\n현재 준비중 입니다.");
        return;
    }

	//alert("code:" + code);
	var xmlRequest = DoCallback("/etc/frontMenuInfo.aspx", code);
	var vals = xmlRequest.responseText;
	vals = TrimCode(vals);

	if( vals == ""){
		alert("준비중 입니다.");
	}else if( vals == "..." ){
		windowOpen("temp.html","..",750,622,"");
	}else if( vals != "" ){
		if(code == "040000"){
			mymotoOpen(myMOTO);
			//menuclick(myMOTO);
		}else if(code == "050000"){
			var id = "";
			if(getCookie("MOTO_ID") != ""){
				id = getCookie("MOTO_ID");
				motoSpace(id);
			}else{
				//alert("로그인후 이용이 가능하십니다");
				//location.href="/member/MemLogin.aspx?motoSpace=go"
				motoSpace("");
			}
            
		}else if(code == "140000"){
			//alert("안녕하세요?\n보다 안정적인 쇼핑몰 시스템 유지를 위하여\n서버 이전 작업을 다음과 같이 실시합니다.\n\n일시 : 2006년 12월7일 오후 6시 - 12월8일 오전 9시\n\n서버 이전 작업중에는 사이트 접속이 원활하지 않거나\n다소 느려질 수 있으니 이점 양해 부탁드립니다.");
			//alert ("사이트 개편과 함께 앞으로 모든 모토로라 악세사리 구매는\n모토로라 공식 지정 악세사리 총판 쇼핑몰에서 구매가 가능합니다.\n그동안 마이모토로라 shop에서 구매시 적용되었던 사항들은 모두\n동일하게 적용됩니다.");
			//alert ("악세사리 쇼핑몰 이용에 관한 안내드립니다.\n쇼핑몰 서버작업으로 인하여 3월15일(월) - 3월17일(수)까지\n쇼핑몰 이용이 가능하지 않습니다.\n3월18일(목)부터 정상적으로 운영될 예정이오니 이용에\n착오없으시길 바랍니다.\n불편을 끼쳐드려 죄송합니다.");
			//alert ("현재 서버점검중입니다.\n조속히 정상적으로 서비스 되도록 하겠습니다.");
			alert("모토로라 공식 지정 악세사리 총판 쇼핑몰로 이동합니다.");
			
			var pwin = window.open("http://www.motorolashop.co.kr");
			pwin.focus();
		}else if (code == "120000"){
			var v = String(window.location);
			var fName = v.substring(v.lastIndexOf("/") + 1,v.length);
			if (fName.toLowerCase().split("?")[0] == "memlogin.aspx")
			{
				window.location.href = "/member/MemLogin.aspx";
				return;
			}
			else
			{
				var tmpName = v.split("?")[0];
				var fName2 = tmpName.substring(tmpName.lastIndexOf("/") + 1, tmpName.length);
				if (fName2.toLowerCase() == "memlogin.aspx")
				{
					window.location.href = v;
					return;
				}
				var re = /(&)/g;
				var rs = v.replace(re, "\^");
				window.location.href = "/member/MemLogin.aspx?rturl=" + rs;
			}
			return;			
		}else if(code == "170000"){	//모토 컬처
			motoCulture();
		}else{
			location.href = vals;
		}
	}else{
		alert("link is not setting =>"+code);
	}

}


function goMenu(code){
	//alert("code:" + code);
	var xmlRequest = DoCallback("/etc/frontMenuInfo.aspx", code);
	var vals = xmlRequest.responseText;
	vals = TrimCode(vals);
	if( vals == ""){
		alert("준비중 입니다.");
	}else if( vals == "..." ){
		windowOpen("temp.html","..",750,622,"");
	}else if( vals != "" ){
	    if(code == "040000"){
			mymotoOpen(myMOTO);
	        //menuclick(myMOTO);
	    }else if(code == "050000"){
	        var id = "";
	        if(getCookie("MOTO_ID") != ""){
	            id = getCookie("MOTO_ID");
	            motoSpace(id);
	        }else{
	            //alert("로그인후 이용이 가능하십니다");
	            //location.href="/member/MemLogin.aspx?motoSpace=go"
	            motoSpace("");
	        }
            
	    }else if(code == "140000"){
	        //alert("안녕하세요?\n보다 안정적인 쇼핑몰 시스템 유지를 위하여\n서버 이전 작업을 다음과 같이 실시합니다.\n\n일시 : 2006년 12월7일 오후 6시 - 12월8일 오전 9시\n\n서버 이전 작업중에는 사이트 접속이 원활하지 않거나\n다소 느려질 수 있으니 이점 양해 부탁드립니다.");
	        alert ("사이트 개편과 함께 앞으로 모든 모토로라 악세사리 구매는\n모토로라 공식 지정 악세사리 총판 쇼핑몰에서 구매가 가능합니다.\n그동안 마이모토로라 shop에서 구매시 적용되었던 사항들은 모두\n동일하게 적용됩니다.");
	        //alert ("악세사리 쇼핑몰 이용에 관한 안내드립니다.\n쇼핑몰 서버작업으로 인하여 3월15일(월) - 3월17일(수)까지\n쇼핑몰 이용이 가능하지 않습니다.\n3월18일(목)부터 정상적으로 운영될 예정이오니 이용에\n착오없으시길 바랍니다.\n불편을 끼쳐드려 죄송합니다.");
	        //alert ("현재 서버점검중입니다.\n조속히 정상적으로 서비스 되도록 하겠습니다.");
	        var pwin = window.open("http://www.motorolashop.co.kr");
	        pwin.focus();
	    }else{
		    location.href = vals;
		}
	}else{
		alert("link is not setting =>"+code);
	}

}

//메인에서 호출
function main_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.left_navi_temp : document.left_navi_temp;
	//
	// Place your code here.
    //alert("main_DoFSCommand:"+command+","+code)
	if (command == "mymotoOpen")
	{
		//alert("AA");
		mymotoOpen(myMOTO);
	}
	if (command == "mymotoClose")
	{
		//alert("AA");
		mymotoClose(myMOTO);
	}

	if(command == "chooseStyle")
	{
	    chooseStyle(code, 60);   
	}
    
	if(command=="goMenu")
	{
        
		gGoMenu(code);

	}
	

}




if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub main_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call main_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

//메인에서 호출
function mymoto_main_DoFSCommand(command, code)
{
	var left_navi_tempObj = isInternetExplorer ? document.all.left_navi_temp : document.left_navi_temp;
	//
	// Place your code here.
    //alert("mymoto_main_DoFSCommand:"+command+","+code)
	if (command == "mymotoOpen")
	{
		//alert("bb");
		mymotoOpen(myMOTO);
	}
	if (command == "mymotoClose")
	{
		//alert("bb");
		mymotoClose(myMOTO);
	}
    
	if(command=="goMenu")
	{
		gGoMenu(code);

	}
	
	
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub mymoto_main_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call mymoto_main_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function DoCallback(url,code)
{
	var pageUrl = url + "?code=" + code + "&rtype=L";
	var xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
	
	xmlRequest.Open("POST", pageUrl, false);
	xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlRequest.Send(null);
	
	return xmlRequest;
}

/*
	Modify			2010.04.28
	writer				Media Team optimus
	Description		이벤트 - 진행중인 이벤트 링크
						MOTOENJOY 이벤트 노출에 대한 추가 페이지로 하이퍼링크 정의
*/

// 이벤트 -> 진행중인 이벤트
function goEventProgressEventView() {
	location.href="/enjoy/EnyEventMotoCardEvent.aspx";
}

// 마이페이지 -> 이벤트 -> 이벤트 링크
function goMypageEventView(type1,seq)
{
    //alert("["+type1+"],["+seq+"]");
   	//location.href="/enjoy/EnyEvent.aspx?idx="+type;
   	location.href="/enjoy/EnyEventList.aspx";
}

// 마이페이지 -> 온라인 상담 -> 제목링크
function goMypageOnlineQnaView(code)
{
    location.href="/mypage/MypOnlineQnaView.aspx?pageNo=1&code="+code;
}

// 마이페이지 -> 온라인 상담 -> 자세히 보기
function goMypageOnlineQnaList()
{
    location.href="/mypage/MypOnlineQnaList.aspx";
}

// 마이페이지 -> 마이모토 소식 -> 제목 링크
function goMypageNewsView(seq)
{
	location.href="/story/StyNoticeRead.aspx?idx="+seq;
}
// 마이페이지 -> 마이모토 소식 -> 자세히 보기
function goMypageNewsList()
{
    location.href="/story/StyNoticeList.aspx";
}

// 마이페이지 -> 마이폰정보 -> 다운로드 자세히 보기
function goMypageDownloadView(modcode,dwcode)
{
    location.href="/product/PrdDownCenter.aspx?id="+modcode;
}
// 마이페이지 -> 마이폰정보 -> 업그레이드 자세히 보기
function btnDetailUpgrade()
{
    location.href = "/product/PrdRsdMain.aspx";
}


// 마이페이지 -> 가까운a/s센터 ->  a/s 센터 전체보기
function goMypageAsCenterList()
{
    location.href="/service/SvcAsCenterList.aspx";
}
// 마이페이지 -> 가까운a/s센터 ->   회원 정보 수정
function goMypageMemberEdit()
{
    location.href="/mypage/MypInfoEdit.aspx";
}
// 마이페이지 -> 가까운a/s센터 ->   예약가능
function goMypageAsCenterReservation(dealercd)
{
    location.href = "";
}
// 마이페이지 -> 가까운a/s센터 ->  콩나물 지도 서비스
function goMypageAsCenterMapUrl(map_url)
{
    if(map_url != ""){
        var pwin = window.open("http://www.mapid.net/"+map_url);
        pwin.focus();
    }
    else{
        alert("준비중입니다.");
    }
}
// 마이페이지 -> 마이모토 윙 ->마이모토 바로가기
function goMypageMotoSpace(motoSpaceID)
{
    //alert("motoSpaceID:"+motoSpaceID);
    motoSpace(motoSpaceID);
}

// 마이페이지 -> 마이리뷰, 관심리뷰 -> 리뷰 링크
function goMypageReView(seq)
{
   	location.href="/product/PrdReviewUserRead.aspx?idx="+seq;
}


// JScript 파일
function TrimCode( value ) {
	var len = value.length;
	if (len == 0) return('');
	
	var value1 = RTrimCode(value);
	var value2 = LTrimCode(value1);	
	return(value2);
}	


//동영상 리뷰 호출
function VodReview(prdcode)
{
    alert("준비중입니다.");
    return;
    location.href = "/product/PrdReviewMovieList.aspx?prdcode="+prdcode;
}


//전문가 리뷰 호출
function ProReveiw(prdcode)
{
    location.href = "/product/PrdReviewProList.aspx?prdcode="+prdcode;
}


//사용노하우 호출
function KnowReview(prdcode)
{
    alert("준비중입니다.");
    return;
    location.href = "/product/PrdReviewKnowList.aspx?prdcode="+prdcode;
}

// String LTrim( arg )
// 		String arg 왼쪽끝의 공백 문자(blank, tap, new-line)를 제거한
//      나머지 문자열을 리턴한다.
function LTrimCode( arg ) {
	var len = arg.length;
	if (len == 0) return('');
	
	var i = 0;
	for (; i < arg.length; i++) {
		var ch = arg.charAt(i);
		if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') {
			continue;
		}	
		else
			break;
	}
	return(arg.substr(i));
}

// String RTrim( arg )
// 		String arg 오른쪽끝의 공백 문자(blank, tap, new-line)를 제거한
//      나머지 문자열을 리턴한다.
function RTrimCode( arg ) {
	var len = arg.length;
	if (len == 0) return('');
		
	var i = len - 1;
	for (; i >= 0; i--) {
		var ch = arg.charAt(i);
		if (ch == ' ' || ch == '\t' || ch == '\n') 
			continue;
		else
			break;
	}
	return(arg.substring(0, i+1));					
}



//// 제품 검색 
//function SetModCode(m_code)
//{
//	alert(m_code);
//	window.location.href = "/product/PrdInfo.aspx?id=" + m_code;
//	
//}
//	