function flashWrite(url,w,h,id,bg,vars,win){

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);

}

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 bluring(){  
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")  
document.body.focus();   
}
document.onfocusin=bluring;  

function imgon(img){
  var str=img.src;
//alert(img.src);
  var lnk = str.split("/");
  var num = lnk.length-1;
  img.src="/web/upload/on/"+lnk[num];
}

function imgout(img){
  var str=img.src;
  var lnk = str.split("/");  
  var num = lnk.length-1;
  img.src="/web/upload/"+lnk[num];
}

function open_window( filename, option, name )
{
	if( !name )
	{
		name = 'new'
	}


        win = window.open( filename, name, option );

        return win
}

function window_open( page, name, top, left, width, height )
{
	option = "'toolbar=no," +
		"location=no," +
		"directories=no," +
		"status=no," +
		"menubar=no," +
		"scrollbars=yes," +
		"resizable=yes," +
		"width=" + width + "," +
		"height=" + height + "," +
		"top=" + top + "," +
		"left=" + left + "'"

        window.open( page, name, option );
}

function open_poll_pop( mode, no )
{
	page = '/front/php/poll_r.php?mode=' + mode + '&no=' + no;
	window_open( page, 'poll', 100, 300, 466, 382 );
}

/*Left menu ¹ÝÅõ¸í ·¹ÀÌ¾î ±¸Çö*/
function Layer_overload(LayerName,Status) 
{
    if (navigator.appName == "Netscape")
    {
		LayerN = document.getElementById(LayerName).style;
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
    }	
    else
    {
		LayerN = document.all[LayerName].style;
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
    }
}

/*Left menu±¸Çö*/
var old='';

function menu(name)
{
	submenu=eval("submenu_"+name+".style");
	if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}


function Layer_rollover(img_name,img_url)
{
	var menu;	
	//tmp = new String( "document."+img_name );
	menu=eval("document."+img_name);		
	menu.src = img_url;
	return;
}

function image_zoom( product_no, main_cate_no, display_group )
{
	//href = '/front/php/image_zoom.php?img='+image+'&product_no='+document.frm.product_no.value;
	href = '/front/php/image_zoom.php?product_no='+product_no+'&main_cate_no='+main_cate_no+'&display_group='+display_group;
	option = 'toolbar=no,scrollbars=no,resizable=yes,width=800,height=640,left=0,top=0';
	win_name = 'image'

	window.open( href, win_name, option );
}


/*--------------------------------¿ìÃøµû¶ó´Ù´Ï±â---------------------------------*/

function QuickSlide(quick_limit_top, quick_margin_top, quick_margin_bottom, quick_speed){

    if(!quick_limit_top) quick_limit_top=0; // ÀüÃ¼ ÆäÀÌÁö ±âÁØ À§ÂÊ ÇÑ°è ÇÈ¼¿
    if(!quick_margin_top) quick_margin_top=0; // ÇöÀç º¸°í ÀÖ´Â È­¸é ±âÁØ À§ÂÊ ÇÑ°è ÇÈ¼¿
    if(!quick_margin_bottom) quick_margin_bottom=100; // ¾Æ·¡ÂÊ ÇÑ°è ÇÈ¼¿
    if(!quick_speed) quick_speed=10; // ÇÑ¹ø¿¡ ¿òÁ÷ÀÌ´Â ÇÈ¼¿ °£°Ý
	var dElement = (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
	
    w=document.getElementById("auto_slide");
    if(w){
		var pitch = (parseInt(dElement.scrollTop)+ parseInt(quick_margin_top)) - parseInt(w.style.top);
		if (pitch == 0) return;
		else nextPos = parseInt(w.style.top) + pitch / quick_speed;
		nextPos = (pitch > 0) ? Math.ceil(nextPos) : Math.floor(nextPos);

		var limitBottom = dElement.scrollHeight - parseInt(quick_margin_bottom)- parseInt(w.offsetHeight);

		if (quick_limit_top && nextPos < quick_limit_top) nextPos = quick_limit_top;
		if (limitBottom && nextPos  > limitBottom ) nextPos = limitBottom;
		if (nextPos < quick_margin_top) nextPos = quick_margin_top;
		if (isNaN(nextPos)) nextPos = 0;

		w.style.top = nextPos+"px";
    }
}

/*--------------------------------ÇÏ´Ü¶Ù¿ì±â---------------------------------*/

if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){
    cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
}else{
    cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
}

