/////////////////////////////////////////////////////////////////////////////////////////
//
//	¢Æ flashMovie
//
// **************************************************************************
//
/////////////////////////////////////////////////////////////////////////////////////////
function flashMovie(fid,src,wid,hei,fvs,wmd) {
  this.fPrint = '';
  this.Id = document.getElementById(fid);
  this.Src = src;
  this.Width = wid;
  this.Height = hei;
  this.FlashVars = (fvs != undefined)? fvs :'';
  this.Wmod = (wmd != undefined)? wmd :'';
  if(isObject(Id)) {

	fPrint = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+Width+'" height="'+Height+'" id="wisa_'+fid+'">';
    fPrint += '<param name="movie" value="'+Src+'">';
	fPrint += '<param name="allowScriptAccess" value="always" />';
	fPrint += '<param name="allowFullScreen" value="false" />';
    fPrint += '<param name="quality" value="high">';
    fPrint += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
    fPrint += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : '';
    fPrint += '<embed';
    fPrint += ' src="'+Src+'"';
    fPrint += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : '';
    fPrint += (Wmod != null) ? ' wmode="'+Wmod+'"' : '';
    fPrint += ' quality="high"';
	fPrint += ' allowScriptAccess="always"';
	fPrint += ' allowFullScreen="false"';
    fPrint += ' pluginspage="http://www.macromedia.com/go/getflashplayer"';
    fPrint += ' type="application/x-shockwave-flash" ';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'"';
    fPrint += '></embed>';
    fPrint += '</object>';
    Id.innerHTML = fPrint;
  }
}

function isObject(a) {
    return (a && typeof a == 'object');
}




/////////////////////////////////////////////////////////////////////////////////////////
//
//	¢Æ flash menu link
//
// **************************************************************************
//
/////////////////////////////////////////////////////////////////////////////////////////
var flashLink=new Array();
flashLink["movBtn_1"]="/front/php/b/board_list.php?board_no=1";
flashLink["MoviePlayer"]="/front/php/product.php?product_no=2301&main_cate_no=1&display_group=3";

function goFlash(n){
	//alert(n);
	if (n == "orderTrackingBtn" ) {
		window.open(flashLink[n]);
	}else if (flashLink[n]) {
		location.href=flashLink[n];
	}
}



////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   imgOver
//
//**************************************************************************************************************
//
//  Example)
//      <img src="/_image/common/ÀÌ¹ÌÁö.jpg" alt="" title="" onmouseover="imgOver(this)" onmouseout="imgOver(this,'out')">
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function imgOver(imgEl,opt) {
    var src = imgEl.getAttribute('src');
    var ftype = src.substring(src.lastIndexOf('.'), src.length);
    
    if (opt == 'out') imgEl.src = imgEl.src.replace("_over"+ftype, ftype);
    else imgEl.src = imgEl.src.replace(ftype, "_over"+ftype);
}



////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   setPng24
//
//**************************************************************************************************************
//
//  Usage) IE 7 ÀÌÇÏ¿¡¼­ png24 ÀÇ ¾ËÆÄÃ¤³Î Áö¿ø
//
//  Example)
//      <img src="ÀÌ¹ÌÁö" alt="" title="" class="png24">
//      -  css ÆÄÀÏ¶Ç´Â ¹®¼­³»¿¡ .png24{tmp:expression(setPng24(this));} °¡ ÁöÁ¤µÇÀÖ¾î¾ß »ç¿ë°¡´É
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function setPng24(obj) { 
      var browser = navigator.appName;
      var version = parseFloat(navigator.appVersion.replace (/^.*MSIE ([.0-9]+).*$/,"$1"));

      if(browser.indexOf("Internet Explorer") && version < 7.0 ) {// IE6 ÀÌÇÏ¿¡¼­¸¸ µ¿ÀÛ 2008-03-14 by zardsama
            obj.width=obj.height=1; 
            obj.className=obj.className.replace(/\bpng24\b/i,''); 
            obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
            obj.src='';  
            return ''; 
      }
}




////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   bookmarksite
//
//**************************************************************************************************************
//
//  Usage) Áñ°ÜÃ£±â
//         -  À§»ç¸ô °ü¸®ÀÚÀÇ ¼îÇÎ¸ô°ü¸® - ´ëÇ¥µµ¸ÞÀÎ ¼³Á¤ - ´ëÇ¥µµ¸ÞÀÎ, 
//            À§»ç¸ô °ü¸®ÀÚÀÇ ¼îÇÎ¸ô°ü¸® - Å¸ÀÌÆ²¸ÞÅ¸°Ë»ö - À¥ºê¶ó¿ìÀú Å¸ÀÌÆ²ÀÌ ³»¿ëÀ¸·Î µé¾î°¨
//
//  Example)
//      <img src="ÀÌ¹ÌÁö°æ·Î" alt="Áñ°ÜÃ£±â" onclick="addBookmark()">
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function addBookmark() {
	var url = root_url;
	var title = document.title;

	if (window.sidebar) {// firefox
		window.sidebar.addPanel(title, url, ""); 
	}

	else if(window.opera && window.print) {// opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	}

	else if(window.external) {// IE
		window.external.AddFavorite(url, title);
	}
}

