function objDetectBrowser() {
  var strUA, s, i;
  this.isIE = false;  // 인터넷 익스플로러인지를 나타내는 속성
  this.isNS = false;  // 넷스케이프인지를 나타내는 속성
  this.version = null; // 브라우저 버전을 나타내는 속성
  strUA = navigator.userAgent; 
  s = "MSIE";
  // Agent 문자열(strUA) "MSIE"란 문자열이 들어 있는지 체크
  if ((i = strUA.indexOf(s)) >= 0) {
    this.isIE = true;
    // 변수 i에는 strUA 문자열 중 MSIE가 시작된 위치 값이 들어있고,
    // s.length는 MSIE의 길이 즉, 4가 들어 있다.
    // strUA.substr(i + s.length)를 하면 strUA 문자열 중 MSIE 다음에 
    // 나오는 문자열을 잘라온다.
    // 그 문자열을 parseFloat()로 변환하면 버전을 알아낼 수 있다.
    this.version = parseFloat(strUA.substr(i + s.length));
    return;
  }
 
  s = "Netscape6/";
  // Agent 문자열(strUA) "Netscape6/"이란 문자열이 들어 있는지 체크
  if ((i = strUA.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(strUA.substr(i + s.length));
    return;
  }
 
  // 다른 "Gecko" 브라우저는 NS 6.1로 취급.
 
  s = "Gecko";
  if ((i = strUA.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var objDetectBrowser = new objDetectBrowser();
if(objDetectBrowser.isIE == true){
	document.write("<div id=topnavi><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,1\" width="+swf_width+" height="+swf_height+" id=\""+swf_id+"\" align=\"left\">");
	document.write("<param name=\"allowScriptAccess\" value=\"always\" />");
	document.write("<param name=\"movie\" value=\""+swf_name+"\" />");
	document.write("<param name=\"quality\" value=\"high\" />");
	document.write("<param name=\"bgcolor\" value=\"transparent\" />");
	document.write("<param name=\"wmode\" value=\"transparent\" />");
	document.write("<param name=\"id\" value=\""+swf_id+"\" />");
	if(flashVarArray.length>0){
		var flashVarStr = "";
		for(var i = 0; i<flashVarArray.length; i++){
			flashVarStr += flashVarArray[i][0]+"="+flashVarArray[i][1]
			if(i<flashVarArray.length-1){
				flashVarStr += "&";
			}
		}
		document.write("<param name=\"flashVars\" value=\""+flashVarStr+"\" />");
		document.write("<embed src=\""+swf_name+"?"+flashVarStr+"\" quality=\"high\" wmode=\"transparent\" bgcolor=\"transparent\" width="+swf_width+"  height="+swf_height+"  id=\""+swf_id+"\" name=\""+swf_id+"\" align=\"left\" allowScriptAccess=\"always\" swLiveConnect=\"true\" type=\"application/x-shockwave-flash\" pluginspage=\"http://get.adobe.com/kr/flashplayer\" />");
	}else{
		document.write("<embed src=\""+swf_name+"\" quality=\"high\" wmode=\"transparent\" bgcolor=\"transparent\" width="+swf_width+"  height="+swf_height+"  id=\""+swf_id+"\" name=\""+swf_id+"\" align=\"left\" allowScriptAccess=\"always\" swLiveConnect=\"true\" type=\"application/x-shockwave-flash\" pluginspage=\"http://get.adobe.com/kr/flashplayer\" />");
	}
	document.write("</object></div>")
}else{
	if(flashVarArray.length>0){
		var flashVarStr = "";
		for(var i = 0; i<flashVarArray.length; i++){
			flashVarStr += flashVarArray[i][0]+"="+flashVarArray[i][1]+"&";
		}
		document.write("<embed src=\""+swf_name+"?"+flashVarStr+"\" quality=\"high\" wmode=\"transparent\" bgcolor=\"transparent\" width="+swf_width+"  height="+swf_height+"  id=\""+swf_id+"\" name=\""+swf_id+"\" align=\"left\" allowScriptAccess=\"always\" swLiveConnect=\"true\" type=\"application/x-shockwave-flash\" pluginspage=\"http://get.adobe.com/kr/flashplayer\" />");
	}else{
		document.write("<embed src=\""+swf_name+"\" quality=\"high\" wmode=\"transparent\" bgcolor=\"transparent\" width="+swf_width+"  height="+swf_height+"  id=\""+swf_id+"\" name=\""+swf_id+"\" align=\"left\" allowScriptAccess=\"always\" swLiveConnect=\"true\" type=\"application/x-shockwave-flash\" pluginspage=\"http://get.adobe.com/kr/flashplayer\" />");
		
	}
}


