<!--
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.0
  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 && document.getElementById) x=document.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() { //v3.0
  var show_Layer;
  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;}
}

/** radio value check */
function checkValue(obj,val) {
	for(i=0;i<obj.length;i++) {
		if(obj[i].value==val) {
			obj[i].checked=true;
		}
	}
}

/**  */
function checkAll(obj, flag) {
	if(obj!=null){ // obj null check
		if(obj.length){	// length
			for(i=0;i<obj.length;i++) {
				obj[i].checked = flag;
			}
		} else {	// length
			obj.checked = flag;
		}
	}
}

/**  check */
function hasChecked(obj) {
	if(obj!=null) {                       // obj null check
		if(obj.length) {                  //
			for(i=0;i<obj.length;i++) {   //
				if(obj[i].checked==true) {
					return true;
				}
			}
		} else {                          // length
			if(obj.checked==true){
				return true;
			}
		}
	}
	return false;
}

/** comboboxselection value setting */
function selectValue(theObj, val) {
	var i = 0;
	for (i=0; i < theObj.length; i++) {
		if (theObj[i].value == val) {
			theObj[i].selected = true;
			break;
		}
	}
}

/** comboboselection value setting */
function selectValue2(theObj, val) {
	var i = 0;
	for (i=0; i < theObj.length; i++) {
		if (theObj[i].value.indexOf(":"+val+":") > 0) {
			theObj[i].selected = true;
			break;
		}
	}
}

/** combobox selection value¸¦ setting */
function selectValue5(theObj, val) {
	var i = 0;
	for (i=0; i < theObj.length; i++) {
		if (theObj[i].value.indexOf(val) >= 0) {
			theObj[i].selected = true;
			break;
		}
	}
}
/** combobox selection value setting */
function selectValue4(theObj, val) {
	var i = 0;
	for (i=0; i < theObj.length; i++) {
		if (theObj[i].text == val) {
			theObj[i].selected = true;
			break;
		}
	}
}

/** combobox selection value setting */
function selectValue3(theObj, val) {
	var i = 0;
	for (i=0; i < theObj.length; i++) {
		if (theObj[i].text == val) {
			theObj[i].selected = true;
			break;
		}
	}
}

/**  */
function openPostPop(fname, zip, addr1) {
	var dest = "/dwms/common/findZipcode.do?";
	var param = "";

	// form
	if(fname!=null && fname.length>0) {
		if(param.length>0) param += "&";
		param += "fname="+fname;
	}
	// 
	if(zip!=null && zip.length>0) {
		if(param.length>0) param += "&";
		param += "zip="+zip;
	}
	if(addr1!=null && addr1.length>0) {
		if(param.length>0) param += "&";
		param += "addr1="+addr1;
	}
	//var p = window.open(dest+param, "zipWin", "width=520, height=300, status=no, scrollbars=yes");
	var p = window.open(dest+param, "zipWin", "width=412,height=292, status=no, scrollbars=no");

}

/**  */
function openPostPop2(fname, zip1, zip2, addr1) {
	var dest = "/dwms/common/findZipcode.do?";
	var param = "";

	// form 
	if(fname!="") {
		if(param.length>0) param += "&";
		param += "fname="+fname;
	}
	// 
	if(zip1!="") {
		if(param.length>0) param += "&";
		param += "zip1="+zip1;
	}
	if(zip2!="") {
		if(param.length>0) param += "&";
		param += "zip2="+zip2;
	}
	if(addr1!="") {
		if(param.length>0) param += "&";
		param += "addr1="+addr1;
	}
	//var p = window.open(dest+param, "zipWin", "width=520, height=300, status=no, scrollbars=yes");
	var p = window.open(dest+param, "zipWin", "width=412,height=292, status=no, scrollbars=no");
}

/**

 */
function addOption(obj, name, val) {
	obj.options[obj.options.length] = new Option(name, val, false, false);
}

/**

 */
function addOptionWithIndex(idx, obj, name, val) {
	obj.options[idx] = new Option(name, val, false, false);
}

/**
 */
function delOption(obj) {
	if(obj.options.length==0) { // selec
		return 0;
	}
	if(obj.selectedIndex==-1) { // select
		return -1;
	}
	obj.options[obj.selectedIndex]=null;
}

