function fs_cyworld_Go(){
	window.open('http://town.cyworld.nate.com/bud', 'Cyworld');
}

function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}


//È­¸é Á¤Áß¾Ó¿¡ ¶ç¿ì´Â ÆË¾÷ ½ºÅ©¸³Æ®
function openwindow (url,wtitle,xsize,ysize){

	var x,y, windowsize;
	x = Math.round ((screen.width - xsize)/2);
	y = Math.round ((screen.height - ysize)/2);

	windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0';
	open_window = window.open(url, wtitle, windowsize );

	if(open_window != null) open_window.focus();
	if(open_window.opener == null ) open_window.opener = window;
}

// ½ºÅ©·Ñ¹Ù ÀÖ´Â POP_UP
function f_open(url, win, w, h)
{
	win = window.open(url, win, 'resizable=no,scrollbars=yes,left=100,top=120,width=' + w + ',height=' + h);
}

// ½ºÅ©·Ñ¹Ù ¾ø´Â POP_UP
function f_open2(url, win, w, h)
{
	win = window.open(url, win, 'resizable=no,scrollbars=no,left=100,top=120,width=' + w + ',height=' + h);
	win.focus();
}

// º¸ÀÌÁö ¾Ê´Â POP_UP
function f_open3(url, win, w, h)
{
	win = window.open(url, win, 'resizable=no,scrollbars=no,left=100,top=3000,width=' + w + ',height=' + h);
	win.focus();
}

// ½ºÅ©·Ñ¹Ù ÀÖ´Â POP_UP
function f_open4(url, win, w, h)
{
	win = window.open(url, win, 'resizable=no,scrollbars=no,left=20,top=20,width=' + w + ',height=' + h);
}

// ½ºÅ©·Ñ¹Ù ÀÖ´Â POP_UP
function f_open5(url, win, w, h)
{
	win = window.open(url, win, 'resizable=yes,scrollbars=yes,left=100,top=120,width=' + w + ',height=' + h);
}



/***********************************
¼³¸í : Æû¿¡¼­ °ø¹é Ã¼Å©ÇØ¼­ °ø¹éÀÌ¸é ¸Þ¼¼Áö º¸¿©Áö°í ÇØ´ç Æû°ª¿¡ Æ÷Ä¿½º
¿¹) CheckSpaces(strValue) CheckSpaces(°ª)
¸®ÅÏ) °ø¹éÀÌ¸é false °ø¹éÀÌ ¾Æ´Ï¸é true
 ****************************************/
function CheckSpaces(strValue) 
{
	var flag=true;
	
	if (strValue!="") {
		for (var i=0; i < strValue.length; i++) {
			if (strValue.charAt(i) != " ") {
				flag=false;
				break;
			}
		}
	}
	return flag;
}



/************************************************************
¼³¸í : ÀÔ·ÂÇÑ emailÀÌ ¿µ¹®ÀÚ¿Í @°ªÀÌ Á¤È®ÀÌ µé¾î°¡ ÀÖ´ÂÁö 
¿¹) checkEmail("test@test.co.kr")
°á°ú) true
¸®ÅÏ : ÀÌ¸ÞÀÏÀÌ ¸Â´Ù¸é  True , Æ²¸®´Ù¸é false
************************************************************/
function checkEmail(email){
	var str='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
	var flag=0;
	var comma=0;
	for(i=0; i<email.length; i++) {
		for(j=0; j<str.length; j++) {
			if(email.charAt(i)==str.charAt(j)){
				break;
			}
		}
		if(j==str.length) {
			if(email.charAt(i)=='@'){
				flag++;
			}else if(email.charAt(i)=='.'){
				comma++;
			}else{
				return false;
			}
		}
	}
	if(flag!=1){
		return false;
	}else if((comma<1)||(comma>3)){
		return false;
	}else{
		return true;
	}
}


