﻿<!--
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_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

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_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_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 goMenu(Val,Sel)
{
	Sel.value = '';
	if (Val) location=Val;
	
}

function Win_open(newwin)
	{
		var winl = (screen.width - 350) / 2;
		var wint = (screen.height - 250) / 2;
		winprops = 'width=350,height=250,top='+wint+',left='+winl+',resizable=no,scrollbars=no,status=no,menu=no';
		win = window.open(newwin, "new", winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}


function Win_open2(newwin)
	{
		var winl = (screen.width - 350) / 2;
		var wint = (screen.height - 310) / 2;
		winprops = 'width=350,height=310,top='+wint+',left='+winl+',resizable=no,scrollbars=no,status=no,menu=no';
		win = window.open(newwin, "new", winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
	
function Win_pop(newwin) {
var winl = (screen.width - 302) / 2;
var wint = (screen.height - 300) / 2;
winprops = 'width=302,height=300,top='+wint+',left='+winl+',resizable=no,scrollbars=no,status=no,menu=no';
win = window.open(newwin, "new", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}	

function Win_pop3(newwin) {
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 500) / 2;
winprops = 'width=475,height=570,top='+wint+',left='+winl+',resizable=no,scrollbars=no,status=no,menu=no';
win = window.open(newwin, "new", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function Win_pop4(newwin,code,mod) {
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 500) / 2;
winprops = 'width=600,height=600,top='+wint+',left='+winl+',resizable=no,scrollbars=yes,status=no,menu=no';
win = window.open(newwin+"?CODE_TRIM="+code+"&mod="+mod, "new", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}	
       
function pop(pPage,Opt) {
  var popUpWin;
  popUpWin = window.open(pPage,'popup',Opt);
  popUpWin.focus();
}	

function popAlert(msg,url) {
  var winl = (screen.width - 302) / 2;
  var wint = (screen.height - 300) / 2;
  winprops = 'width=258,height=140,top='+wint+',left='+winl+',resizable=no,scrollbars=no,status=no,menu=no';
  var popUpWin;
  var pPage = "/build/pop_error.asp?msg=" + msg + "&url=" + url;
  popUpWin = window.open(pPage,'popup',winprops);
  if (parseInt(navigator.appVersion) >= 4) { popUpWin.window.focus(); }
}

function setOpener(url)
{
	opener.location.href = url;
	close();
}

function isValidEmail(email)
{
  var valid = "0123456789abcdefghijklmnopqrstuvwxyz[].-_@";
  var re = /^([A-Za-z0-9_|-]+[.]*[A-Za-z0-9_|-]+)+@[A-Za-z0-9_|-]+([.][A-Za-z0-9_|-]+)*[.][A-Za-z0-9]+$/i;

  for(var i=0; i < email.length; i++) {
    if (valid.indexOf(email.charAt(i).toLowerCase()) < 0) {
      return false;
    }
  }

  if (!email.match(re))
    return false;

  return true;
}

// Recording number
function OnlyNumber(){
	if((event.keyCode<48) || (event.keyCode>57))
		event.returnValue = false;
} //end function


// Recording impossibility number
function NotNumber(){
	if((event.keyCode>48) && (event.keyCode<57))
		event.returnValue =false;
}//end function


// Blank input impossibility
function NoSpace(){
	if(event.keyCode==32)
		event.returnValue = false;
}//end funcion

// Spatial character input impossibility
function CheckSPC(str)
{
 denystring = "`:;'+|.,/#@$%^&<>\"";
 
  for(i=0;i<denystring.length;i++){
    denychar = denystring.substring(i,i+1);  
    if(str.indexOf(denychar)!=-1){
      return false;
    }
  }
  return true;
}

function vussel_check(returnurl)//Pop-up at necessity that is log
	{
		var url = returnurl;
		
		for (i = 0; i < url.length; i++) {
			if (url.charAt(i) == "&") {
				url = url.replace("&","@^");
			}
		}

		var winl = (screen.width - 302) / 2;
		var wint = (screen.height - 300) / 2;

	    window.open("/mypage/pop_login.asp?returnurl="+ url,"new","width=350,height=250,resizable=auto,scrollbars=no,status=no,menu=no,top="+wint+",left="+winl+"");
	}

function goLogin(returnurl)//Screen transfer that is log
	{
	    opener.location.href = "/mypage/login.asp?returnurl="+ returnurl;
		self.close();
	}
function goRegist(returnurl)//Subscriber of membership screen transfer
	{
		opener.location.href = "/mypage/agreement.asp?returnurl="+ returnurl;
		self.close();
	}
function acg_trim(str) {
      var count = str.length;
      var len = count;                
      var st = 0;
                
      while ((st < len) && (str.charAt(st) <= ' ')) {
         st++;
      }
      while ((st < len) && (str.charAt(len - 1) <= ' ')) {
         len--;
      }                
      return ((st > 0) || (len < count)) ? str.substring(st, len) : str ;   
}

function chgImageSize(form,w,h){
	var img = new Image();
    var i_width = form.width;
    var i_height = form.height;

    if(i_width > w){
        form.width = w;
    }
    if(i_height > h){
        form.height = h;
    }
}

function Soundplay(){
	parent.leftFrame.MediaPlayer1.Play();
}
function Firstplay(){
	parent.leftFrame.location.href='/left.asp';
	parent.leftFrame.MediaPlayer1.Play();
}
function Soundstop(){
	 	parent.leftFrame.MediaPlayer1.Stop(); 
		parent.leftFrame.MediaPlayer1.CurrentPosition=0;
}

///////////////////////////////////////////
//To fly pop-up image javelin according to image size

function imgResize(img){ 
  img1= new Image(); 
  img1.src=(img); 
  imgControll(img); 
  alert(img1.width);
} 

function imgControll(img){ 
  if((img1.width!=0)&&(img1.height!=0)){ 
    viewImage(img); 
	
  } 
  else{ 
    controller="imgControll('"+img+"')"; 
    intervalID=setTimeout(controller,20); 
  } 
} 

function viewImage(img){ 
        W=img1.width; 
        H=img1.height; 
		winl = (screen.width - W) / 2;
		wint = (screen.height - H) / 2;
		
        winprops="width="+W+",height="+H+",left="+winl+",top="+wint; 
        imgWin=window.open("","",winprops); 
        imgWin.document.write("<html><head><title>Image View</title></head>");
        imgWin.document.write("<body topmargin=0 leftmargin=0>");
        imgWin.document.write("<img src="+img+" onclick='self.close()'>");
        imgWin.document.close();
		if (parseInt(navigator.appVersion) >= 4) { imgWin.window.focus(); }
} 
function imgOpen(name,w,h)
	{
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'width='+ w +',height='+ h +',top='+wint+',left='+winl+',resizable=no,scrollbars=no,status=no,menu=no';
		win = window.open("/img_pop.asp?imgurl="+ name, "new", winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
	
function imgOpen2(name,w,h)
	{
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'width=820'+',height=800'+',top='+wint+',left='+winl+',resizable=no,scrollbars=yes,status=no,menu=no';
		win = window.open("/img_pop.asp?imgurl="+ name, "new", winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
		
function PopGallery()
	{
		var winl = (screen.width - 900) / 2;
		var wint = (screen.height - 600) / 2;
		winprops = 'width=900,height=600,top='+wint+',left='+winl+',resizable=no,scrollbars=no,status=no,menu=no';
		win = window.open("/flash/product/showroom/Pop_Gallery.html", "Pgallery", winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}	

//-->
<!--
function comma(form,price) {
	 var formName  = form;
   var priceName = price;
   var numName   = eval("document."+formName+"."+priceName);
   var num	   = eval("document."+formName+"."+priceName+".value");
     
	    if (num.length >= 4) {
            re = /^$|,/g; 
            num = num.replace(re, ""); 
            fl="" 
		  if(num==0) return num 
        if(num<0){ 
            num=num*(-1) 
            fl="-" 
        }
        else{ 
            num=num*1 
        } 
            num = new String(num) 
            temp="" 
            co=3 
            num_len=num.length 
     while (num_len>0){ 
        num_len=num_len-co 
        if(num_len<0){co=num_len+co;num_len=0} 
        temp=","+num.substr(num_len,co)+temp 
        } 
    numName.value =  fl+temp.substr(1);
    }
} 
//-->
<!--
function Add_Comma(str){ 
	
	
	str = str + ''
	var comma = new Array()
	comma = str.split("")
	str = ""
	var temp2=0

	for(i=comma.length-1;i>=0;i--){
	str += comma[i]
	temp2++
	if(temp2 >2){str += ',';temp2=0}
	}

	comma = new Array()
	comma = str.split("")
	str = ""
	for(j=comma.length-1;j>=0;j--){str += comma[j]}
	if(str.substring(0,1)==',')str = str.substring(1,str.length)

	//	alert(str);
	return str
}
 
//-->
<!--
function getCookie(name){
	var namestr   = name + "=";
	var namelen   = namestr.length;
	var cookielen = document.cookie.length;

	var i    = 0;
	while(i< cookielen){
		var j = i+namelen;
		if(document.cookie.substring(i,j)==namestr){
			var end = document.cookie.indexOf(";",j);
			if(end== -1)
				end = document.cookie.length;
			return unescape(document.cookie.substring(j,end));
		}
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
	}
	return null;
}
function setCookie(name,value){
	var expires = new Date();
	var path,domain,secure;

	var argv    = setCookie.arguments; 
	var argc    = setCookie.arguments.length;  
	if (argc > 2) {
		expires.setTime(expires.getTime() + (1000*60*argv[2]));
	} 
	else {
		expires  = null;
	}
	path    = (argc > 3) ? argv[3] : null;  
	domain  = (argc > 4) ? argv[4] : null;  
	secure  = (argc > 5) ? argv[5] : false;
  
	document.cookie = name + "=" + escape (value) + 
							((expires == null) ? ""         : ("; expires=" + expires.toGMTString())) + 
							((path    == null) ? ""         : ("; path=" + path)) +  
							((domain  == null) ? ""         : ("; domain=" + domain)) +    
							((secure  == true) ? "; secure" : "");
							
}
function deleteCookie (name) {
		var expires = new Date();
		var value = getCookie(name);
		document.cookie = name + "=" + value + "; expires=" + expires.toGMTString();
}
// -->