function go_url(ss)
{
	switch(ss)
	{
	
		case"01":
			location.replace('/');
		break;

		case"001":
		window.open('/z/index.htm',"fullscreendemo","fullscreen=yes, scrollbars=yes");
		break;
		case"002":
		window.open('/topics/ezonexi.htm',"fullscreendemo","fullscreen=yes, scrollbars=yes");
		break;
		case"003":
			window.open('/nanoray.html',"fullscreendemo","fullscreen=yes, scrollbars=yes");
		break;
		case"004":
			window.open('/yonex_zone/yonex_zone03.asp?Idx=589',"fullscreendemo","fullscreen=yes, scrollbars=yes");
		break;
		case"005":
			window.open('/popup/vcore.html',"fullscreendemo","fullscreen=yes, scrollbars=yes");
		break;

	}
}


		//case"001":
		//window.open('/nanoray.html');
		//break;
		//case"002":
		//window.open('/popup/vt80.html');
		//break;
		//case"003":
		//	window.open('/popup/vcore.html');
		//break;
		//case"004":
		//	window.open('http://yonex.co.kr/ezone/ezone/index.html');
		//break;
		//case"005":
		//	window.open('/product/list.asp?ca_id=501010');
		//break;



//
var basic_img = ""; 
function lock_menu(Menu) { 
if (Menu) { 
var target_menu = eval("document.all."+Menu); 
target_menu.src = "image/"+Menu+"_on.gif"; 
basic_img = Menu; 
} 
} 
function inact(imgName) 
    {   if (document.image && basic_img != imgName) 
        document[imgName].src = eval(imgName + '.src') 
     } 

function act(imgName) 
    {   if (document.image && basic_img != imgName) 
        document[imgName].src = eval(imgName + 'a.src') 
     } 

// --> 

// popup cookie
function getCookie(name) 
{
	var Found = false;
	var start,end;
	var i = 0;
	while (i <= document.cookie.length) 
	{
		start = i;
		end = start + name.length;
		if (document.cookie.substring(start,end) == name) 
		{
			Found = true;
			break;
		}
		i++;
	}
	if (Found) 
	{
		start = end + 1;
		end = document.cookie.indexOf(";",start);
		if (end < start) end = document.cookie.length;
		{
			return document.cookie.substring(start,end);
		}
	}
	return ;
}
// popup open
var farwindow = null;
function smartPopup(url,name,feature,number) 
{
	if ( getCookie('OpenPopup'+number+'Again') != 'no') 
	{
		farwindow = window.open(url,name,feature);
		if (farwindow != null) 
		{
			if (farwindow.opener == null) 
			{
				farwindow.opener = self;
			}
		}
	}
}
// select url go
function change_url(url)
{
	var cut_array = url.split('|');
	if(cut_array[1]=="1")
	{
		window.open(cut_array[0]);
	}	else	{
		location.replace(cut_array[0]);
	}
}


function setEmbed() 
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspace = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 

    
  this.init = function( getType , s ,w , h ) { 
      
      if ( getType == "flash") 
      { 

        clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
        pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        embedType = "application/x-shockwave-flash"; 
      } 
      /* type add
      else if ( ) 
      { 
      } 
      */ 
            
      parameter += "<param name='movie' value='"+ s + "'>\n";  
      parameter += "<param name='quality' value='high'>\n";    
      
      src = s; 
      width = w; 
      height = h; 
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'"; 
  }  
  
  this.show = function() { 
      if ( clsid ) 
      { 
        obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n"; 
      } 
      
      embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" wmode='transparent'></embed>\n"; 
      
      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      
      html = obj + parameter + embed; 
      
      document.write( html );  
  } 
  
} 