/**  */
function chgDateFormat(obj, delim) {
	var date = obj.value;
	// delÀÌ '-'ÀÌ°í date°¡ 8ÀÚ¸®ÀÌ¸é¼­ ¼ýÀÚÀÌ¸é YYYY-MM-DD Çü½ÄÀ¸·Î dateº¯È¯
	if(date.length==8 && !isNaN(date)) {
		obj.value = date.substr(0,4)+delim+date.substr(4,2)+delim+date.substr(6,2);
	}

}

/**  */
function checkAll(obj, value) {
	if(obj!=null) {
		if(obj.length) {
			for(i=0;i<obj.length;i++) {
				obj[i].checked = value;
			}

		} else {
			obj.checked = value;
		}
	}
}

/**  check */
function hasChecked(obj){
	if(obj!=null){ //obj null check
		if(obj.length){	//length
			for(i=0;i<obj.length;i++){	//1 true return;
				if(obj[i].checked==true){
					return true;
				}
			}
		}else{	//length
			if(obj.checked==true){
				return true;
			}
		}
	}
	return false;
}

/**  check */
function howManyChecked(obj){
	var chkCnt = 0;
	if(obj!=null){ //obj null check
		if(obj.length){	//length
			for(i=0;i<obj.length;i++){	//1 true return;
				if(obj[i].checked==true){
					chkCnt++;
				}
			}
		}else{	//length
			if(obj.checked==true){
				chkCnt++;
			}
		}
	}
	return chkCnt;
}

/** Email Format Check */
function emailCheck(emailStr) {
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) {
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]


	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
	    return false
	}

	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) {
	   return false
	}
	return true;
}

//joomin@2004-06-17  javascript:goPopup('map.jsp','popup1','714','612','0','0');
function goPopup(url,name,w,h,s,r){
  strop = "width=" + w + ",height=" + h + ",scrollbars=" + s + ",toolbar=0,resizable=" + r;
  w=open(url, name, strop);
}

