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 Ãß°¡ 
      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 +" ></embed>\n"; 
      
      if ( obj ) 
      { 
        embed += "</object>\n"; 
      } 
      
      html = obj + parameter + embed; 
      
      document.write( html );  
  } 
  
}

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 == true) { 
start = end + 1 
end = document.cookie.indexOf(";", start) 
if(end < start) 
end = document.cookie.length 
return document.cookie.substring(start, end) 
} 
return "" 
}

	function hide_popup(currMenu){

		if(document.all){
			thisMenu = eval('document.all.' + currMenu + '.style')
			if(thisMenu.display == 'block'){
				thisMenu.display = 'none'
			}else{
				thisMenu.display = 'block'
			}
			return false
		}else{
			return true
		}

	}

	function notice_setCookie( name, value, expiredays ){
		var todayDate = new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		document.cookie = name + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';'
		return;
	}

	//¿£ÅÍ ·Î±×ÀÎ
	function next_input(){

		if(event.keyCode == 13){

			if(checklogin()){

				document.loginform.submit();

			}

		}

	}

	//È¸¿ø·Î±ä
	function login_submit(){

		if(checklogin()){

			document.loginform.submit();

		}

	}

	// Æû Ã¼Å© ½ÃÀÛ 
	function checklogin(){

		var form = document.loginform;
		if(!form.login_id.value){

			alert('¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
			form.login_id.focus();
			return false;

		}

		if(!form.login_pass.value){

			alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
			form.login_pass.focus();
			return false;

		}

		return true;

	}

	//ºñÈ¸¿ø·Î±ä
	function email_submit(){

		if(checkemail()){

			document.loginform2.submit();

		}

	}

	//ºñÈ¸¿ø Æû Ã¼Å© ½ÃÀÛ 
	function checkemail(){

		var form = document.loginform2;
		if(!form.login_email.value){

			alert('ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');
			form.login_email.focus();
			return false;

		}

		return true;

	}

	function pop_find_id(){

		window.open('../page/pop_find_id.php','pop_find_id','top=100, left=150, width=350, height=200, scrollbars=no');

	}

	function pop_find_pw(){

		window.open('../page/pop_find_pass.php','pop_find_pw','top=100, left=150, width=350, height=250, scrollbars=no');

	}

	function form_multi_submit(){

		document.multi_list.submit();

	}

	function multi_check(){

		var f = document.multi_list;
		var i;

		for(i = 0; i < f.length; i++){

			if(f[i].name.substring(0,5) == "multi"){

				f[i].checked = !f[i].checked;

			}

		}

	}

	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 == true){

			start = end + 1
			end = document.cookie.indexOf(";", start)

			if(end < start)
			end = document.cookie.length
			return document.cookie.substring(start, end)

		}

		return ""

	}

	function hide_popup(currMenu){

		if(document.all){

			thisMenu = eval('document.all.' + currMenu + '.style')
			if(thisMenu.display == 'block'){

				thisMenu.display = 'none'

			}else{

				thisMenu.display = 'block'

			}

			return false

		}else{

			return true

		}

	}

	function notice_setCookie( name, value, expiredays ){
		var todayDate = new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		document.cookie = name + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';'
		return;
	}

	function shop_goto_sel(sel, targetstr){
		var index = sel.selectedIndex;
		if(sel.options[index].value != ''){
			if(targetstr == 'blank'){
				window.open(sel.options[index].value, 'win1');
			}else{
				var frameobj;
				if(targetstr == '') targetstr = 'self';
				if((frameobj = eval(targetstr)) != null)
				parent.location = sel.options[index].value;
			}
		}
	}

	function openwoori(){
		window.open("http://esc.wooribank.com/esc/cmmn/in/web2c001_06p.jsp?condition=www.b-boat.co.kr","woori","width=600,height=500,scrollbars=yes");
	}

	function pop_find_user(){

		window.open('../page/pop_find_user.php','pop_find_user','top=100, left=150, width=350, height=200, scrollbars=no');

	}

	function pop_find_pass(){

		window.open('../page/pop_find_pass.php','pop_find_pass','top=100, left=150, width=350, height=200, scrollbars=no');

	}

	function pop_free_sms(){
		window.open("http://image.b-boat.co.kr/sms/popup_sms.php","free_sms","width=500,height=310,scrollbars=no");
	}

	var prdtt_bak;
	function prdtt(ono, mode) {
		if (prdtt_bak) {
			var old = document.getElementById("desc"+prdtt_bak);
			old.style.display = "none";
		}

		var obj = document.getElementById("desc"+ono);
		obj.style.display = (mode == 1) ? "block" : "none";
		prdtt_bak = ono;
	}

	var prdtt_bak2;
	function prdtt2(ono, mode) {
		if (prdtt_bak2) {
			var old = document.getElementById("tdesc"+prdtt_bak2);
			old.style.display = "none";
		}

		var obj = document.getElementById("tdesc"+ono);
		obj.style.display = (mode == 1) ? "block" : "none";
		prdtt_bak2 = ono;
	}
