function viewFlash(filename,width,height,query,id){
	flashStr = '<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=\"'+id+'\" ALIGN=\"\">';
	flashStr += '<PARAM NAME=movie VALUE=\"'+filename+'\">';
	flashStr += '<PARAM NAME=quality VALUE=high>';
	flashStr += '<PARAM NAME=wmode VALUE=transparent>';
	flashStr += '<PARAM NAME=bgcolor VALUE=#FFFFFF>';
	flashStr += '<PARAM name=\"flashvars\" value=\"'+query+'\"/>';
	flashStr += '<EMBED src=\"'+filename+'\" flashvars=\"'+query+'\" quality=high wmode=transparent menu=false bgcolor=#FFFFFF  WIDTH=\"'+width+'\" HEIGHT=\"'+height+'\" NAME=\"'+filename+'\" ALIGN=\"\"  id=\"'+id+'\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\">';
	flashStr += '</OBJECT>';
	document.write(flashStr);
}

function scriptFlash(filename,width,height,query,id){
	flashStr3 = '<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=\"'+id+'\" ALIGN=\"\">';
	flashStr3 += '<PARAM NAME=movie VALUE=\"'+filename+'\">';
	flashStr3 += '<PARAM NAME=quality VALUE=high>';
	flashStr3 += '<PARAM NAME=wmode VALUE=transparent>';
	flashStr3 += '<PARAM NAME=bgcolor VALUE=#FFFFFF>';
	flashStr3 += '<PARAM name=\"flashvars\" value=\"'+query+'\"/>';
	flashStr3 += '<EMBED src=\"'+filename+'\" flashvars=\"'+query+'\" quality=high wmode=transparent menu=false bgcolor=#FFFFFF  WIDTH=\"'+width+'\" HEIGHT=\"'+height+'\" NAME=\"'+filename+'\" ALIGN=\"\"  id=\"'+id+'\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\">';
	flashStr3 += '</OBJECT>';
	return flashStr3;
}
function imgChg(obj,name,extra){
	obj.src = name+""+extra+".gif";

}

var global_dragging=false;
var global_debugmode=false;
var Browser=new browserCheck();
function browserCheck(){
	var agt=navigator.userAgent.toLowerCase();
	var is_major=parseInt(navigator.appVersion);
	var is_minor=parseFloat(navigator.appVersion);
	var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));
	var is_ie3=(is_ie&&(is_major<4));
	var is_ie4=(is_ie&&(is_major==4)&&(agt.indexOf("msie 4")!=-1));
	var is_ie4up=(is_ie&&(is_major>=4));
	var is_ie5=(is_ie&&(is_major==4)&&(agt.indexOf("msie 5.0")!=-1));
	var is_ie5_5=(is_ie&&(is_major==4)&&(agt.indexOf("msie 5.5")!=-1));
	var is_ie5up=(is_ie&&!is_ie3&&!is_ie4);
	var is_ie5_5up=(is_ie&&!is_ie3&&!is_ie4&&!is_ie5);
	var is_ie6=(is_ie&&(is_major==4)&&(agt.indexOf("msie 6.")!=-1));
	var is_ie6up=(is_ie&&!is_ie3&&!is_ie4&&!is_ie5&&!is_ie5_5);
	var is_xp=((agt.indexOf("windows")!=-1)&&(agt.indexOf("5.1")!=-1));
	var is_xp_sp2=(is_xp&&(agt.indexOf("sv1")!=-1));
	this.is_ie=is_ie;
	this.is_ie5up=is_ie5up;
	this.is_ue5_5up=is_ie5_5up;
	this.is_ie6up=is_ie6up;
	this.is_xp=is_xp;
	this.is_xp_sp2=is_xp_sp2;
}
var NS4;
var IE6;
if (document.all){
    IE6 = true;
    NS4 = false;
}else{
    IE6 = false;
    NS4 = true;
}

isWin = (navigator.appVersion.indexOf("Win") != -1)

/* ÆË¾÷ °ü·Ã ÇÔ¼ö */
function open_window(url, name, width, height,option){
        var windowX = Math.ceil( (window.screen.width  - width) / 2 );
        var windowY = Math.ceil( (window.screen.height - height) / 2 );
        window.open(url, name, ",width=" + width +",height=" + height+",left="+windowX+",top="+windowY + ",resizable=no,"+option);
}

function finAddr(frmname,frm1,frm2,frm3,frm4){
 open_window("/common/etc/find_addr.php?frmname="+frmname+"&frm1="+frm1+"&frm2="+frm2+"&frm3="+frm3+"&frm4="+frm4, 'find_addr', 430, 300,"scrollbars=no")

}
function strCut(str,byteLength) {	 //¸î±ÛÀÚ ÀÌ»ó µÇ¸é ..À» ºÙ¿©ÁØ´Ù.
	var strOld = str;
	str = strLenCnt(str,byteLength);
	if (str!=strOld) {
		str = str+'..';
	}
	return str;
}
function strLenCnt(str,lengths)	//¹®ÀÚ¿­ÀÇ Æ¯Á¤ ±æÀÌ¸¦ ¹ÝÈ¯ÇÑ´Ù.
{
  var len = 0;
  var newStr = '';
  
  for (var i=0;i<str.length; i++) {
    var n = str.charCodeAt(i);
    var nv = str.charAt(i);
    if ((n>= 0)&&(n<256)) {
      len ++;
    } else {
      len += 2;
	}

	if (len>lengths)
		break;
	else
		newStr = newStr + nv;
  }

  return newStr;
}

function nextFieldGo(frm, curfield, nxfield, maxlen){

	var v_len = frm[curfield].value.length;

	if (v_len >= maxlen){
		frm[nxfield].focus();
	} else {
		return ;
	}
}
 function cookieVal(cookieName){
	thisCookie = document.cookie.split("; ");
	for(i=0; i<thisCookie.length; i++){
	if(cookieName == thisCookie[i].split("=")[0]){
	return thisCookie[i].split("=")[1];
	}
	}
	return "x";
}