var cot_tl_bodyCSS='* html {background:url(/web/upload/images/blank.gif) fixed;background-repeat: repeat;background-position: right bottom;}';
var cot_tl_fixed2CSS='#cot_tl_fixed2{position:fixed;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'_position:absolute;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'z-index:10000;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'width:100%;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'text-align:center;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'bottom:0px;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'right:0px;';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+'clip:rect(0 100% 100% 0);';
var cot_tl_fixed2CSS=cot_tl_fixed2CSS+cot_t1_DOCtp;

document.write('<style type="text/css">'+cot_tl_bodyCSS+cot_tl_fixed2CSS+'</style>');

function large(){ 
 document.all['seachDiv'].style.height = 220; 
} 
function small(){ 

 document.all['seachDiv'].style.height = 34; 
} 

function rankingPoplarge()
{ 
 document.all['rankingPopDiv'].style.height = 222; 
} 

function rankingPopSmall()
{ 
 document.all['rankingPopDiv'].style.height = 22; 
} 

function img_tr(id,imgname) 
{ 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+imgname+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
} 
function reviewlarge(){ 
 document.all['reviewDiv'].style.height = 70; 
} 
function reviewsmall(){ 
 document.all['reviewDiv'].style.height = 20; 
} 
function footerlarge(){ 
 document.all['cot_tl_fixed2'].style.height = 238; 
} 
function footersmall(){ 
 document.all['cot_tl_fixed2'].style.height = 35; 
} 
function mlarge(){ 
 document.all['topDiv'].style.height = 310; 
} 
function msmall(){ 
 document.all['topDiv'].style.height = 123; 
}
function leftlarge(){ 
 document.all['cot_tl_fixed3'].style.width = 430; 
} 
function leftsmall(){ 
 document.all['cot_tl_fixed3'].style.width = 250; 
}



/*--------------------------------½ÃÀÛÆäÀÌÁö·Î---------------------------------*/

function pageSet(obj) {
	obj.style.behavior='url(#default#homepage)';
	obj.setHomePage('http://atsome.co.kr');
}


/*--------------------------------Áñ°ÜÃ£±âÃß°¡---------------------------------*/
function bookmarksite(title,url) { 
title=parent.document.title;
url=parent.location.href;
   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(document.all) // ie
   window.external.AddFavorite(url, title); 
}


/*--------------------------------ÆäÀÌÂ¡---------------------------------*/
function list_change() {
	var TargetElement = document.getElementById("normal_paging");
	var InContent = TargetElement.innerHTML;
                  InContent = InContent.replace("align=", "0");
		InContent = InContent.replace("ÀÌÀü", "<img src=/web/upload/images/btn_prev.gif border=0 >");
		InContent = InContent.replace("´ÙÀ½ ", "<img src=/web/upload/images/btn_next.gif border=0 >");
for(var i=0;i<20;i++){
		InContent = InContent.replace("] [", "<img src=/web/upload/images/blank.gif width=7 height=1>");
		//InContent = InContent.replace("]", "<img src=/web/upload/images/blank.gif width=3 height=1>");
}
for(var i=0;i<20;i++){
		InContent = InContent.replace("[", "<img src=/web/upload/images/blank.gif width=3 height=1>");
		InContent = InContent.replace("]", "<img src=/web/upload/images/blank.gif width=3 height=1>");
}

	TargetElement.innerHTML = InContent;
};