function flash(s,w,h,type,wm,id,autostart) 
{ 
	var obj = new String; 
	var parameter = new String; 
	var embed = new String; 
	var html = new String; 
	var allParameter = new String; 
	var clsid = new String; 
	var codebase = new String; 
	var pluginspage = new String; 
	var embedType = new String; 
	var src = new String; 
	var width = new String; 
	var height = new String; 


	src = s; 
	width = w; 
	height = h; 

	var typ = type ? type : "f"; 

	if(typ=="f")
	{ 
		clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
		codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
		pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
		embedType = "application/x-shockwave-flash"; 
	} else if(typ=="m") {//̵ 
		clsid="22D6F312-B0F6-11D0-94AB-0080C74C7E95"; 
		codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"; 
		embedType="application/x-oleobject"; 
		parameter += "<param name='FileName' value='"+ src + "'>\n"; 
		var auto = autostart ? "1" : "0"; 
		parameter += "<param name='AutoStart' value='"+auto+"'>\n";  
	} 
	parameter += "<param name='movie' value='"+ src + "'>\n";  
	parameter += "<param name='quality' value='high'>\n"; 

	parameter += "<param name='allowScriptAccess' value='always'>\n"; 
	if(wm) 
	{ 
	parameter += "<param name='wmode' value='transparent'>\n"; 
	} 
	if ( clsid ) 
	{ 
	obj = "<object id='movs' name='movs' classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n"; 
	} 
	embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" allowScriptAccess='always'></embed>\n"; 

	if ( obj ) 
	{ 
	embed += "</object>\n"; 
	} 
	html = obj + parameter + embed; 
	document.write( html ); 
}



function goTop(orix,oriy,desx,desy) {
		var Timer;
		var winHeight = document.body.scrollTop;
		if(Timer) clearTimeout(Timer);
		startx = 0;
		starty = winHeight;
		if(!orix || orix < 0) orix = 0;
		if(!oriy || oriy < 0) oriy = 0;
		var speed = 7;
		if(!desx) desx = 0 + startx;
		if(!desy) desy = 0 + starty;
		desx += (orix - startx) / speed;
		if (desx < 0) desx = 0;
		desy += (oriy - starty) / speed;
		if (desy < 0) desy = 0;
		var posX = Math.ceil(desx);
		var posY = Math.ceil(desy);
		window.scrollTo(posX, posY);
		if((Math.floor(Math.abs(startx - orix)) < 1) && (Math.floor(Math.abs(starty - oriy)) < 1)){
			clearTimeout(Timer);
			window.scroll(orix,oriy);
		}else if(posX != orix || posY != oriy){
			Timer = setTimeout("goTop("+orix+","+oriy+","+desx+","+desy+")",15);
		}else{
			clearTimeout(Timer);
		}
	}
function go_top()
{
	window.scrollTo(0,0);
}

function getReSize()
{
       try {
              var objFrame = document.getElementById("ifrm");
              var objBody = ifrm.document.body; 

              ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight); 

              if (ifrmHeight > 300) { 
                     objFrame.style.height = ifrmHeight; 
              } else {
                     objFrame.style.height = 300;
              } 
              objFrame.style.width = '99%'
       } catch(e) {
       };
} 



//onfocus="this.blur()" ==> <body onload="allblur();">

function allblur() {
  for (i = 0; i < document.links.length; i++) {
    var obj = document.links[i];
    if(obj.addEventListener) obj.addEventListener("focus", oneblur, false);
    else if(obj.attachEvent) obj.attachEvent("onfocus", oneblur);
  }
}
 
function oneblur(e) {
  var evt = e ? e : window.event;

 

  if(evt.target) evt.target.blur();
  else if(evt.srcElement) evt.srcElement.blur();
}

function show(){
	window.open("/board/bbs/write.php?bo_table=receive_01","popup","width=600,height=450");
}


//maxlength 만큼 옮기면 다음으로 이동하기....
function nextFocus(sFormName,sNow,sNext)
{
	var sForm = 'document.'+ sFormName +'.'
	var oNow = eval(sForm + sNow);

	if (typeof oNow == 'object')
	{
		if ( oNow.value.length == oNow.maxLength)
		{
			var oNext = eval(sForm + sNext);

			if ((typeof oNext) == 'object')
				oNext.focus();
		}
	}
}




function showroom_pop(){
window.open('/showroom/showroom/showroom.htm','','resizable=no,width=844,height=568,scrollbars=no,left=0,top=0');
}

