function rollover(obj, color) {
    if(!obj) return false;
    obj.style.backgroundColor = color;
}
function openWin()
{
	location.href = '/plaza/main.asp';
}


// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function flashWrite(url,w,h,vars,bg,win,id){
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';


	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="			   swLiveConnect='true'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}
//==================ÇÁ¶óÀÚ ÇÃ·¡½Ã ¸µÅ© ========================
function flashlink(idx)
{
	
	//alert(idx);
	if(idx=='g1')
	{
		//location.href = 'http://www.scooterrace.co.kr/race/RNotice2_list.asp';
		location.href = 'http://www.scooterrace.co.kr/race/RNotice_new_list.asp';
		//alert('g1');
	}
	if(idx=='g11')
	{
		//location.href = 'http://www.scooterrace.co.kr/race/RNotice2_list.asp';
		location.href = 'http://www.scooterrace.co.kr/race/RNotice_new_list.asp';
		//alert('g1');
	}
	if(idx=='g12')
	{
		location.href = 'http://www.scooterrace.co.kr/race/RNotice2_list.asp';
		//location.href = 'http://www.scooterrace.co.kr/race/RNotice_new_list.asp';
		//alert('g1');
	}
	if(idx=='g2')
	{
		location.href = 'http://www.scooterrace.co.kr/support/helpdesk.asp';
		//alert('g2');
	}
	if(idx=='g21')
	{
		location.href = 'http://www.scooterrace.co.kr/support/helpdesk.asp';
		//alert('g21');
	}
	if(idx=='g22')
	{
		location.href = 'http://www.scooterrace.co.kr/support/registerinfo_2wheels.asp';
		//alert('g22');
	}
	if(idx=='g23')
	{
		location.href = 'http://www.scooterrace.co.kr/support/registerinfo_race.asp';
		//alert('g23');
	}
	if(idx=='g3')
	{
		location.href = 'http://www.scooterrace.co.kr/support/registerinfo_race.asp';
		//alert('g3');
	}
	
	if(idx=='p11')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=q2';
	}

	if(idx=='p110')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=couple';
	}
	
	if(idx=='p12')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=B-bone';
	}	
	if(idx=='p13')
	{
		
		//¸ÞÀÎÀ¸·Î °¡±â
		//location.href = '/product/product.asp?mn=Bonita';
		location.href = '/product/product.asp?mn=couple';
	}	
	if(idx=='p14')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=besbi';
	}	
	if(idx=='p15')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=besbi_classic';
	}	
	if(idx=='p16')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=Freewing125';
	}
	if(idx=='p17')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=VJF-i';
	}
	if(idx=='p18')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=vjf250';
	}
	if(idx=='p19')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/product.asp?mn=eddy';
	}



	if(idx=='p21')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/plaza.asp';
	}
	if(idx=='p22')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/agency.asp';
	}
	
	if(idx=='p222')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/agency.asp';
	}	
	if(idx=='p223')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/store.asp';
	}			
	
	if(idx=='p23')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/as.asp';
	}		
	if(idx=='p231')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/repair.asp';
	}	
	if(idx=='p232')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/as.asp';
	}	
			
	if(idx=='p31')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/cafeInfo.asp';
	}	
	if(idx=='p32')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/product/myscooter_list.asp';
	}	
	if(idx=='p33')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/myscooter_list.asp';
	}	
	if(idx=='p34')
	{
		//µå·¹½º¾÷À¸·Î °¡±â
		location.href = '/product/dressup_write.asp';
	}	
	if(idx=='p41')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/default.asp';
	}	
	if(idx=='p001')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/plaza/main.asp';
	}	
	if(idx=='p51')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/default.asp';
	}	
