function 
    clrImg(obj){
        obj.style.backgroundImage="";obj.onkeydown=obj.onmousedown=null;
    }

//********************플래시**************************//
function FlashInsert(FlashIDName, FlashFileName, FlashWidth, FlashHeight)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
	document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
	document.write('width="'+FlashWidth+'" height="'+FlashHeight+'" id="'+FlashIDName+'" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="'+FlashFileName+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="ShowControls" value="0" />');
	document.write('<embed src="'+FlashFileName+'" quality="high" width="'+FlashWidth+'" height="'+FlashHeight+'" name="'+FlashIDName+'" ');
	document.write('align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" ');
	document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function playmovie(file,width,height,autostrart,ShowControl,Tracker,name){
        document.write('<object width="'+width+'" height="'+height+'" id="'+name+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,5,0803" standby="Loading Microsoft Windows Media Player components..."  type="application/x-oleobject" >');  
        document.write('<param name="FileName" value="'+file+'" />');
        document.write('<param name="ShowControls" value="'+ShowControl+'" />');
        document.write('<param name="AutoStart" value="'+autostrart+'" />');
		document.write('<param name="ShowTracker" value="'+Tracker+'" />');
        document.write('<embed width="'+width+'" height="'+height+'" name="'+name+'" FileName="'+file+'" AutoStart="true" >	</embed>');
        document.write('</object>')
}

//*******************펼침 리스트************************//
function menuClose(level1nav) {
  if (is_ie) {
      // if you're leaving a level1 or 2 elelent 
      // turn off the bg color of the level one nav		
      for (i=1; i <= 5; i++)      document.all["menu"+i].style.visibility='hidden';
  }
  else {
      if (is_nav5up) {
	  for (i=1; i <= 5; i++)  document.getElementById("menu"+i).style.visibility='hidden';
      }
      else {
	  for (i=1; i <=5; i++)   document.layers["menu"+i].visibility='hidden';
      }
  }
  shadowMenuClose();
}

//*********************html없이 새창띄워 이미지 보기*********************//
 function view(x,y,z){
  newin=window.open('',y,z);
  newin.document.write("<html><head><title>:: 우수업체 제품소개 ::</title></head><body background='"+x+"' onclick='self.close()' style='cursor:hand' title='CLOSED'></body></html>");
 }

//*********************레이어팝업창*********************//
function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}
function NewWindowOpen(uri,width,height,top,left){
	if(uri !="")
		window.open(uri,"",scrollbars=no,menubar=no,statusbar=no,width="+width+",height="+height+",top="+top+",left="+left+");
}

//*********************이미지 롤오버*********************//
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

//*********************검색 숨김/펼침*********************//
var w=window; var d=document;
var nav=navigator.appName.indexOf("Microsoft");
var referrer=top.document.referrer
var D=new Date(); 
var Exp=new Date(); Ta=(D.getYear()<1900)?1903:3; Exp.setYear(D.getYear()+Ta);

function STBinit() {
    STBs=new String(); STBs=cookie("PopupMin");
    Ta=new Array(); if(STBs!=null){Ta=STBs.split("&");}
    STBa=new Array(); 
    for(x in Ta){ Tb=new Array();Tb=Ta[x].split(":");STBa[Tb[0]]=Tb[1];}
}

function SetC(n){ if(typeof(STBa)!="object") STBinit(); d.write((STBa[n]==1)?"<tr id=\""+n+"\" style=\"display:none\">":"<tr id=\""+n+"\">"); }

function STB(n){STBs=new String();STBa[n]=(STBa[n]==1)?0:1;
    Exp=new Date(); Ta=1; Ta+=(D.getYear()<1900)?1900:0; Exp.setYear(D.getYear()+Ta);
    for(id in STBa){STBs+=(STBa[id]==1)?"&"+id+":1":"";}
        d.cookie="PopupMin="+escape(STBs.substr(1))+"; expires="+Exp.toGMTString();
    if(nav>=0){Ta=eval(n).style.display;
    switch(Ta) { ///아래부분에서 눌렀을때 펼쳐지고 다시눌렀을 때 닫힘조절--초기상태 닫힘
        case "block": eval(n).style.display = "none"; break; 
        case "": eval(n).style.display = "none";
        default : eval(n).style.display = "block"; }}
    else{d.location.reload();}
}

function cookie(n){Ta=d.cookie.indexOf(n+"=");Tb=Ta+n.length+1;
    if((Ta==-1)||((!Ta)&& (n != d.cookie.substring(0,n.length)))) return null;
        Tc=d.cookie.indexOf(";",Tb);if(Tc==-1)Tc=d.cookie.length;
    return unescape(d.cookie.substring(Tb,Tc));}

function cookie_s(n,v,e,r){ 
    d.cookie=escape(n)+"="+escape(v)+"; expires="+e.toGMTString(); if(r)d.location.reload(); }


//*********************링크점선 안보이기*********************//
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring;

//*********************메인 탑메뉴 TAB*********************//
function DisplayMenu(index) {
		var thisMenu = eval("document.getElementById('menu"+index+"').style");
        for (i=1; i<=3; i++)
        if (index == i) {
        thisMenu = eval("document.getElementById('menu"+index+"').style");
        thisMenu.display = "block";
        } 
        else {
        otherMenu = eval("document.getElementById('menu"+i+"').style"); 
        otherMenu.display = "none"; 
        }
        }

//*********************메인 TAB1메뉴*********************//
function DisplayTab(index) {
        for (i=1; i<=2; i++)
        if (index == i) {
        thisTab = eval("tab" + index + ".style");
        thisTab.display = "";
        } 
        else {
        otherTab = eval("tab" + i + ".style"); 
        otherTab.display = "none"; 
        }
        }

//*********************메인 TAB2메뉴*********************//
function DisplayTbb(index) {
        for (i=1; i<=2; i++)
        if (index == i) {
        thisTbb = eval("tbb" + index + ".style");
        thisTbb.display = "";
        } 
        else {
        otherTbb = eval("tbb" + i + ".style"); 
        otherTbb.display = "none"; 
        }
        }

//*********************메인 탑메뉴 -서브메뉴 텍스트링크*********************//
function highlight(which,color){
    if (document.all||document.getElementById)
    which.style.backgroundColor=color
}

//*********************암호변경팝업*********************//
function pw_modify_win() {
     window.open("pw_modify.htm", "", "width=500, height=300, status=1");
//	 self.opener = self;
//	 self.close();
}

//*********************쪽지쓰기팝업*********************//
function message_win() {
     window.open("message.htm", "", "width=537, height=474, status=1");
//	 self.opener = self;
//	 self.close();
}

//*********************고객조회팝업*********************//
function user_win() {
     window.open("user_find.htm", "", "width=820, height=337, status=1");
//	 self.opener = self;
//	 self.close();
}

//*********************상세보기팝업*********************//
function details_win() {
     window.open("details_view.htm", "", "width=1065, height=600, status=1, scrollbars=1");
//	 self.opener = self;
//	 self.close();
}

//*********************선택 테이블 색상변경*********************//
function bg_Change(obj)
{
	for(i = 0; i < bgColor_Table.rows.length ; i++)
		{
			if( obj == bgColor_Table.rows[i])
				bgColor_Table.rows[i].bgColor = "#FBDED5";
			else
				bgColor_Table.rows[i].bgColor = "";
	}
}
function bg_Change1(obj)
{
	for(i = 0; i < bgColor_Table1.rows.length ; i++)
		{
			if( obj == bgColor_Table1.rows[i])
				bgColor_Table1.rows[i].bgColor = "#FBDED5";
			else
				bgColor_Table1.rows[i].bgColor = "";
	}
}
function bg_Change2(obj)
{
	for(i = 0; i < bgColor_Table2.rows.length ; i++)
		{
			if( obj == bgColor_Table2.rows[i])
				bgColor_Table2.rows[i].bgColor = "#FBDED5";
			else
				bgColor_Table2.rows[i].bgColor = "";
	}
}
function bg_Change3(obj)
{
	for(i = 0; i < bgColor_Table3.rows.length ; i++)
		{
			if( obj == bgColor_Table3.rows[i])
				bgColor_Table3.rows[i].bgColor = "#FBDED5";
			else
				bgColor_Table3.rows[i].bgColor = "";
	}
}
function bg_Change4(obj)
{
	for(i = 0; i < bgColor_Table4.rows.length ; i++)
		{
			if( obj == bgColor_Table4.rows[i])
				bgColor_Table4.rows[i].bgColor = "#FBDED5";
			else
				bgColor_Table4.rows[i].bgColor = "";
	}
}
function bg_Change5(obj)
{
	for(i = 0; i < bgColor_Table5.rows.length ; i++)
		{
			if( obj == bgColor_Table5.rows[i])
				bgColor_Table5.rows[i].bgColor = "#FBDED5";
			else
				bgColor_Table5.rows[i].bgColor = "";
	}
}
