﻿/**
 * File Name : default.js
 * Description : 기본스크립트 설정
 * @author Web business Team / Choi Hyun Mi
 * Email : imagestj@olymcompnay.com
 * Date : 2011.07.26
 * Update : 2011.07.26
 * Copyright (c) 2011 OLYM Communications. All Rights Reserved.
 */
//------------------------------------------------------------------------------
// png 파일 ie6에서도 투명유지
//------------------------------------------------------------------------------
function setPng24(obj) {
  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 '';
}
//------------------------------------------------------------------------------
// 롤오버
//------------------------------------------------------------------------------
function rollover(obj){
  var img_name = obj.getElementsByTagName("img").item(0).src;
  var img_extension = img_name.substring(img_name.lastIndexOf(".")+1);
  var img_on = "_over."+img_extension;
  var img_off = "_off."+img_extension;
  obj.getElementsByTagName("img").item(0).src = img_name.replace(img_off, img_on);
}

//------------------------------------------------------------------------------
// 롤아웃
//------------------------------------------------------------------------------
function rollout(obj){
  var img_name = obj.getElementsByTagName("img").item(0).src;
  var img_extension = img_name.substring(img_name.lastIndexOf(".")+1);
  var img_on = "_over."+img_extension;
  var img_off = "_off."+img_extension;
  obj.getElementsByTagName("img").item(0).src = img_name.replace(img_on, img_off);
}

//------------------------------------------------------------------------------
// 플래쉬 연결
//------------------------------------------------------------------------------
function flash_maker(url, width, height, mode) {
  var flashbody = "";
  flashbody = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'>";
  flashbody += "<param name='allowScriptAccess' value='"+url+"' />";

  flashbody += "<param name='movie' value='"+url+"' />";
  flashbody += "<param name='quality' value='high' />";
  flashbody += "<param name='wmode' value='"+mode+"' />";
  flashbody += "<param name='menu' value='false' />";
  flashbody += "<embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='"+mode+"' width='"+width+"' height='"+height+"'></embed>"
  flashbody += "</object>";
  document.write(flashbody);
}

function flash_maker3(url, width, height, mode) {
  var flashbody = "";
  flashbody = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+width+"' height='"+height+"' id='Untitled-1' align='middle'>";
  flashbody += "<param name='movie' value='"+url+"' />";
  flashbody += "<param name='quality' value='high' />";
  flashbody += "<param name='wmode' value='"+mode+"' />";
  flashbody += "<param name='menu' value='false' />";
  flashbody += "<param name='allowScriptAccess' value='sameDomain' />";
  flashbody += "<param name='allowFullScreen' value='false' />";
  flashbody += "<param name='movie' value='"+url+"' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /> <embed src='"+url+"' quality='high' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='Untitled-1' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
  flashbody += "</object>";
  document.write(flashbody);
}

//------------------------------------------------------------------------------
// 사이트맵
//------------------------------------------------------------------------------

var cc=0
function showHideLayer(sitemap_ov) {
    if (cc==0) {
        cc=1
        document.getElementById(sitemap_ov).style.display="block";
    } else {
        cc=0
        document.getElementById(sitemap_ov).style.display="none";
    }
}