//=============ÇÁ¶óÀÚ ÇÃ·¡½Ã ¸µÅ© ³¡=============================

	//======================================================================================
	//»ó´Ü ³×ºñ°ÔÀÌ¼Ç

	//======================================================================================
	//³×ºñ°ÔÀÌ¼Ç ¸µÅ©

	//=================================HOME==================================================================================
	if(idx=='001')
	{
		//¸ÞÀÎÀ¸·Î °¡±â
		location.href = '/default.asp';
		
	}
	//¼­ºê ¸Þ´º¿Í ³Ñ¹ö¸µ °°À½.1DEpthÀÇ Ã¹¹øÂ° ¸Þ´º 1~5¹ø±îÁö ¼­ºê ¹öÆ° ¸µÅ©´Â 1depth¿¡ ¹øÈ£¿¡ ¸ÂÃß¾î¼­ Ãß°¡ ÀûÀ¸·Î ³Ñ¹ö¸µÀ» ÀâÀ½
	//(ex idx=='11' 1<--- 1µª½º ¸Þ´º ¹øÈ£ 1<--- 2µª½º ¸Þ´º ¹øÈ£.) ÀÌ¸ç, ¿ÞÂÊ ¸Þ´º´Â »ó´Ü ¸Þ´º¿Í Áßº¹ÀÓ.
	//Ä«Å×°í¸® 1 - ½ºÄíÅÍ·¹ÀÌ½º¶õ==============================================================

	if(idx=='12')
	{
		//KSRC ¿µ»ó
		location.href = '/race/RSMovie_list.asp';
		
	}
	if(idx=='13')
	{
		//Æ÷Åä Á¸ 
		location.href = '/race/RSPhoto_list.asp';
	}
	if(idx=='11')
	{
		//½ºÄíÅÍ ·¹ÀÌ½º¶õ
		location.href = '/race/about.asp';
	}
	if(idx=='15')
	{
		//ÆÀ ¹× ¼±¼ö ÇÁ·ÎÇÊ
		location.href = '/race/team_pro.asp';
		
	}
	if(idx=='16')
	{
		//°øÁö »çÇ×
		location.href = '/race/RNotice_list.asp';
		
	}
	if(idx=='14')
	{
		//·¹ÀÌ½Ì°É
		location.href = '/racing_girl_2011/race_girl_list.asp';
		
	}
	if(idx=='17')
	{
		//KSRC°Ô½ÃÆÇ
		location.href = '/race/TalkBox_list.asp';
		
	}
	//=================================Ä«Å×°í¸® 1 - ½ºÄíÅÍ·¹ÀÌ½º¶õ ³¡==================
		
	//=================================Ä«Å×°í¸® 2 - ¸ðÅä½ºÄð============================

	if(idx=='21')
	{
		//¸ðÅä½ºÄðÀÌ¶õ
		//location.href = '/motorschool/moto_schedule2.asp';
		location.href = '/motorschool/motorschool.asp';
	}
	if(idx=='22')
	{
		//¿µ»óÃ¼Çè
		location.href = '/motorschool/Movexpri_list.asp';
		
	}
	if(idx=='23')
	{
		//¸ðÅä½ºÄð Ã¼Çè±â
		location.href = '/motorschool/Mexpri_list.asp';
		
	}
	//=================================Ä«Å×°í¸® 2 - ¸ðÅä½ºÄð ¸µÅ© ³¡ ================

	//=================================Ä«Å×°í¸® 3 - ¿ùµå ·¹ÀÌ½º======================

	if(idx=='31')
	{
		//ÇØ¿Ü ·¹ÀÌ½º ¿µ»ó
		location.href = '/race/RAMovie_list.asp';
	}
	if(idx=='32')
	{
		//HTONEWS
		location.href = '/race/RAPhoto_list.asp';
	}
	//=================================¿ùµå·¹ÀÌ½º ³¡=================================

	//=================================Ä«Å×°í¸® 4 - Å¬·´¸ðÅä=========================
	if(idx=='41')
	{
		//ÇÁ¸®¹Ì¾ö UCC
		location.href = '/community/CMyUCC_list.asp';
	}
	
	if(idx=='42')
	{
		//³»°¡ ¸¸µç UCC
		location.href = '/community/pri_ucc.asp';
	}
	if(idx=='43')
	{
		//Æ÷Åä ±¤Àå
		location.href = '/community/CPhoto_list.asp';
		
	}
	if(idx=='44')
	{
		//Åõ¾îÄÚ½º ¾È³»
		location.href = '/community/CTourCourse_list.asp';
		
	}
	if(idx=='45')
	{
		//Ä¿¹Â´ÏÄÉÀÌ¼Ç
		location.href = '/community/TalkBox_list.asp';
		
	}
    //=================================Ä«Å×°í¸® 4 - Å¬·´¸ðÅä ³¡=========================
	
	
	//=================================Ä«Å×°í¸® 5 -½ºÇÇµå ÇÁ¶óÀÚ ¸µÅ©=================================
   if(idx=='51')
	{
		//½ºÇÇÆ® ÇÁ¶óÀÚ ¹Ù·Î °¡±â
		location.href = '/plaza/main.asp';
		//alert("ÁØºñÁßÀÔ´Ï´Ù.");
	}

	//======================================================================================
	
	//±Û·Î¹ú ¸É¹ö½± ÆäÀÌÁö

	//======================================================================================


	//¸É¹ö
	if(idx=='navimember1')
	{
		//·Î±×ÀÎ
		location.href = '/membership/login.asp';
	}
	if(idx=='navimember2')
	{
		//¾ÆÀÌµðÃ£±â
		location.href = '/membership/id_search.asp';
	}
	if(idx=='navimember3')
	{
		//ºñ¹Ð¹øÈ£Ã£±â
		location.href = '/membership/password_search.asp';
	}
	if(idx=='navimember4')
	{
		//È¸¿ø°¡ÀÔ
		location.href = '/membership/join.asp';
	}
	if(idx=='navimember5')
	{
		//°³ÀÎÁ¤º¸¼öÁ¤
		location.href = '/membership/UpdateMember.asp';
	}
	if(idx=='navimember6')
	{
		//È¸¿øÅ»Åð
		location.href = '/membership/member_out.asp';
	}

}
/*
'ÇÁ·Î¸ð¼Ç ½ºÅ©¸³Æ®'
' ------------------------------------------------------------------
' Function : fc_chk_byte(aro_name)
' Description : ÀÔ·ÂÇÑ ±ÛÀÚ¼ö¸¦ Ã¼Å©
' Argument : Object Name(±ÛÀÚ¼ö¸¦ Á¦ÇÑÇÒ ÄÁÆ®·Ñ)
' Return : 
' ------------------------------------------------------------------
*/
function fc_chk_byte(aro_name,ari_max)
{
	var ls_str = aro_name.value; // ÀÌº¥Æ®°¡ ÀÏ¾î³­ ÄÁÆ®·ÑÀÇ value °ª
	var li_str_len = ls_str.length; // ÀüÃ¼±æÀÌ

	// º¯¼öÃÊ±âÈ­
	var li_max = ari_max; // Á¦ÇÑÇÒ ±ÛÀÚ¼ö Å©±â
	var i = 0; // for¹®¿¡ »ç¿ë
	var li_byte = 0; // ÇÑ±ÛÀÏ°æ¿ì´Â 2 ±×¹Ü¿¡´Â 1À» ´õÇÔ
	var li_len = 0; // substringÇÏ±â À§ÇØ¼­ »ç¿ë
	var ls_one_char = ""; // ÇÑ±ÛÀÚ¾¿ °Ë»çÇÑ´Ù
	var ls_str2 = ""; // ±ÛÀÚ¼ö¸¦ ÃÊ°úÇÏ¸é Á¦ÇÑÇÒ¼ö ±ÛÀÚÀü±îÁö¸¸ º¸¿©ÁØ´Ù.

	for(i=0; i< li_str_len; i++)
	{
		// ÇÑ±ÛÀÚÃßÃâ
		ls_one_char = ls_str.charAt(i);

		// ÇÑ±ÛÀÌ¸é 2¸¦ ´õÇÑ´Ù.
		if (escape(ls_one_char).length > 4)
		{
			li_byte += 2;
		}
		// ±×¹ÜÀÇ °æ¿ì´Â 1À» ´õÇÑ´Ù.
		else
		{
			li_byte++;
		}

		// ÀüÃ¼ Å©±â°¡ li_max¸¦ ³ÑÁö¾ÊÀ¸¸é
		if(li_byte <= li_max)
		{
			li_len = i + 1;
		}
	}

	// ÀüÃ¼±æÀÌ¸¦ ÃÊ°úÇÏ¸é
	if(li_byte > li_max)
	{
		alert( li_max/2 + " ±ÛÀÚ¸¦ ÃÊ°ú ÀÔ·ÂÇÒ¼ö ¾ø½À´Ï´Ù. \n ÃÊ°úµÈ ³»¿ëÀº ÀÚµ¿À¸·Î »èÁ¦ µË´Ï´Ù. ");
		ls_str2 = ls_str.substr(0, li_len);
		aro_name.value = ls_str2;
	}
	aro_name.focus(); 
}

