function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function FlashInsert(FlashIDName, FlashFileName, FlashWidth, FlashHeight, DNSSetting, WMODESetting, FlashBGColor, QSetting, FlashAlign)
{
	document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('CODEBASE="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" ');
	document.write(' id="'+FlashIDName+'" width="' + FlashWidth + '" height="' + FlashHeight + '" ALIGN="'+FlashAlign+'">');
	document.write('<PARAM NAME="movie" VALUE="'+ FlashFileName +'">');
	document.write('<PARAM NAME="quality" VALUE="'+QSetting+'">');
	document.write('<PARAM NAME="bgcolor" VALUE="'+FlashBGColor+'">');
	document.write('<PARAM NAME="wmode" VALUE="'+WMODESetting+'">');
	document.write('<PARAM NAME="allowScriptAccess" VALUE="'+DNSSetting+'">');
	document.write('<EMBED swLiveConnect=true SRC="'+ FlashFileName +'"  NAME="'+FlashIDName+'"');
	document.write(' WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" QUALITY="'+QSetting+'" BGCOLOR="'+FlashBGColor+'"');
	document.write(' ALLOWSCRIPTACCESS="'+DNSSetting+'" ALIGN="'+FlashAlign+'" WMODE="'+WMODESetting+'" TYPE="application/x-shockwave-flash" ');
	document.write(' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" >');
	document.write('</EMBED>');
	document.write('</OBJECT>');
}

function homego(){
	document.location = "/index.html"; //home
}

function reservation(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "/reservation/reservation.html"; //¿¹¾à
		break;
		case 2:
			document.location = "/customer/reservation_list.html"; //¿¹¾àÈ®ÀÎ/Ãë¼Ò
		break;
		case 3:
			document.location = "/reservation/feeguide.html"; //ÀÌ¿ë¿ä±Ý¾È³»
		break;
		case 41:
			document.location = "/reservation/customer_process.html"; //°í°´Áö¿ø> ¿¹¾àÁøÇà¾È³»
		break;
		case 42:
			document.location = "/reservation/customer_pay.html"; //°áÁ¦¾È³»
		break;
		case 43:
			document.location = "/reservation/customer_cancel.html"; //¿¹¾à/Ãë¼Ò º¯°æ¾È³»
		break;
		case 5:
			document.location = "/reservation/faq.html"; //ÀÚÁÖ¹¯´ÂÁú¹®
		break;
		case 6:
			document.location = "/reservation/list.html?code=cNotice"; //Ä¿¹Â´ÏÆ¼
		break;
	}
}

function yachton(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "/yachton/introduce.html"; //YACHTON
		break;
		case 2:
			document.location = "/yachton/membersystem.html"; //¿äÆ®¿Â È¸¿ø½Ã½ºÅÛ
		break;
		case 3:
			document.location = "/yachton/heighvalue.html"; //ÃÖ°íÀÇ °¡Ä¡
		break;
		case 4:
			document.location = "/yachton/price.html"; //ÇÕ¸®ÀûÀÎ °¡°Ý
		break;
		case 5:
			document.location = "/yachton/service.html"; //Â÷º°È­µÈ ¼­ºñ½º
		break;
	}
}

function guide(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "/guide/introduce.html"; //¿äÆ®¼Ò°³
		break;
		case 21:
			document.location = "/guide/guide_platinum.html"; //ÀÌ¿ë¾È³»>ÀÏ¹Ý
		break;
		case 22:
			document.location = "/guide/guide_business.html"; //ÇÃ·¡Æ¼³Ñ
		break;
		case 3:
			document.location = "/guide/option.html"; //¿É¼Ç&ºÎ´ë½Ã¼³
		break;
		case 4:
			document.location = "/guide/trip.html"; //ÁÖº¯°ü±¤Áö
		break;
		case 5:
			document.location = "/guide/caution.html"; //°í°´À¯ÀÇ»çÇ×
		break;
	}
}

function events(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "/events/list.html?code=eNotice"; //°øÁö»çÇ×
		break;
		case 2:
			document.location = "/events/list.html?code=event"; //ÀÌº¥Æ®
		break;
		case 3:
			document.location = "/events/list.html?code=package"; //ÆÐÅ°Áö
		break;
		case 4:
			document.location = "/events/list.html?code=discount"; //ÇÒÀÎ¾È³» 
		break;
		case 5:
			document.location = "/events/list.html?code=festival"; //ÃàÁ¦&Çà»ç
		break;
	}
}

