
//È­¸é µðÀÚÀÎ¿¡ ÇÊ¿äÇÑ ½ºÅ©¸³Æ® ¸ðÀ½

String.prototype.trim = function(){
		return this.replace(/(^\s*)|(\s*$)/g,"");
	};

String.prototype.delMask = function(){
	var comma = /,/gi;
	var slash = /\//gi;
	var hipen = /-/gi;
	var collon = /:/gi;
	if( this.length == 0 ) {
		return "";
	}
	return this.replace(comma,'').replace(slash,'').replace(hipen,'').replace(collon,'');
};

function doThis(ovout,idname) {
	 if (ovout=='ov'){
	   document.getElementById(idname).className="s_ov";
	   document.getElementById(idname).style.Color="#6e523c";

	 } else if (ovout=='out'){
	   document.getElementById(idname).className="s_out";
	 }

}
//¼¿·ºÆ®¹Ú½º

function show_top_navi(){
	if(document.getElementById("opt_list").style.display == "block"){
		document.getElementById("opt_list").style.display = "none";
	}
	else{
		document.getElementById("opt_list").style.display = "block";
	}
}

function div_search(val){
	var val;
	document.getElementById("search_option").innerHTML = val;
	document.getElementById("opt_list").style.display = "none";
	document.getElementById("search_option").innerHTML = val;
}


function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}
//ÁÜ¾Æ¿ô
function ZoomIn()
{
	var doc = top.document;
	var element;

	if (doc.body.style.zoom == 0) {
		doc.body.style.zoom = 1.1;
	}else {
		doc.body.style.zoom *= 1.1;

	}
}

function ZoomOut()
{
	var doc = top.document;
	var element;

	if (doc.body.style.zoom != 1) {
		doc.body.style.zoom /= 1.1;
	}
}
function ZoomDefault()
{
	var doc = top.document;
	var element;

		doc.body.style.zoom = 1;
}


// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, À©µµ¿ì¸ðµå)
function flashWrite(url,w,h,id,bg,win,text){

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<object title='"+text+"' 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='movie' value='"+url+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);

}


	
var browserName = navigator.appName; 

var menutop=-472
var pace=30

var vorzeimenu1=-1
var vorzeimenu2=-1

var step;
//var direction
var pause=5;

var thismenu;
var vorzeichen=1;

var menuismoving="no";


function inite() {

	//document.getElementById("menu1").style.top=menutop+'px'

}


function getmenuname(clickedmenu) {
    if (menuismoving=="no") {
        thismenu=document.getElementById(clickedmenu).style;
        step=pace;
        checkdirection();
		changeRollover(clickedmenu);
        movemenu(clickedmenu);
    }
}

function changeRollover(clickedmenu) {
	var view_btn = document.getElementById(clickedmenu+"_open");
	var thismenu = document.getElementById(clickedmenu).style;
	var onoff = eval("vorzei" + clickedmenu);

	if (onoff>0) {
		if (view_btn.tagName=="IMG") { view_btn.src = view_btn.src.replace(clickedmenu+"_open.gif", clickedmenu+"_close.gif");}
//		thismenu.zIndex=100;
//		document.getElementById("main_banner").style.display="none";

	}else {
		if (view_btn.tagName=="IMG") { view_btn.src = view_btn.src.replace(clickedmenu+"_close.gif", clickedmenu+"_open.gif");}
//		thismenu.zIndex=0;
//		document.getElementById("main_banner").style.display="block";
	}
}

function checkdirection(clickedmenu) {

	if (thismenu==document.getElementById('menu1').style){vorzeimenu1=vorzeimenu1*-1;vorzeichen=vorzeimenu1}
    menuismoving="yes"
}


function movemenu() {

	if (step>=0) {
		thismenu_p = parseInt(thismenu.top);
		aaa = thismenu_p += step*vorzeichen;
		thismenu.top=aaa+'px';
		step--
		var movetimer=setTimeout("movemenu()",pause);
	}
	else {
		menuismoving="no";
		clearTimeout(movetimer);
	}
}

//ÇªÅÍ Á¡ÇÁ¸Þ´º
function go_site(val){
  if ( val != "") {
  window.open(val,'_blank');
  }
}
//¼¿·ºÆ®¹Ú½º

function show_top_navi(){
	if(document.getElementById("opt_list").style.display == "block"){
		document.getElementById("opt_list").style.display = "none";
	}
	else{
		document.getElementById("opt_list").style.display = "block";
	}
}

function div_search(val){
	var val;
	document.getElementById("search_option").innerHTML = val;
	document.getElementById("opt_list").style.display = "none";
	document.getElementById("search_option").innerHTML = val;
}


function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function mouse_on(obj,gbn) {
	if (gbn=="on"){   			
		obj.style.border = "1px solid #aaff00"; 
	}else{
		obj.style.border = "1px solid #000000";	
	}
}

function viewall(opt) {
	if (opt=="on"){   			
		document.getElementById("m_viewall_back").style.display = "block";
	}else{
		document.getElementById("m_viewall_back").style.display = "none";
	}
}


function  viewFlash(sURL, sName, sFeatures){ 
	//ÇÃ·¡½Ã ActiveX ¿ÀºêÁ§Æ®¸¦ »Ñ·ÁÁÝ´Ï´Ù. 
	var FLASHCAB = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"; 
	var FLASHCID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000"; 
	var FLASHVER = "8,0,0,0"; 
	
	var sFeature; 
	var sWidth  = "100%"; 
	var sHeight  = "100%"; 
	var pmBoolean = "false"; 
	var sTempArray; 
	var sParamTag = ""; 
	
	sFeature = sFeatures.split(/\s*,\s*/); 
	for (var i=0; i< sFeature.length ; i++) { 
		sTempArray = sFeature[i].split(/\s*=\s*/); 
		if (sTempArray[0].toLowerCase() == "width"){ 
			//³ÐÀÌ 
			sWidth = sTempArray[1]; 
		}else if (sTempArray[0].toLowerCase() == "height"){ 
			//³ôÀÌ 
			sHeight = sTempArray[1]; 
		}else{ 
			//±âÅ¸ ÆÄ¶ó¸ÞÅÍ Ã³¸® 
			if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true"){ 
				pmBoolean = "true"; 
			}else if (sTempArray[1].toLowerCase() == "no" || sTempArray[1] == "0" || sTempArray[1].toLowerCase() == "false"){ 
				pmBoolean = "false"; 
			}else{ 
				pmBoolean = sTempArray[1]; 
			} 
			sParamTag = "<PARAM NAME='"+sTempArray[0]+"'VALUE='" + pmBoolean + "'>\n"+sParamTag; 
		} 
	} 
	document.write("<OBJECT ID='"+sName+"' NAME='"+sName+"' CLASSID='"+FLASHCID+"' CODEBASE='"+FLASHCAB+"#version="+FLASHVER+"' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"'>"); 
	document.write("<PARAM NAME='movie' VALUE='" + sURL + "'>"); 
	document.write(sParamTag); 
	document.write("<EMBED SRC='"+sURL+"' MENU='false' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"' ID='"+sName+"' NAME='"+sName+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer' />") 
	document.write("</OBJECT>"); 
 } 