/************************************************************
¼³¸í : ÀÔ·ÂÇÑ ¹ë·ù°ªÀÌ ¿øÇÏ´Â Ã¼Å©°ªÀÇ ´Ü¾î¶û ¸Â´ÂÄ¡ Ã¼Å©
¿¹)checkVal(Æû.ÀÌ¸§.¹ë·ù,"0123456789")  => ¹ë·ù °ªÀÌ 0~9 ±îÁö ÀÌ¸é true
°á°ú) ¹ë·ù °ªÀÌ Ã¼Å©°ª¿¡ ¼ÓÇÏ´Â ´Ü¾îÀÌ¸é true ¼ÓÇÏÁö ¾Ê´Â ´Ü¾î°¡ ÀÖÀ¸¸é false
¸®ÅÏ : ¸Â´Ù¸é  True , Æ²¸®´Ù¸é false
************************************************************/
function checkVal(val,chkStr){
	for (var i=0; i <chkStr.length; i++){
		if(chkStr.indexOf(val.substring(i,i+1))<0) {
			return false;
		}
	}
	return true;
}


/************************************************************
¼³¸í : Ã¼Å© ¹Ú½º, ¶óµð¿À ¹öÆ° ¼±ÅÃ Ã¼Å©
¿¹)checkRadio(Æû.ÀÌ¸§)
°á°ú) Ã¼Å© ÇÑ°Ô ÀÖ´Ù¸é true Ã¼Å©ÇÑ°Ô ¾ø´Ù¸é false
************************************************************/
function checkRadio(InputName){
	if(InputName){
		if(!InputName.length) {
			if(InputName.checked) {
				return true;
			}
		} else {
			for(i=0;i<InputName.length;i++) {
				if(InputName[i].checked) {
					return true;
				}
			}
		}
	}
	return false;
}


function f_chkNumber(obj,lbl)
{
	var nLen = obj.value.length; 
	for( i = 0 ; i < nLen ; i++)
	{
		temp = obj.value.substring(i,i+1);
		if( temp < '0' || temp > '9' )
		{
			alert(lbl + ' ¼ýÀÚ¸¸ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.');
			obj.focus();
			return true;
		}     
	}
	return false;
}

// ¹®ÀÚ¿­ÀÇ ±æÀÌ(Byte´ÜÀ§)
function f_getStrLenB(str)
{
   var nCnt = 0;
	var sTemp;
	
	for (i = 0; i < str.length; i++)
	{
      sTemp = escape(str.substring(i, i + 1));
	   if (sTemp.substring(1, 2) == "u")
	      nCnt += 2;
	   else
	      nCnt += 1;
   }
	
   return nCnt;
}

function FoodMapWrite(){
	window.open("/life/foodmap/foodmap_shop_popup.asp","foodmap","width=501,height=580,left=10,top=10,scrollbars=no");
}


function FlashScriptIns(sname,sid,swidth,sheight,swmode, sbgcolor, setc){	
	var tagTxt;

		tabTxt = "<object type=\"application/x-shockwave-flash\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width="+swidth+" height="+sheight+" id="+sid+">";
		tabTxt = tabTxt + "<param name=wmode value="+swmode+" />";
		tabTxt = tabTxt + "<param name=allowScriptAccess value=always />";
		tabTxt = tabTxt + "<param name=menu value=false>";

	if (sbgcolor != 'no'){
		tabTxt = tabTxt + "<param name=bgcolor value="+sbgcolor+" />";
	}

	if (setc != 'no'){
		tabTxt = tabTxt + setc;
	}
		tabTxt = tabTxt + "<param name=movie value="+sname+" />";		
		tabTxt = tabTxt + "<param name=quality value=high />";
		tabTxt = tabTxt + "<embed src="+sname+" quality=high wmode="+swmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" width="+swidth+" height="+sheight+">";
		tabTxt = tabTxt + "</embed>";
		tabTxt = tabTxt + "</object>";
	
	return tabTxt;
}