function membership(arg){
	mNum = arg;
	switch(arg){
		case 11:
			document.location = "/membership/guide_platinum.html"; //ºÐ¾ç¾È³»>ÇÃ·¡Æ¼³Ñ
		break;
		case 12:
			document.location = "/membership/guide_business.html"; //ºñÁî´Ï½º
		break;
		case 21:
			document.location = "/membership/compare_others.html"; //ºñ±³¿ìÀ§ ¿äÆ®¿Â>±¹³»¿äÆ®°æÀï»ç ºñ±³ 
		break;
		case 22:
			document.location = "/membership/compare_membership.html"; //±¹³»¿äÆ®È¸¿ø±Ç ºñ±³ 
		break;
		case 23:
			document.location = "/membership/compare_fishing.html"; //¹è³¬½Ã ºñ±³
		break;
		case 3:
			document.location = "/membership/consulting.html"; //»ó´ã½ÅÃ»
		break;
		case 4:
			document.location = "/membership/rule.html"; //¾à°ü&±ÔÁ¤
		break;
		case 5:
			document.location = "/membership/callcenter.html"; //ÄÝ¼¾ÅÍ¾È³»
		break;
	}
}

function service(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "/service/yachtlease_process.html"; //¿äÆ®¸®½º
		break;
		case 2:
			document.location = "/service/usedvoat_list.html"; //Áß°í¿äÆ®¸Å¸Å
		break;
		case 3:
			document.location = "/service/list.html?code=parts"; //¿äÆ®ºÎÇ°¸Å¸Å
		break;
		case 4:
			document.location = "/service/management_manage.html"; //¿äÆ®À¯Áö/º¸¼ö
		break;
		case 5:
			document.location = "/service/partner.html"; //Á¦ÈÞ¼­ºñ½º
		break;
	}
}

function customer(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "/customer/myyachton.html"; //¸¶ÀÌ¿äÆ®¿Â
		break;
		case 11:
			document.location = "/customer/reservation_list.html"; //¿¹¾àÈ®ÀÎ/Ãë¼Ò
		break;
		case 12:
			document.location = "/customer/userlist.html"; //ÀÌ¿ë³»¿ªÁ¶È¸
		break;
		case 13:
			document.location = "/customer/memberinfo.html"; //È¸¿ø±Ç Á¤º¸
		break;
		case 14:
			document.location = "/customer/reservation_rule.html"; //¿¹¾à/À§¾à ±ÔÁ¤
		break;
		case 15:
			document.location = "/customer/list.html?code=memEvent"; //È¸¿ø¿ì´ë ÀÌº¥Æ®
		break;
		case 21:
			document.location = "/customer/myinfo.html"; //È¸¿øÁ¤º¸¼öÁ¤
		break;
		case 22:
			document.location = "/customer/member_out.html"; //È¸¿øÅ»Åð
		break;
	}
}

function company(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "http://www.neointernational.co.kr/01_greeting.html"; // ÀÎ»ç¸»
		break;
		case 2:
			document.location = "http://www.neointernational.co.kr/01_vision.html"; //ºñÀü
		break;
		case 3:
			document.location = "http://www.neointernational.co.kr/01_history.html"; //¿¬Çõ
		break;
		case 4:
			document.location = "http://www.neointernational.co.kr/02_business3.html"; //»ç¾÷¼Ò°³
		break;
		case 5:
			document.location = "http://www.neointernational.co.kr/board/list.html?code=press"; //º¸µµÀÚ·á
		break;
		case 6:
			document.location = "http://www.neointernational.co.kr/board/04_recruit.html"; //Ã¤¿ë¾È³»
		break;
		case 7:
			document.location = "http://www.neointernational.co.kr/05_map.html"; //Ã£¾Æ¿À½Ã´Â±æ
		break;
		case 8:
			document.location = "http://www.neointernational.co.kr/06_partner.html"; //Á¦ÈÞ¹®ÀÇ
		break;
	}
}

