// YYoonDesign Site JavaScript webdesigner kim tae kyung http://www.yoonfont.co.kr 


function download_fontmanager()
{
//	alert( "Ã³À½ ¼³Ä¡ÇÏ½Ã¸é, ¿ìÃø ¼³Ä¡Áö¿øÀ» º¸½ÅÈÄ ÆùÆ®¸Å´ÏÁ®¸¦ ¼³Ä¡ÇÏ¼¼¿ä.");
	guide_setup();
	location.href = "/download/help/download/YoonManager_online(2.0.3.3)_20091026.exe"
}

function download_fontmanager2()
{
//	alert( "Ã³À½ ¼³Ä¡ÇÏ½Ã¸é, ¿ìÃø ¼³Ä¡Áö¿øÀ» º¸½ÅÈÄ ÆùÆ®¸Å´ÏÁ®¸¦ ¼³Ä¡ÇÏ¼¼¿ä.");
	guide_fontmanager();
	window.open( "http://fontmanager.yoonfont.co.kr/update2/FontManagerPiece_20101203_(1.0.4.5).zip");
}

function download_win1_0(url)
{
	alert( "Ã³À½ ¼³Ä¡ÇÏ½Ã¸é, ¿ìÃø ¼³Ä¡Áö¿øÀ» º¸½ÅÈÄ ÆùÆ®¸¦ ¼³Ä¡ÇÏ¼¼¿ä.");
	window.open('http://yoonfont.co.kr/shop/guide/win_guide_piece.htm','','width=617,height=600,scrollbars=yes');
	location.href = url
}

function download_mac2_0(url)
{
//	alert( "Ã³À½ ¼³Ä¡ÇÏ½Ã¸é, ¿ìÃø ¼³Ä¡Áö¿øÀ» º¸½ÅÈÄ ÆùÆ®¸¦ ¼³Ä¡ÇÏ¼¼¿ä.");
//	window.open('http://yoonfont.co.kr/shop/guide/mac_guide_piece.htm','','width=617,height=600,scrollbars=yes');
	location.href = url
}


function guide_setup()
{
	window.open('/shop/guide/win_guide_piece2.0.htm','','width=617,height=600,scrollbars=yes');
}

function guide_fontmanager_cd()
{
	window.open('/shop/guide/win_fontmanager_cd.htm','','width=617,height=600,scrollbars=yes');
}

function guide_fontmanager()
{
	window.open('/shop/guide/win_fontmanager.htm','','width=617,height=600,scrollbars=yes');
}

function click_web( seq )
{
	window.open("http://www.cyworld.com/mall/mall5_brandshop_index.asp?urlstr=%2Fmall%2Fbrandshop%2Fbrandshop%5Flist%2Easp%3Fbrand%5Fseq%3D190%26mode%3D5", "", "");
	window.open("http://www.cyworld.com/mall/mall5_preview_webfont.asp?wishid=&category=webfont&present_seq="+seq, "cyworld", "width=400, height=600, toolbar=no, menubar=no, resizable=no, scrollbars=no");
}
function click_mobile(content_id, cate_id )
{
	window.open("http://kr.samsungmobile.com/service/entertainment/font/view_font.do?contentid="+content_id+"&cateid="+cate_id+"&check=no","","");
	window.open("http://kr.samsungmobile.com/service/entertainment/font/popup_font.do", "golf", "WIDTH=626, HEIGHT=700");
}

function memberjoin()
{
	location.href = '/member/member_join.asp'
}

function find_id(url)
{
	window.open('/login/find_id_pw.asp?ReturnURL=' + url,'','width=450,height=450,scrollbars=no')
}

function find_id_pw(url)
{
	location.href = '/login/find_id_pw.asp?ReturnURL=' + url
}

function stipulation()
{
	window.open('/about/stipulation.asp','','width=770,height=525,scrollbars=no')
}

function memberdoc()
{
	window.open('/member/cre_use.asp','','width=770,height=525,scrollbars=no')
}

function partnership()
{
	location.href = "mailto:yoondesign@yoondesign.co.kr"
}

function company_map()
{
	window.open('/about/map.html','','width=487,height=522')
}

function company_about()
{
	location.href = "/about/about.asp"
}

function help_email()
{
	location.href = "mailto:yoondesign@yoondesign.co.kr"
}


function cart_insert( itemidx )
{
	if( check_login2() )
		location.href = "/order/cart_insert.asp?ItemIdx=" + itemidx + "&mode=shop"
	else
		login(location.href)
}

function cart_form( frm )
{
	var itemidx = ""
	
	if( parseInt(frm.itemidx.length) )		
		for( var i = 0; i < frm .itemidx.length; i++ )
		{
			if( frm.itemidx[i].checked )
				itemidx = itemidx + frm.itemidx[i].value + ","
		}
	else
		if( frm.itemidx.checked )
			itemidx = itemidx + frm.itemidx.value + ","
	
	if( itemidx == "" )
	{
		alert("Á¦Ç°À» ¼±ÅÃÇÏ¼¼¿ä.");
		return ;
	} else
		if( confirm("À©µµ¿ìÁî¿ë, ¸Æ¿ëÀ» È®ÀÎÇÏ¼¼¿ä.\r\n\r\nÀå¹Ù±¸´Ï¿¡ ´ãÀ¸½Ã°Ú½À´Ï±î?") )
			cart_insert(itemidx);
}



