String.prototype.trim = function()
{
 return this.replace(/(^\s*)|(\s*$)/gi, "");
} 

function __ws__(id) { document.write(id.innerHTML);id.id=""; } 

function menu(num){

	switch(num){

		case "0.0":
			location.href = "/2007/index.php";
			break;

		case "1.1":
			location.href = "/2007/01_about/soonsoo_story.php";
			break;
		case "1.11":
			location.href = "/2007/01_about/soonsoo_chungdam.php";
			break;
		case "1.12":
			location.href = "/2007/01_about/soonsoo_hongdae.php";
			break;
		case "1.13":
			location.href = "/2007/01_about/soonsoo_china.php";
			break;
		case "1.2":
			location.href = "/2007/01_about/member_idx.php";
			break;
		case "1.21":
			location.href = "/2007/01_member/crew_list.php";
			break;
		case "1.22":
			location.href = "/2007/01_member_hongdae/crew_list.php";
			break;
		case "1.23":
			location.href = "/2007/01_member_china/crew_list.php";
			break;
		case "1.3":
			location.href = "/2007/01_about/location.php";
			break;
		case "1.4":
			location.href = "/2007/01_society_service/?category=service";
			break;
		case "1.5":
			location.href = "/2007/01_about/partner.php";
			break;

		case "2.1":
			location.href = "/2007/02_service/hair.php";
			break;
		case "2.2":
			location.href = "/2007/02_service/makeup.php";
			break;
		case "2.3":
			location.href = "/2007/02_service/nail.php";
			break;
		case "2.4":
			location.href = "/2007/02_service/wedding.php";
			break;
		case "2.5":
			location.href = "/2007/02_service/program.php";
			break;


		case "3.1":
			location.href = "/2007/03_trend/index.php?category=hair";
			//location.href = "/2007/03_trend/hair.php";
			break;
		case "3.2":
			location.href = "/2007/03_trend/index.php?category=makeup";
			//location.href = "/2007/03_trend/makeup.php";
			break;
		case "3.3":
			location.href = "/2007/03_trend/index.php?category=wedding";
			//location.href = "/2007/03_trend/wedding.php";
			break;

		case "3.4":
			location.href = "/2007/03_star/list.php";
			break;
		case "3.5":
			location.href = "/2007/03_trend/index.php?category=fieldsketch";
			break;
		case "3.6":	
			location.href = "/2007/03_trend/index.php?category=beautytip";
			//location.href = "/2007/03_beauty_tips/index.php";
			break;

		case "4.0":
			location.href = "/2007/04_magazine/magazine_main.php";
			break;
		case "4.1":
			location.href = "/2007/04_magazine/?category=bmagazine";
			break;
		case "4.2":
			location.href = "/2007/04_magazine/?category=release";
			break;
		case "4.3":
			location.href = "/2007/04_magazine/?category=show";
			break;

		case "4.4":
			location.href = "/2007/04_movie/";
			break;
		case "4.5":
			location.href = "/2007/04_magazine/?category=btrend";
			break;


		case "5.1":
			location.href = "/2007/05_wedding/?category=wmagazine";
			break;
		case "5.2":
			location.href = "/2007/05_wedding/?category=wgallery";
			break;
		case "5.3":
			location.href = "/2007/05_wedding/?category=wmagazine";
			break;


		case "6.1":
			location.href = "/2007/06_store_sel/store_brd_news.php";
			break;
		case "6.11":
			location.href = "/2007/06_news/?category=chungdam_news";
			break;
		case "6.12":
			location.href = "/2007/06_news/?category=hongdae_news";
			break;
		case "6.2":
			//location.href = "/2007/06_store_sel/store_brd_wedding.php";
			//break;
		case "6.21":
			location.href = "/2007/06_board/?category=counsel_wedding";
			break;
		case "6.22":
			location.href = "/2007/06_board/?category=counsel_wedding_hongdae";
			break;
		case "6.3":
			//location.href = "/2007/06_store_sel/store_brd_hair.php";
			//break;
		case "6.31":
			location.href = "/2007/06_board/?category=counsel_hair";
			break;
		case "6.32":
			location.href = "/2007/06_board/?category=counsel_hair_hongdae";
			break;
		case "6.4":
			//location.href = "/2007/06_store_sel/store_brd_makeup.php";
			//break;
		case "6.41":
			location.href = "/2007/06_board/?category=counsel_makeup";
			break;
		case "6.42":
			location.href = "/2007/06_board/?category=counsel_makeup_hongdae";
			break;
		case "6.5":
			location.href = "/2007/06_user_gallery/index.php?category=photo_gallery";
			break;

		case "8.1":
			location.href = "/2007/member/loginform.php";
			break;
		case "8.2":
			location.href = "/2007/member/mem_write1.php";
			break;
		case "8.3":
			location.href = "/2007/member/login_action.php";
			break;
		case "8.4":
			location.href = "/2007/member/mem_write2.php";
			break;



		case "9.1":	//ÀÌ¿ë¾à°ü
			location.href = "/2007/member/useagree.php";
			break;
		case "9.2":	//°³ÀÎÁ¤º¸º¸È£Á¤Ã¥
			location.href = "/2007/member/private.php";
			break;
		case "9.4":	//sitemap
			location.href = "/2007/member/sitemap.php";
			break;

		default:
			alert("ÁØºñÁßÀÔ´Ï´Ù.");
			break;
	}
	
}