function company_backup(arg){
	mNum = arg;
	switch(arg){
		case 1:
			document.location = "/company/greeting.html"; // ÀÎ»ç¸»
		break;
		case 2:
			document.location = "/company/vision.html"; //ºñÀü
		break;
		case 3:
			document.location = "/company/history.html"; //¿¬Çõ
		break;
		case 4:
			document.location = "/company/business.html"; //»ç¾÷¼Ò°³
		break;
		case 5:
			document.location = "/company/list.html?code=press"; //º¸µµÀÚ·á
		break;
		case 6:
			document.location = "/company/recruit.html"; //Ã¤¿ë¾È³»
		break;
		case 7:
			document.location = "/company/map.html"; //Ã£¾Æ¿À½Ã´Â±æ
		break;
		case 8:
			document.location = "/company/partner.html"; //Á¦ÈÞ¹®ÀÇ
		break;
	}
}

function nbtn1(){
	nimg1.src='/images/main/tab1_on.gif';
	nimg2.src='/images/main/tab2.gif';
	nimg3.src='/images/main/tab3.gif';
	n1.style.display='';
	n2.style.display='none';
	n3.style.display='none';
}
function nbtn2(){
	nimg1.src='/images/main/tab1.gif';
	nimg2.src='/images/main/tab2_on.gif';
	nimg3.src='/images/main/tab3.gif';
	n1.style.display='none';
	n2.style.display='';
	n3.style.display='none';
}
function nbtn3(){
	nimg1.src='/images/main/tab1.gif';
	nimg2.src='/images/main/tab2.gif';
	nimg3.src='/images/main/tab3_on.gif';
	n1.style.display='none';
	n2.style.display='none';
	n3.style.display='';
}

function goTop() {
	if (self.pageYOffset) {
		self.pageYOffset = 0;
	} else if (document.documentElement && document.documentElement.scrollTop){     // Explorer 6 Strict
		document.documentElement.scrollTop = 0;
	} else if (document.body) {// all other Explorers
		document.body.scrollTop = 0;
	}
}

function popWin(url,name,w,h,res,scr)
{
	wd = window.open(url,name,"top=50,left=50,width="+w+",height="+h+",resizable="+res+",scrollbars="+scr);
	wd.focus();
}
function getPageScroll(direct) {
	var yScroll;
	if (self.pageYOffset) {
		yScroll = (direct) ? self.pageYOffset : self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){     // Explorer 6 Strict
		yScroll = (direct) ? document.documentElement.scrollTop : document.documentElement.scrollLeft;
	} else if (document.body) {// all other Explorers
		yScroll = (direct) ? document.body.scrollTop : document.body.scrollLeft;
	}
	return yScroll;
}
function JS_viewObj(objhtml) {
	document.write(objhtml);
}
function select_que_all() {
	var i, n;
	var l = document.getElementsByName('chk[]');

	if(document.getElementById("toggle_checked_status").checked) n = 1 ;
	else n = 2 ;

	for (i = 0; i < l.length; i++) {
		if (n == 1) l[i].checked = true;
		if (n == 2) l[i].checked = false;
	}
}
function chk_check() {
	var i;
	var l = document.getElementsByName('chk[]');
	var que = '';

	for (i = 0; i < l.length; i++) {
		if (l[i].checked == true && l[i].disabled == false) {
			que += l[i].value + ';';
		}
	}
	return que;
}

function SetComma(numstr)
{
    numstr = String(numstr);
    var re0 = /^(-?\d+)(\d{3})($|\..*$)/;
    if (re0.test(numstr))
        return numstr.replace(re0,
            function(str,p1,p2,p3) {
                return SetComma(p1) + ',' + p2 + p3;
            }
        );
    else
        return numstr;
}
// ¹®ÀÚ¸¦ ¼ýÀÚ·Î Á¤¸®ÇÑ´Ù.
function DelComma(numstr) {
    numstr = String(numstr);
    if (numstr == '') return '0';
    else if (numstr == '-') return '0';
    else if (numstr == '0-') return '-0';
    numstr = numstr.replace(/[^\d\.-]/g,'');
    numstr = String(numstr.match(/^-?\d*\.?\d*/));
    numstr = numstr.replace(/^(-?)(\d*)(.*)/,
        function(str,p1,p2,p3) {
            p2 = (p2>0) ? String(p2.match(/[1-9]\d*$/)) : '0';
        //    p2 = (p2>0) ? String(parseInt(p2,10)) : '0';
            return p1 + p2 + p3;
        }
    );
    return numstr;
}