function ObjectScriptIns(sclassid, scodebase, sname, sid, swidth,sheight, setc){
	var tagTxt;
	tabTxt = "<object classid="+sclassid+" codebase="+scodebase+" name="+sname+" width="+swidth+" height="+sheight+" id="+sid+">";
	tabTxt = tabTxt + "<param name=wmode value="+swmode+" />"
	tabTxt = tabTxt + setc;
	tabTxt = tabTxt + "</object>";
	return tabTxt;
}

function AppletScriptIns(scodebase, scode, sarchive, swidth,sheight, sname, sid, setc) {
	var tagTxt;
	tabTxt = "<applet codebase="+scodebase+" code="+scode+" archive="+sarchive+" width="+swidth+" height="+sheight+" name="+sname+" viewastext id="+sid+">";
	tabTxt = tabTxt + setc;
	tabTxt = tabTxt + "</applet>";
	return tabTxt;
}

//Applet »ðÀÔ
function AppletScriptInsfactory(scodebase, scode, sarchive, sid, swidth,sheight, ssplash, src){
	var tagTxt;
	tabTxt = "<applet	codebase='"+scodebase+"' code='"+scode+"' archive='"+sarchive+"' width='"+swidth+"' height='"+sheight+"' name='"+sid+"' viewastext id='"+sid+"'>";
	tabTxt = tabTxt + "<param name='Spin' value='flat'>";
	tabTxt = tabTxt + "<param name='ToolBar' value='on'>";
	tabTxt = tabTxt + "<PARAM NAME='splash' VALUE='"+ssplash+"'>";
	tabTxt = tabTxt + "<PARAM NAME='splashbg' VALUE='FFFFFF'>";
	tabTxt = tabTxt + "<param name='URL' value='"+src+"'>";
	tabTxt = tabTxt + "<param name='SpinSpeed' value='-4'>";
	return tabTxt;
}

// assign code innerHTML
function SetInnerHTML(target, code){ 
	target.innerHTML = code; 
}

// write document contents
function ScriptWrite(src){
	document.write(src);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


//µÕµÕÀÌ ÀÌº¥Æ® °ü·Ã(060630)
function fs_DongEvent()
{
	location.href="/event/event/EventEvt.asp";	
}


function swfView(src,w,h){
	var html = '';
	html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" VIEWASTEXT>';
	html +=  '<param name="movie" value="'+src+'" />';
	html +=  '<param name="wmode" value="transparent" />';
	html +=  '<param name="quality" value="high" />';
	html +=  '<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="transparent">';
	html +=  '</embed> ';
	html +=  '</object>';
	document.write(html);
}

function MovieObject(w,h,control) {
	document.write('	<OBJECT ID="MediaPlayer" Name="MoviePlayer"  CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" TYPE="application/x-oleobject" width="'+w+'" height="'+h+'"  STANDBY="Loading Microsoft Windows Media Player components..." VIEWASTEXT> ');
	document.write('      <PARAM NAME="FileName" VALUE=""> ');
	document.write('	  <PARAM NAME="PlayCount" VALUE="0"> ');
	document.write('      <PARAM NAME="ShowControls" VALUE="'+control+'"> ');
	document.write('      <PARAM NAME="ShowStatusBar" VALUE="0"> ');
	document.write('      <PARAM NAME="AutoRewind" VALUE="True"> '); 
	document.write('      <PARAM NAME="EnableTracker" VALUE="True"> ');
	document.write('      <PARAM NAME="AutoStart" VALUE="True"> ');
	document.write('      <param name="AutoSize" value="True"> ');
	document.write('      <PARAM NAME="ShowCaptioning" VALUE="False"> ');
	document.write('      <param name="CurrentMarker" value="1"> ');
	document.write('      <param name="EnablePositionControls" value="0"> ');
	document.write('      <param name="EnableFullScreenControls" value="0"> ');
	document.write('      <param name="EnableTracker" value="0"> ');
	document.write('	  <param name="TransparentAtStart" value="1"> ');
	document.write('	  <param name="AnimationAtStart" value="0">	 ');				  
	document.write('    </OBJECT> ');
}