/*
' ------------------------------------------------------------------
' Function : fc_chk2()
' Description : EnterÅ°¸¦ ¸øÄ¡°ÔÇÑ´Ù.
' Argument : 
' Return : 
' ------------------------------------------------------------------
*/
function fc_chk2()
{
	if(event.keyCode == 13)
		event.returnValue=false;
}

function WriteObject(str)
{
	document.write(str);
}

function checkPass(pw){
	var alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	var number = "1234567890";
	var sChar = "-_=+\|()*&^%$#@!~`?></;,.:'";
	
	var sChar_Count = 0;
	var number_Count = 0;
	var alpha_Count = 0;

	var alphaCheck = false;
	var numberCheck = false;
	
	//var pw = document.frm.te.value;
	
	if(8 <= pw.length || pw.length <= 12){
		for(var i=0; i<pw.length; i++){
			if(sChar.indexOf(pw.charAt(i)) != -1){
				sChar_Count++;
			}
			if(number.indexOf(pw.charAt(i)) != -1){
				number_Count++;
			}
			if(alpha.indexOf(pw.charAt(i)) != -1){
				alpha_Count++;
			}

			//if(alpha.indexOf(pw.charAt(i)) != -1){
			//	alphaCheck = true;
			//}
			//if(number.indexOf(pw.charAt(i)) != -1){
			//	numberCheck = true;
			//}

		}
		
		//if(sChar_Count < 2 || alphaCheck != true || numberCheck != true)
		if(number_Count < 2 || alpha_Count < 2){ //sChar_Count < 2 || 
			//document.frm.te.value="";
			//document.frm.te.focus();
			alert("ºñ¹Ð¹øÈ£´Â 8~12ÀÚ ¿µ¹®,¼ýÀÚ °¢ 2ÀÚ ÀÌ»óÀ¸·Î Á¶ÇÕÇØÁÖ¼¼¿ä");
			return "no";
		}//if

		return "ok";
		
	}else{
		//document.frm.te.value="";
		//document.frm.te.focus();
		alert("ºñ¹Ð¹øÈ£´Â 8~12ÀÚ ¿µ¹®,¼ýÀÚ °¢ 2ÀÚ ÀÌ»óÀ¸·Î Á¶ÇÕÇØÁÖ¼¼¿ä");
		return "no";
	}//else
}

