		//flash file include
function FlashInc(f_name,f_value,f_width,f_height,f_align,f_param){
	document.write('<object id="'+f_name+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="swflash.cab#version=8,0,0,0" width="'+f_width+'" height="'+f_height+'">') ;
	document.write('<param name="movie" value="'+f_value+'" />') ;
	document.write('<param name="quality" value="high" />') ;
	document.write('<param name="menu" value="false" />') ;
	document.write('<param name="wmode" value="transparent" />') ;
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<PARAM NAME=scale VALUE=noscale> ');
	document.write('<PARAM NAME="SAlign" VALUE="'+f_align+'">') ;
	document.write('<param name="FlashVars" value="'+f_param+'" />') ;
	document.write('<embed src="'+f_value+'" quality="high" name="'+f_name+'" SAlign="'+f_align+'" scale=noscale width="'+f_width+'" height="'+f_height+'" FlashVars="'+f_param+'" allowScriptAccess="sameDomain"  type="application/x-shockwave-flash" pluginspage="" />') ;
	document.write('</object>') ;
}


//·¹ÀÌ¾î º¸¿©ÁÖ±â ¼û±â±â
//ns = (document.layers)? true:false
//ie = (document.all)? true:false

function show(id) {
//if (ns) document.layers[id].visibility = "visible"
//else if (ie) document.all[id].style.visibility = "visible"
	document.getElementById(id).style.visibility="visible";
}

function hide(id) {
//if (ns) document.layers[id].visibility = "hidden"
//else if (ie) document.all[id].style.visibility = "hidden"
document.getElementById(id).style.visibility="hidden";
}

//·¹ÀÌ¾îº¸¿©ÁÖ±â
 function getObj(obj) {
       compLayr = eval("document.all." + obj + ".style")
       return compLayr
    }

    function showHide(name){
       obj = getObj(name) ;

       if (obj.visibility=="hidden"){
		   obj.visibility = "visible" ;
       } else {
	       obj.visibility = "hidden" ;
       }
    }

  //trÃ¤·Î º¸¿©ÁÖ±â ¼û±â±â (³ôÀÌ ¸øÁ¤ÇÏ´Â°æ¿ì)
function show2(id) {
	//if (ns) document.layers[id].display = 'block';
	//else if (ie) document.all[id].style.display = 'block';
	document.getElementById(id).style.display="block";
}

function hide2(id) {
	//if (ns) document.layers[id].display = 'none';
	//else if (ie) document.all[id].style.display = 'none';
	document.getElementById(id).style.display="none";
}


var ie=document.all
var ns6=document.getElementById&&!document.all

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}
//¸¶¿ì½º ¿À¹ö½Ã ¸»Ç³¼±?
function show_t(id) {
		//document.getElementById(id).style.display="block";
		var div = document.getElementById(id);

		var horzpos=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX;
		var vertpos=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY;

		div.style.top = (vertpos - 97) +"px";
		div.style.left = (horzpos - 120)+"px";

		div.style.display = "block";
}

//img rollover
function rollOver(img_name,img_path)
{
	name1 = img_path + "_on.gif";
	//alert(name1);
	img_n = document.getElementById(img_name);
	img_n.src = name1;
}

function rollOut(img_name,img_path)
{
	name1 = img_path + ".gif";
	//alert(name1);
	img_n = document.getElementById(img_name);
	img_n.src = name1;
}

/*º£³Ê 3°³ ¿òÁ÷ÀÌ±â ^-^*/
	function getMainPosition()	{
		var start, end, scale, term;
		start = parseInt (document.getElementById('right').style.top, 10);
		end = getMainScrollTop() + 102;

		if ( start != end ) {
			scale = Math.ceil( Math.abs( end - start ) / 20 );
			if ( end < start )	scale = -scale;
			document.getElementById('right').style.top = parseInt (document.getElementById('right').style.top, 10)+ scale + "px";
		}
		setTimeout ("getMainPosition()", 5);
	}

	function moveMainFlyBanner() {
		document.getElementById('right').style.top = getMainScrollTop() + 102 + "px";
		getMainPosition();
		return true;
	}

	function getMainScrollTop() {
		return document.body.scrollTop ? document.body.scrollTop: document.documentElement.scrollTop;
	}


/*select box ·¹ÀÌ¾î Ã³¸®*/
function over(bar,col) {
	bar.style.background = col;
}
function out(bar,col) {
	bar.style.background = col;
}

function select(object) {
  if(object.style.display == 'none') {
    object.style.display = 'block';
  } else {
    object.style.display = 'none';
  }
}

var layer_view = 0;
function mouseValue(stat) {
	layer_view = stat;
}

var all_names = new Array();
all_names[0] = "s_all_product";
all_names[1] = "s_viewer";
all_names[2] = "s_buyK";
all_names[3] = "top_search";
all_names[4] = "s_price";


function mouseFn() {

	if(layer_view == 1) {
		for(var i = 0; i < all_names.length; i++) {
			try {
				document.getElementById(all_names[i]).style.display = "none";
			} catch(e) {
			}
		}
	}

}

var oldClickHandler = document.onclick;
document.onclick = new Function("{if (oldClickHandler != null) oldClickHandler(); document.onclick = mouseFn;}");
document.onclick = mouseFn;



/*°ø¹éÁ¦°Å*/
function trim(str){
    return str.replace(/(^\s*)|(\s*$)/g,"");
}

//¹®ÀÚ¿­À» º¯È¯ÇÑ´Ù.
function replace(str, from, to)
{
	var index;
	var pstr;
	var str1;
	var str2;
	if((index = str.indexOf(from)) >= 0) {
	str1 = str.substr(0, index);
	str2 = str.substr(index+(from.length), str.length);
	pstr = str1;
	pstr += to;
		if(str2 && str2.length >= from.length) {
	   pstr += emate_replace(str2, from, to);
		}
		return pstr;
	}else{
		return str;
	}
}

//¼ýÀÚÀÎÁö Ã¼Å©
function isNum(str)
{
  	for(i = 0; i < str.length; i++)
  	{
    		ch = str.charAt(i);
    		if(ch < "0" || ch > "9")
    		return false;
  	}

	  return true;
}
