function MakeFlashString(source,id,width,height,wmode, otherParam)
{	
	return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" /><param name=movie value="+source+" /><param name=quality value=high />"+otherParam+"<embed src="+source+" quality=high wmode="+wmode+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
}

function openMenu(){document.getElementById('Layer1').style.display='';}
function closeMenu(){document.getElementById('Layer1').style.display='none';}

function POP_Family()
{ 
    window.open('/new/family/list.asp', 'pop', 'width=800 height=610');
}

function POP_Custom()
{ 
    window.open('/new/custom/list.asp', 'pop', 'width=820 height=670');
}


function SetInnerHTML(target, code)
{ 
	target.innerHTML = code; 
}

function MakeObjectString(classid, codebase, name, id, width,height, param)
{
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
}

function swf(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,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 += '<param name="menu" value="false">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" wmode="Transparent" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

function swf_main(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="param" width="100%" height="100%">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="wmode" value="Transparent">';
	html += '<param name="menu" value="false">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" wmode="Transparent" width="100%" height="100%" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}



function swf_val(src,w,h,title){
	
	var ieVersion	= navigator.appName

	if (ieVersion == "Microsoft Internet Explorer"){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,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 += '<param name="menu" value="false">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" wmode="Transparent" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"><\/embed>';
	html += '<\/object>';
	document.write(html);
	}else{
		html = '<span class="flash">' + title + '</span>';
		document.write(html);
	}
}

function flash_cart(src,w,h,title){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,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 += '<param name="menu" value="false">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" wmode="Transparent" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"><\/embed>';
	html += '<\/object>';
	document.write(html);
}



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 Show_layer(lname){
	document.getElementById(lname).style.display = "block";
	document.getElementById(lname).style.visibility = "visible";
}

function Hide_layer(lname){
    document.getElementById(lname).style.display = "none";
	document.getElementById(lname).style.visibility = "hidden";
}


//¸µÅ©Á¡¼±
function bluring(){ 
if(event.srcElement.tagName=="A"|| event.srcElement.tagName=="IMG") document.body.focus(); 

} 
document.onfocusin=bluring; 

// Customizing Trim ÇÔ¼ö
	String.prototype.trim = function(){
		return this.replace(/(^ *)|( *$)|/g, "");
		}

// ÇÑ±Û 1ÀÚ ¸¦ ¿µ¹® 2ÀÚÃ³·³ ÀÎ½ÄÇÏµµ·Ï... À½..±×´Ï±ñ...¹ÙÀÌÆ®·Î ÀÎ½ÄÇÏµµ·Ï..ok??
	function GetByteLen(s){
		var l=0;
  		for(var i=0;i<s.length; i++) 
		if(escape(s.charAt(i)).length>3) l+=2; else l++;
  		return l;
		}

// ±ÛÀÚ¼ö Ã¼Å©
	function lencheck(frm, nm, min, max, type, txt){
		var opttxt = '(';
		switch(type){
			case 'NUM':
				opttxt = opttxt + '¼ýÀÚ ';
				if (min != 0){
					opttxt = opttxt + 'ÃÖ¼Ò ' + min + 'ÀÚ¸® ~ ';
					}
				opttxt = opttxt + 'ÃÖ´ë ' + max + 'ÀÚ¸® ÀÔ·Â °¡´É)';
				break;
			case 'KOR':
				opttxt = opttxt + 'ÇÑ±Û ';
				if (min != 0){
					opttxt = opttxt + 'ÃÖ¼Ò ' + (min/2) + 'ÀÚ¸® ~ ';
					}
				opttxt = opttxt + 'ÃÖ´ë ' + (max/2) + 'ÀÚ¸® ÀÔ·Â °¡´É\n';
				break;
			case 'ENG':
				opttxt = opttxt + '¿µ¹® ';
				if (min != 0){
					opttxt = opttxt + 'ÃÖ¼Ò ' + min + 'ÀÚ¸® ~ ';
					}
				opttxt = opttxt + 'ÃÖ´ë ' + max + 'ÀÚ¸® ÀÔ·Â °¡´É)';
				break;
			}
		
		if (GetByteLen(eval(frm+'.'+nm+'.value')) > max || GetByteLen(eval(frm+'.'+nm+'.value')) < min){
			alert(txt + ' ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä.\n' + opttxt);
			eval(frm+'.'+nm+'.value = ""');
			eval(frm+'.'+nm+'.focus()');
			return false;
			}
			
		return true;
		}

// Æû Ã¼Å©
	function sendcheck(frm, nm, txt){
		if (eval(frm+'.'+nm+'.value.trim() == ""')){
			alert(txt+' ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
			eval(frm+'.'+nm+'.value = ""');
			eval(frm+'.'+nm+'.focus()');
			return false;
			}
		return true;
		}

// ¸ÞÀÏÁÖ¼Ò Ã¼Å©
	function isEmail(s){
		return s.search(/^\s*[\w\~\-\.]+\@[\w\~\-]+(\.[\w\~\-]+)+\s*$/g)>=0;
		}
	
// È®ÀåÀÚ Ã¼Å©
	function extCheck(frm, clm, ext){
		var str = eval(frm + '.' + clm + '.value');
		
		if (ext.indexOf(':') > 0){
			var tmp = ext.split(':');
			
			var chknum = 0;
			for (i=0; i<tmp.length; i++){
				if (str.substr(str.lastIndexOf('.') + 1, str.length - str.lastIndexOf('.')).toLowerCase() == tmp[i]){
					chknum = 1;
					//break;
					}
				}
			if (chknum == 0){
				alert('Áö¿øµÇÁö¾Ê´Â Æ÷¸ËÀÇ È­ÀÏÀÔ´Ï´Ù.');
				return false;
				}
			}
		else{
			if (str.substr(str.lastIndexOf('.') + 1, str.length - str.lastIndexOf('.')).toLowerCase() != ext){
				alert('Áö¿øµÇÁö¾Ê´Â Æ÷¸ËÀÇ È­ÀÏÀÔ´Ï´Ù.');
				return false;
				}
			}

		return true;
		}
		
function go_view_atmain(tb, sq, idx, url, way){
	switch(way){
		case 1:	//comm
			if(sq == 41)
			{
			location.href = "/community/comm_hit_pro.asp?pt=LS&tb=" + tb + "&seq=" + sq + "&idx="+ idx + "&url=" + url;
			}
			else
			{
			location.href = "/community/comm_hit_pro.asp?pt=VW&tb=" + tb + "&seq=" + sq + "&idx="+ idx + "&url=" + url;
			}
			break;
		case 2:	//pds
			location.href = "/point/pointshop_pds_hit_pro.asp?pt=VW&tb=" + tb + "&seq=" + sq + "&idx="+ idx;
			break;
		}
	}

function onlyNumber(){
	if((event.keyCode<48)||(event.keyCode>57))
	event.returnValue=false;
	}
	
//´ÙÀ½Ä­À¸·Î ÀÌµ¿
function move_next(o_current, o_next){
		if(o_current.value.length == o_current.maxLength){
			o_next.select();
			o_next.focus();
		}
		return;
	}