function document_link(arg) {
//window.location.href="#"+arg;
	document.location ="#"+arg;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/**  */
function clearInput(frm) {
	for(var i=0; i<frm.elements.length; i++) {
		frm.elements[i].value = "";
		if(frm.elements[i].checked) frm.elements[i].checked = false;
	}
}

/** Trim */
function Trim(s) {
  while (s.substring(0,1) == ' ') {
    s = s.substring(1,s.length);
  }
  while (s.substring(s.length-1,s.length) == ' ') {
    s = s.substring(0,s.length-1);
  }
  return s;
}


//****************** 
var stmnLEFT = 894; // 
var stmnGAP1 = 260; // 
var stmnGAP2 = 10; // 
var stmnBASE = 360;   //
var stmnActivateSpeed = 50; // 
var stmnScrollSpeed =1; //

var stmnTimer;


function ReadCookie(name) {
var label = name + "=";
var labelLen = label.length;
var cLen = document.cookie.length;
var i = 0;

while (i < cLen) {
var j = i + labelLen;

if (document.cookie.substring(i, j) == label) {
var cEnd = document.cookie.indexOf(";", j);
if (cEnd == -1) cEnd = document.cookie.length;
return unescape(document.cookie.substring(j, cEnd));
}
i++;
}
return "";
}

function SaveCookie(name, value, expire) {
var eDate = new Date();
eDate.setDate(eDate.getDate() + expire);
document.cookie = name + "=" + value + "; expires=" + eDate.toGMTString()+ "; path=/";
}

function RefreshStaticMenu() {
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;

stmnStartPoint = parseInt(STATICMENU.style.top, 10);
stmnEndPoint = document.body.scrollTop + stmnGAP2;
if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;

stmnRefreshTimer = stmnActivateSpeed;

if ( stmnStartPoint != stmnEndPoint ) {
stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
stmnRefreshTimer = stmnScrollSpeed;
}
stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}

function ToggleAnimate() {
if (!ANIMATE.checked) {
RefreshStaticMenu();
SaveCookie("ANIMATE", "true", 300);
} else {
clearTimeout(stmnTimer);
STATICMENU.style.top = stmnGAP1;
SaveCookie("ANIMATE", "false", 300);
}
}

function InitializeStaticMenu() {
STATICMENU.style.left = stmnLEFT;
if (ReadCookie("ANIMATE") == "false") {
ANIMATE.checked = true;
STATICMENU.style.top = document.body.scrollTop + stmnGAP1;
} else {
//ANIMATE.checked = false;
STATICMENU.style.top = document.body.scrollTop + stmnBASE;
RefreshStaticMenu();
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

	function fs_ShowRoom(v1,v2){
		var doc1	=	document.form1;
		var id		=	v1;
		//var url		=	"http://203.231.0.238:8080/dwms/sitemap/ssangyong/showroom.swf?vehicleID="+v1;
		//var url		=	"/dwms/sitemap/ssangyong/showroom.swf?vehicleID="+v1;
		//window.open(url,'showRoom','width=800,height=600,toolbar=no,status=no,scrollbars=no,resizable=no');

		var url		=	"/dwms/sitemap/ssangyong/popshowroom.jsp?vehicleID="+v1+"&showType="+v2;
		w=window.open(url,'showRoom','width=800,height=600,toolbar=no,status=no,scrollbars=no,resizable=no');
		w.focus();
	}

	function ER_ShowSsang(v1,v2){
		var doc1	=	document.form1;
		var url		=	"/dwms/showroom/ssangyong/popshowroom.jsp?vehicleID="+v1+"&showType="+v2;
		w=window.open(url,'showRoom','width=800,height=600,toolbar=no,status=no,scrollbars=no,resizable=no');
		w.focus();
	}

	function ER_ShowSaab(v1,v2){
		var doc1	=	document.form1;
		var url		=	"/dwms/showroom/saab/popshowroom.jsp?vehicleID="+v1+"&showType="+v2;
		w=window.open(url,'showRoom','width=800,height=600,toolbar=no,status=no,scrollbars=no,resizable=no');
		w.focus();
	}

	function ER_ShowCadillac(v1,v2){
		var doc1	=	document.form1;
		var url		=	"/dwms/showroom/cadillac/popshowroom.jsp?vehicleID="+v1+"&showType="+v2;
		w=window.open(url,'showRoom','width=800,height=600,toolbar=no,status=no,scrollbars=no,resizable=no');
		w.focus();
	}

	function ER_ShowBus(v1,v2){
		var doc1	=	document.form1;
		var url		=	"/dwms/showroom/bus/popshowroom.jsp?vehicleID="+v1+"&showType="+v2;
		w=window.open(url,'showRoom','width=800,height=600,toolbar=no,status=no,scrollbars=no,resizable=no');
		w.focus();
	}

	function ER_ShowTruck(v1,v2){
		var doc1	=	document.form1;
		var url		=	"/dwms/showroom/truck/popshowroom.jsp?vehicleID="+v1+"&showType="+v2;
		w=window.open(url,'showRoom','width=800,height=600,toolbar=no,status=no,scrollbars=no,resizable=no');
		w.focus();
	}


	function FS_GMOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("/dwms/showroom/index_gm.jsp","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}

	function FS_GENTRAOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=gentra&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}

	function FS_LACETTIOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=lacetti&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}

	function FS_MATIZOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=matiz&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}
	function FS_STATESMANOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=statesman&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}

	function FS_KALOSOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=kalos&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}
	function FS_REZZOOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=rezzo&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}
	function FS_MAGNUSOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://magnus.gmdaewoo.co.kr/magnus.html","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}
	function FS_TOSCAOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=tosca&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}
	function FS_DAMASOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=damas&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}

	function FS_LABOOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=labo&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}

	function FS_WINSTORMOPEN(){
		var intWidth = 1014
		var intHeight = 744
	  	var tempX = (screen.width/2)-(intWidth / 2)-5;
		var tempY = (screen.height/2)-(intHeight / 2)-12;
		window.open("http://www.hahang.com.cn/gmmcc.jsp?carID=winstorm&contentsID=brandpage","intro","left="+tempX+",top="+tempY+",width=1014,height=720,scrollbars=0,status=no");
	}

	// Á¨Æ®¶ó
	function fs_gogentra(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=gentra&contentsID=brandpage");
	}
	// ¶ó¼¼Æ¼
	function fs_golacetti(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=lacetti&contentsID=brandpage");
	}
	// ¸¶Æ¼Áî
	function fs_gomatiz(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=matiz&contentsID=brandpage");
	}
	// ½ºÅ×ÀÌÃ÷¸Ç
	function fs_gostatesman(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=statesman&contentsID=brandpage");
	}
	// ¶óº¸
	function fs_golabo(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=labo&contentsID=brandpage");
	}
	// ´Ù¸¶½º
	function fs_godamas(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=damas&contentsID=brandpage");
	}
	// ¸Å±×³Ê½º
	function fs_gomagnus(){
		location.replace("http://magnus.gmdaewoo.co.kr/magnus.html");
	}
	// Åä½ºÄ«
	function fs_gotosca(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=tosca&contentsID=brandpage");
	}
	// ·¹Á¶
	function fs_gorezzo(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=rezzo&contentsID=brandpage");
	}
	// Ä®·Î½º
	function fs_gokalos(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=kalos&contentsID=brandpage");
	}
	// À©½ºÅè
	function fs_gowinstorm(){
		location.replace("http://www.hahang.com.cn/gmmcc.jsp?carID=winstorm&contentsID=brandpage");
	}

	function swf(src,w,h){
		html = '';
		html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" id="param" width="'+w+'" height="'+h+'">';
		html += '<param name="movie" value="'+src+'">';
		html += '<param name="quality" value="high">';
		html += '<param name="wmode" value="transparent">';
		html += '<embed src="'+src+'" quality=high width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"><\/embed>';
		html += '<\/object>';
		document.write(html);
	}

	function swf2(src,w,h){
		html = '';
		html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" id="param" width="'+w+'" height="'+h+'">';
		html += '<param name="movie" value="'+src+'">';
		html += '<param name="quality" value="high">';
		html += '<embed src="'+src+'" quality=high width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"><\/embed>';
		html += '<\/object>';
		document.write(html);
	}

	function swf3(src,w,h,flashVars){
		html = '';
		html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+w+'" height="'+h+'">';
		html += '<param name="movie" value="'+src+'">';
		html += '<param name="quality" value="high">';
		html += '<param name="FlashVars" value="brand='+flashVars+'">';
		html += '<embed src="'+src+'" FlashVars="brand='+flashVars+'" quality=high width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"><\/embed>';
		html += '<\/object>';
		document.write(html);
	}

	function mcityMainSwf(src,w,h){
		html = '';
		html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" id="param" width="'+w+'" height="'+h+'" style="border: 4px solid #000000;">';
		html += '<param name="movie" value="'+src+'">';
		html += '<param name="quality" value="high">';
		html += '<param name="wmode" value="transparent">';
		html += '<embed src="'+src+'" quality=high width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"><\/embed>';
		html += '<\/object>';
		document.write(html);
	}