function login_redirect(url){
	alert("·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä");
	location.href=url;
}

function getFileSize(filePath) 
{ 
  var len = 0; 
  if ( navigator.appName.indexOf("Netscape") != -1) 
  { 
	try { 
		netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); 
	} catch(e) { 
		alert("signed.applets.codebase_principal_support¸¦ ¼³Á¤ÇØÁÖ¼¼¿ä!\n"+e); 
		return -1; 
	} 
	try { 
		var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); 
		file.initWithPath ( filePath ); 
		len = file.fileSize; 
	} catch(e) { 
		alert("¿¡·¯ ¹ß»ý:"+e); 
	} 
  } 
  else if (navigator.appName.indexOf('Microsoft') != -1) 
  { 
	var img = new Image(); 
	img.dynsrc = filePath; 
	len = img.fileSize; 
  } 
  return len; 
} 

function getFileExtension(filePath){
	var lastIndex = -1;
	lastIndex = filePath.lastIndexOf('.');
	var extension = "";

	if ( lastIndex != -1 ){
		extension = filePath.substring( lastIndex+1, filePath.len );
	} else {
		extension = "";
	}
	return extension;
}

function checkFile(obj) 
{ 
  var len = getFileSize(obj.value); 
  // ¾Æ·¡ »¡°£»ö ºÎºÐÀÌ ÆÄÀÏ»çÀÌÁî ÁöÁ¤ÇØ ÁÖ´Â ºÎºÐÀÔ´Ï´Ù. 
  // »óÈ²¿¡ ¸Â°Ô ¾Æ·¡ ºÎºÐÀ» ¼öÁ¤ÇØ¼­ »ç¿ëÇÏ½Ã¸é µË´Ï´Ù. 
  if (len > maxSize) 
  { 
	 alert("Ã·ºÎÆÄÀÏÀº 10MB±îÁö °¡´ÉÇÕ´Ï´Ù."); 
	 return false;

  }else{

	return true;
  }

} 