function wish_insert( itemidx )
{
	if( check_login2() )
		location.href = "/mypage/wishlist_action.asp?mode=insert&ItemIdx=" + itemidx
	else
		login(location.href)
}

function wish_form( frm )
{
	var itemidx = ""

	if( parseInt(frm.itemidx.length) )		
		for( var i = 0; i < frm .itemidx.length; i++ )
		{
			if( frm.itemidx[i].checked )
				itemidx = itemidx + frm.itemidx[i].value + ","
		}
	else
		if( frm.itemidx.checked )
			itemidx = itemidx + frm.itemidx.value + ","

	if( itemidx == "" )
	{
		alert("Á¦Ç°À» ¼±ÅÃÇÏ¼¼¿ä.");
		return ;
	} else
		wish_insert(itemidx);
}


function buy_insert( itemidx )
{
	location.href = "/order/cart_insert.asp?ItemIdx=" + itemidx + "&mode=buy"	
}

function buy_insert_win( itemidx )
{
	window.open( "/order/cart_insert.asp?ItemIdx=" + itemidx + "&mode=buy", "" )
}

function buy_count( itemidx, count )
{
	window.open( "/order/cart_insert.asp?ItemIdx=" + itemidx + "&mode=buy&count=" + count, "" );
}

function buy_form( frm )
{
	var itemidx = ""
	
	if( parseInt(frm.itemidx.length) )		
		for( var i = 0; i < frm .itemidx.length; i++ )
		{
			if( frm.itemidx[i].checked )
				itemidx = itemidx + frm.itemidx[i].value + ","
		}
	else
		if( frm.itemidx.checked )
			itemidx = itemidx + frm.itemidx.value + ","
	
	if( itemidx == "" )
	{
		alert("Á¦Ç°À» ¼±ÅÃÇÏ¼¼¿ä.");
		return ;
	} else
		if( confirm("À©µµ¿ìÁî¿ë, ¸Æ¿ëÀ» È®ÀÎÇÏ¼¼¿ä.\r\n\r\n±¸ÀÔÇÏ½Ã°Ú½À´Ï±î?") )
			buy_insert(itemidx);
}

//flash
function Flash( src,width,height )
{
        html = '';
        html += '<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=7,0,0,0" id="param" width="'+width+'" height="'+height+'">';
        html += '<param name="movie" value="'+src+'">';
        html += '<param name="quality" value="high">';
        html += '<param name="bgcolor" value="#ffffff">';
        html += '<param name="wmode" value="transparent">';
        html += '<param name="swliveconnect" value="true">';
        html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+width+'" height="'+height+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
        html += '</object>';
        document.write(html);
}

// onfocus this.blur
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();
}

// quick menu
var quickMenu_Top = 175;
function CheckUIElements() { 
  var yMenu1From, yMenu1To, yOffset, timeoutNextCheck; 
  var wndWidth = parseInt(document.documentElement.clientWidth); 
  yMenu1From   = parseInt (quickLayer.style.top, 10); 
  yMenu1To     = document.documentElement.scrollTop + quickMenu_Top; // À§ÂÊ À§Ä¡ 
  timeoutNextCheck = 100; 

  if ( yMenu1From != yMenu1To ) { 
    yOffset = Math.ceil( Math.abs( yMenu1To - yMenu1From ) / 20 ); 
    if ( yMenu1To < yMenu1From ) 
      yOffset = -yOffset; 

    quickLayer.style.top = parseInt (quickLayer.style.top, 10) + yOffset; 

    timeoutNextCheck = 10; 
  } 
  setTimeout ("CheckUIElements()", timeoutNextCheck); 
} 
function MovePosition() { 
  var wndWidth = parseInt(document.documentElement.clientWidth); 

  // Æä¿¡Áö ·Îµù½Ã Æ÷Áö¼Ç 
  quickLayer.style.top = quickMenu_Top; 
  quickLayer.style.visibility = "visible"; 

  // initializing UI update timer 
  CheckUIElements(); 
  return true; 
} 

//error
<!-- 
function blockError(){return true;} 
window.onerror = blockError; 
//--> 



function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  }
}

function na_preload_img()
{
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null)
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length-1; i++) {
    document.preloadlist[top+i] = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  }
}

function na_change_img_src(name, nsdoc, rpath, preload)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  }
}

function na_hide_layer(lname)
{
  if(document.getElementById) {
    document.getElementById(lname).style.visibility = 'hidden';
  } else if(document.layers) {
    document.layers[lname].visibility = 'hide'
  } else if(document.all)
    document.all(lname).style.visibility = 'hidden'
}

function na_show_layer(lname)
{
  if (na_show_layer.arguments.length <= 1) { // don't delete, backword compatibility
    if(document.getElementById) {
      document.getElementById(lname).style.visibility = 'visible';
    } else if(document.layers) {
      document.layers[lname].visibility = 'show'
    } else if(document.all)
      document.all(lname).style.visibility = 'visible'
  } else {
    if(document.getElementById) {
      document.getElementById(lname).style.visibility = 'hidden';
    } else if(document.layers) {
      document.layers[lname].visibility = 'hide'
    } else if(document.all)
      document.all(lname).style.visibility = 'hidden'
  }
}


//right quickmenu location