//****************** Äü¸Þ´º ³¡
//-->


//----------------------------------------- ÇÊµå Ã¼Å© ÇÔ¼ö ¸ðÀ½ -----------------------------------------//
// »ç¿ë¹ý : ÇÊ¼ö¿É¼Ç  - required Ãß°¡
//         ±æÀÌÃ¼Å©  - lengthchk="±æÀÌ"
//         Å¸ÀÔÃ¼Å©  - option="Å¸ÀÔ" (regNum,regPhone,regMail,regDomain,regAlpha,regHost,regHangul,regHangulEng,regHangulOnly,regId,regDate)
//        
function chkForm(f) {
    var i,currEl;

    for(i = 0; i < f.elements.length; i++){
        currEl = f.elements[i];
        //
        if (currEl.getAttribute("required") != null) {
            if(currEl.type.toUpperCase() == "TEXT" || currEl.tagName.toUpperCase() == "TEXTAREA" ||currEl.type.toUpperCase() == "PASSWORD"){
                if(!chkText(currEl,currEl.alertMsg)) return false;
            }else if(currEl.type.toUpperCase() == "CHECKBOX"){
                if(!chkCheckbox(f, currEl,currEl.alertMsg)) return false;
            }else if(currEl.type.toUpperCase() == "RADIO"){
                if(!chkRadio(f, currEl,currEl.alertMsg)) return false;
            }else if (currEl.tagName.toUpperCase() == "SELECT"){
                if(!chkSelect(f, currEl,currEl.alertMsg)) return false;
            }else if (currEl.type.toUpperCase() == "HIDDEN"){
                if(!chkHidden(currEl,currEl.alertMsg)) return false;
            }
        }
        //
        if(currEl.getAttribute("option") != null && currEl.value.length > 0){
            if(!chkPatten(currEl,currEl.option,currEl.alertMsg)) return false;
        }
        // 
        if(currEl.getAttribute("lengthchk") != null && currEl.value.length > 0){
            if(!chkLength(currEl,currEl.lengthchk,currEl.alertMsg)) return false;
        }
    }
    return true;
}