function imgReturn() { //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 loadImg() { //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=loadImg.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 findObj(n, d) { //v4.01
  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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImg() { //v3.0
  var i,j=0,x,a=swapImg.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function view(what) { 
	var imgwin = window.open("",'WIN','scrollbars=yes,status=0,resizable=0,width=10,height=10,left=100,top=100'); 
	imgwin.focus(); 
	imgwin.document.open(); 
	imgwin.document.write("<html>\n"); 
	imgwin.document.write("<head>\n"); 
	imgwin.document.write("<title>È®´ë»çÁø</title>\n"); 

	imgwin.document.write("<sc"+"ript>\n"); 
	imgwin.document.write("function resize() {\n"); 
	imgwin.document.write("pic = document.il;\n"); 
	//imgwin.document.write("alert(eval(pic).height);\n"); 
	imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
	imgwin.document.write(" if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 32; myWidth = eval(pic).width + 27;\n"); 
	imgwin.document.write(" } else { myHeight = eval(pic).height + 7; myWidth = eval(pic).width - 2; }\n"); 
	imgwin.document.write(" clearTimeout();\n"); 
	imgwin.document.write(" var height = screen.height;\n"); 
	imgwin.document.write(" var width = screen.width;\n"); 

	imgwin.document.write(" self.resizeTo(myWidth, myHeight+25);\n"); 
	imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
	imgwin.document.write("</sc"+"ript>\n"); 

	imgwin.document.write("</head>\n"); 
	imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 

	imgwin.document.write("<img border=0 src="+what+" xwidth=300 xheight=7 name=il onload='resize();' onclick='self.close()' style='cursor:hand'>\n"); 
	imgwin.document.write("</body>\n"); 
	imgwin.document.close(); 
} 

function view2(what) { 
	var imgwin = window.open("",'WIN','scrollbars=no,status=0,resizable=0,width=10,height=10,left=100,top=100'); 
	imgwin.focus(); 
	imgwin.document.open(); 
	imgwin.document.write("<html>\n"); 
	imgwin.document.write("<head>\n"); 
	imgwin.document.write("<title>È®´ë»çÁø</title>\n"); 

	imgwin.document.write("<sc"+"ript>\n"); 
	imgwin.document.write("function resize() {\n"); 
	imgwin.document.write("pic = document.il;\n"); 
	//imgwin.document.write("alert(eval(pic).height);\n"); 
	imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
	imgwin.document.write(" if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 28; myWidth = eval(pic).width + 10;\n"); 
	imgwin.document.write(" } else { myHeight = eval(pic).height + 7; myWidth = eval(pic).width - 2; }\n"); 
	imgwin.document.write(" clearTimeout();\n"); 
	imgwin.document.write(" var height = screen.height;\n"); 
	imgwin.document.write(" var width = screen.width;\n"); 

	imgwin.document.write(" self.resizeTo(myWidth, myHeight+25);\n"); 
	imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
	imgwin.document.write("</sc"+"ript>\n"); 

	imgwin.document.write("</head>\n"); 
	imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n'); 

	imgwin.document.write("<img border=0 src="+what+" xwidth=300 xheight=7 name=il onload='resize();' onclick='self.close()' style='cursor:hand'>\n"); 
	imgwin.document.write("</body>\n"); 
	imgwin.document.close(); 
} 

function win_open(str,width,height,scroll,name){
	window.open(str,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+ scroll +',resizable=no,width=' + width + ',height=' + height + ',top=50,left=200');
}

function cmmt_delete(uid){
	win_open("cmmt_del.php?uid="+uid,"250","150","no","_CMMT_DEL");
}

function onlyNum(val) {
 var length = val.length;
 var i1;
 var c;
 for(i1 = 0; i1 < length; i1++) {
		c = val.substring(i1, i1 + 1);
		if (c < '0' || c > '9'){
			return false;
		}
 }
 return true;
}


function ie7Chk(){

	var ver = navigator.appVersion;

	if(ver.indexOf("MSIE 7") > -1){
		return "ie7";
	}else{
		return "etc";
	}

}

function pop_admin(){
	win_open('/2007/admin/','890','600','yes','_ADMIN');
}

function music_stop()
{
	document.all.player.src="/2007/images/sound_on.gif";
	top.m.music_stop();
	top.m.sound_ctl.value=0;
}
function music_pause()
{
	document.all.player.src="/2007/images/sound_on.gif";
	top.m.music_pause();
	top.m.sound_ctl.value=2;
}
function music_start()
{
	document.all.player.src="/2007/images/sound_off.gif";
	top.m.music_start();
	top.m.sound_ctl.value=1;
}

//¹öÆ°
function sound_player(){
	if(top.m.sound_ctl.value==1){
		music_pause();
	}else{
		music_start();
	}
}

//ÆäÀÌÁö ·Îµù½Ã
function sound_state(){
	if(top.m.hstr.value!=""){
		top.m.sound_ctl.value = top.m.hstr.value;
	}
	if(top.m.sound_ctl.value==1){
		music_start();
	}else if(top.m.sound_ctl.value==2){
		music_pause();
	}else{
		music_pause();
	}
	top.m.hstr.value="";
}

//ÆäÀÌÁö ·Îµù½Ã ÀÌ¹ÌÁö ±³Ã¼
function snd_state(){
	if(parent.m.sound_ctl.value==1){
		document.all.player.src="/2007/images/sound_off.gif";
	}else{
		document.all.player.src="/2007/images/sound_on.gif";
	}
}

//document.all.player.src="/2007/images/sound_on.gif";

function flash_obj(swf,width,height) {
	var embed_flash;
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'  ");
    document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0'  ");
    document.write("WIDTH=" + width + " HEIGHT=" + height + "> ");
    document.write("<param name=movie value='" + swf + "'> ");
    document.write("<param name=quality value=best> ");
	document.write("<param name='wmode' value='transparent'>  ");
    document.write("<embed src='" + swf + "' quality=best  ");
    document.write("pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'  ");
    document.write("type='application/x-shockwave-flash' wmode='transparent' WIDTH=" + width + " HEIGHT=" + height + " "+embed_flash+"> ");
    document.write("</embed> ");
    document.write("</object> ");
}


function pop_hong_review(){
	window.open('/mov/hong/hong_review.html','_HONG_REVIEW','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no','resizable=no,width=500,height=362,top=50,left=50');
}