///////////////////////////////////////////
// IE activeX patch
// author Jackie Lee (jackie72@korea.com)
// http://www.motiongr.com
// create date 2007.06.19
// version 1.0
// ¹èÆ÷½Ã À§³»¿ëÀ» Æ÷ÇÔÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù
///////////////////////////////////////////

//flash(Ãâ·Â¿µ¿ªID¹×NAME,ÇÃ·¡½ÃÆÄÀÏ°æ·Î,WIDTH,HEIGHT,FLASHVARS,BackgroundColor,WMOD)

function LoginGo(){
	window.open("https://www.lgart.com/ssl/Login.aspx", "login", "Width=350,Height=350,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
}

function flash(fid,fnm,wid,hei,fvs,bgc,wmd) {
	var flash_tag = "";
	flash_tag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+wid+'" height="'+hei+'" id="'+fid+'" align="middle">';
	flash_tag +='<param name="allowScriptAccess" value="always" />';
	flash_tag +='<param name="allowFullScreen" value="false" />';
	flash_tag +='<param name="movie" value="'+fnm+'" />';
	flash_tag +='<param name="FlashVars" value="'+fvs+'" />';
	flash_tag +='<param name="quality" value="high" />';
	flash_tag +='<param name="bgcolor" value="'+bgc+'" />';
	flash_tag +='<param name="wmode" value="'+wmd+'" />';
	flash_tag +='<embed src="'+fnm+'" quality="high" bgcolor="'+bgc+'" FlashVars="'+fvs+'" wmode="'+wmd+'" width="'+wid+'" height="'+hei+'" name="'+fid+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	flash_tag +='</object>';
	
	document.write(flash_tag);
}

function Flashse(url, width, height)
{
	document.write("<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'");
	document.write("height='" + height + "' width='" + width + "' align='middle'>");
	document.write("<PARAM NAME='Movie' VALUE='" + url +"'>");
	document.write("<PARAM NAME='Src' VALUE='" + url +"'>");
	document.write("<PARAM NAME='WMode' VALUE='Transparent'>");
	document.write("<EMBED SRC='" + url + "' quality='high' WMode='Transparent' bgcolor='#ffffff' width='" + width + "' height='" + height + "' align='middle' allowScriptAccess='sameDomain'");
	document.write("type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
	document.write("</OBJECT>");
}	

function Media(id, name, url, width, height)
{
	document.write("<OBJECT id='" + id + "' name='" + name + "' type='application/x-oleobject' height='" + height +"' width='" + width + "' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'>");
	document.write("<PARAM NAME='Filename' VALUE='" + url + "'>");
	document.write("<PARAM NAME='AutoStart' VALUE='1'>");
	document.write("<PARAM NAME='AnimationAtStart' VALUE='0'>");
	document.write("<PARAM NAME='DisplayMode' VALUE='4'>");
	document.write("<PARAM NAME='Enabled' VALUE='true'>");
	document.write("<PARAM NAME='ShowControls' VALUE='0'>");
	document.write("<PARAM NAME='ShowAudioControls' VALUE='0'>");
	document.write("<PARAM NAME='ShowDisplay' VALUE='0'>");
	document.write("<PARAM NAME='ShowGotoBar' VALUE='0'>");
	document.write("<PARAM NAME='ShowPositionControls' VALUE='0'>");
	document.write("<PARAM NAME='ShowStatusBar' VALUE='0'>");
	document.write("<PARAM NAME='Volume' VALUE='0'>");
	document.write("<PARAM NAME='ShowCaptioning' VALUE='0'>");
	document.write("<PARAM NAME='TransparentAtStart' VALUE='1'>");
	document.write("<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='" + id + "' name='" + name + "' height='" + height + "' width='" + width + "' src='" + url + "' invokeurls=false displaysize='4' autosize='0'  showcontrols='0' showdisplay='0' showstatusbar='0' animationatstart='1' displaymode='4' enabled='true' filename='" + url + "' showaudiocontrols='0' showgotobar='0' showpositioncontrols='0' volume='0' showcaptioning='0' transparentatstart='1'></embed>");
	document.write("</OBJECT>");
}	

function autotab(input,len, e) {
				var keycd = e.keyCode;
				var filter = [0,8,9,16,17,18,37,38,39,40,46];
				
				if(input.value.length >= len && !iscontain(filter, keycd))
				{
					input.value = input.value.slice(0, len);
					input.form[(getindex(input)+1) % input.form.length].focus();
				}
}


function iscontain(filter, keycd) {
			var found = false;
			var index = 0;

			while(!found && index < filter.length)
		    
				if(filter[index] == keycd) found = true;
				else index++;

			return found;
		}
  		
		function getindex(input) {
			var index = -1;
			var i = 0;
			var found = false;

			while (i < input.form.length && index == -1)

			if (input.form[i] == input)index = i;
			else i++;

			return index;
			return true;
		}  	
		
		
// DreamWeaver Script
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 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; }
}

function COPop(url, width, height) {
	LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
	var path= url;

	settings='width='+width+',height='+height+',top='+TopPosition+',left='+LeftPosition+',location=no,toolbar=no,menubar=no';
	window.open(path, "", settings);
}


function COPop(url, width, height, scroll) {
	LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
	var path= url;

	settings='width='+width+',height='+height+',top='+TopPosition+',left='+LeftPosition+',location=no,toolbar=no,menubar=no,scrollbars='+scroll;
	window.open(path, "", settings);
}

	