//
function chkPatten(field,patten,name) {
    var regNum =/^[0-9]+$/;
    var regPhone =/^[0-9]{2,3}-[0-9]{3,4}-[0-9]{4}$/;
    var regPostno =/^[0-9]{3}-[0-9]{3}$/;
    var regMail =/^[_a-zA-Z0-9-]+@[._a-zA-Z0-9-]+\.[a-zA-Z]+$/;
    var regDomain =/^[.a-zA-Z0-9-]+.[a-zA-Z]+$/;
    var regUrl =/^[.a-zA-Z0-9-]+.[a-zA-Z]+$/;
    var regAlpha =/^[a-zA-Z]+$/;
    var regHost =/^[a-zA-Z-]+$/;
    var regHangul =/[°¡-ÆR]/;
    var regHangulEng =/[°¡-ÆRa-zA-Z]/;
    var regHangulOnly =/^[°¡-ÆR]*$/;
    var regId = /^[a-zA-Z]{1}[a-zA-Z0-9_-]{4,12}$/;
    var regDate =/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;

    var patten_name = patten;
    patten = eval(patten);
    if(!patten.test(field.value)){
        alert("[" + name + "] 111111111111111."+getPattenEx(patten_name));
        field.focus();
        return false;
    }
    return true;
}

// 
function getPattenEx(patten) {
    var rv = "";

    switch(patten){
        case "regPhone":
            rv = "000-0000-0000";
            break;
        case "regMail":
            rv = "user_id@domain.com";
            break;
        case "regDomain":
            rv = "domain.com";
            break;
    }

    if(rv) rv = "\n\n11111111111111111. [ "+rv+" ]"

    return rv;
}

//
function getLength(str) {
    return (str.length + (escape(str) + "/%u").match(/%u/g).length-1);
}

//
function chkLength(field,length,name) {
    if(getLength(field.value) > length){
          alert(name + "\n\n11111111 "+length+"111111111"+(length/2)+"11111111111");
          field.focus();
          return false;
    }
    return true;
}

// 
function chkText(field, name) {
    if(field.value.length < 1){
          alert("["+ name + "] 1111111111111.");
          field.focus();
          return false;
    }
    return true;
}

// 
function chkHidden(field, name) {
    if(field.value.length < 1){
          alert(name);
          return false;
    }
    return true;
}


// 
function chkCheckbox(form, field, name) {
    fieldname = eval(form.name+'.'+field.name);
    if (!fieldname.checked){
          alert(name);
          field.focus();
          return false;
    }
    return true;
}

// 
function chkRadio(form, field, name) {
    fieldname = eval(form.name+'.'+field.name);
    for (i=0;i<fieldname.length;i++) {
          if (fieldname[i].checked)
                 return true;
    }
    alert("["+ name + "] 1111111111111.");
    field.focus();
    return false;
}

// 
function chkSelect(form, field, name){
    fieldname = eval(form.name+'.'+field.name);
    if(fieldname.options[fieldname.selectedIndex].text == "111111111" || fieldname.options[fieldname.selectedIndex].value == "" ){
        alert("["+ name + "] 1111111111.");
        return false;
    }
    return true;
}

function nr_han(this_s,type){ 
    /* 
    type 
    -> 'c' :
    -> 's' : 
    -> '' : 
    */ 
    temp_value = this_s.value.toString(); 
    regexp = ''; 
    repexp = ''; 
    switch(type){ 
        case 'c': regexp = /[^¤¡-¤¾°¡-ÆR]/g;break; 
        case 's': regexp = /[^¤¡-¤¾°¡-ÆR\s]/g;break; 
        case '':    regexp = /[^°¡-ÆR]/g; break; 
        default : regexp = /[^¤¡-¤¾°¡-ÆR\s]/g; 
    } 
    if(regexp.test(temp_value)) 
    { 
        temp_value = temp_value.replace(regexp,repexp); 
        this_s.value = temp_value; 
    } 
} 

/*-------------------------------------------------------------------------------*/ 

function nr_han_cho(this_s){ 
    nr_han(this_s,'c'); 
} 