/*  스크롤팝업 */
<!--
function popup2(pop,width,height)
{
	var url = pop;
	var wd = width;
	var he = height;

	window.open(url,"","left=300;top=300,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
}


function isNull(val){
  if(val == "" || val == null){
    return true;
  }else{
    return false;
  }
}
//-->



	/* 오른쪽 이미지 변경시 아래부분 수정 */
	var dropUpImg = "image/btn_drop_up.gif"; 
	var dropDownImg = "image/btn_drop_down.gif";

		function chgSelect() {
		var dropImg = document.getElementById("dropImg");
		var selectLayer = document.getElementById("selectLayer").style;
			if(selectLayer.display == "none") {
				selectLayer.display = "block";
				selectLayer.visibility = "visible";
				dropImg.src = dropUpImg;
			} else {
				selectLayer.display = "none";
				selectLayer.visibility = "hidden";
				dropImg.src =  dropDownImg;
			}
		}
		function chgLayer(v) {
		var selection = document.getElementById("selection");
		var dropImg = document.getElementById("dropImg");
		var selectLayer = document.getElementById("selectLayer").style;
		var layerBox = document.getElementById("layerBox");
		var layerLiBox = layerBox.getElementsByTagName('li');
		var chgValue = '';
		var chgOp = '';
		switch(v) {
			case "1" : chgValue = "네이버"; chgOp = "naver"; break; //링크로 사용시 변수(chgOp)에 주소등록 ex)chgOp = "http://www.naver.com/";
			case "2" : chgValue = "네이트"; chgOp = "nate"; break;
			case "3" : chgValue = "다음"; chgOp = "daum"; break;
			case "4" : chgValue = "구글"; chgOp = "google"; break;
			case "5" : chgValue = "야후"; chgOp = "yahoo"; break;
			default : chgValue = "실패"; chgOp="satang1245";
		}
		for(var j=1; j<(layerLiBox.length+1); j++) {
			if(j==v) {
				document.getElementById("lay"+j).className="selectionLi";
			} else {
				document.getElementById("lay"+j).className="selectLi";
			}
		}
			selection.innerHTML= chgValue;
			/* 페이지 이동시 (나중 사용을 위해 주석처리)
			location.href= chgOp; //현재 페이지이동
			window.open(chgOp,"familyPopup",""); //새창으로 띄우기
			------------------  */
			selectLayer.display="none";
			selectLayer.visibility="hidden";
			dropImg.src = dropDownImg;
		}
/* */

/* 팝업 */
<!--
function popup(pop,width,height)
{
	var url = pop;
	var wd = width;
	var he = height;

	window.open(url,"","left=300;top=300,toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
}
//-->



function flash(s,w,h,type,wm,id,autostart)
{
	var obj = new String;
	var parameter = new String;
	var embed = new String;
	var html = new String;
	var allParameter = new String;
	var clsid = new String;
	var codebase = new String;
	var pluginspage = new String;
	var embedType = new String;
	var src = new String;
	var width = new String;
	var height = new String;


	src = s;
	width = w;
	height = h;

	var typ = type ? type : "f";

	if(typ=="f")
	{
		clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";
		codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0";
		pluginspage = "http://www.macromedia.com/go/getflashplayer";
		embedType = "application/x-shockwave-flash";
	} else if(typ=="m") {//?
		clsid="22D6F312-B0F6-11D0-94AB-0080C74C7E95";
		codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";
		embedType="application/x-oleobject";
		parameter += "<param name='FileName' value='"+ src + "'>\n";
		var auto = autostart ? "1" : "0";
		parameter += "<param name='AutoStart' value='"+auto+"'>\n";
	}
	parameter += '<param name="flashvars" value="&main=-1&"/>'
	parameter += "<param name='movie' value='"+ src + "'>\n";
	parameter += "<param name='quality' value='high'>\n";

	parameter += "<param name='allowScriptAccess' value='always'>\n";
	if(wm)
	{
	parameter += "<param name='wmode' value='transparent'>\n";
	}
	if ( clsid )
	{
	obj = "<object id='movs' name='movs' classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n";
	}
	embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" allowScriptAccess='always' wmode='transparent'></embed>\n";

	if ( obj )
	{
	embed += "</object>\n";
	}
	html = obj + parameter + embed;
	document.write( html );
}
