function Ltrim(strValue){
    while (strValue.length>0){
       if(strValue.charAt(0)==' '){
           strValue=strValue.substring(1,strValue.length);              
	   }
       else
          return strValue;	    
    }
	return strValue;
}
function onlyNumber(){
					if(  (event.keyCode>=96 && event.keyCode<=105) ||  (event.keyCode>47 && event.keyCode<58) || event.keyCode==8 || event.keyCode==16 || event.keyCode==116 || event.keyCode==18 || event.keyCode==9 ||(event.keyCode>=37 && event.keyCode<=40) || event.keyCode==46);
					else{
						event.returnValue=false;
					}
			   }
function NumberAndBar(){
					if( (event.keyCode==189) || (event.keyCode>=96 && event.keyCode<=105) || (event.keyCode==109) || (event.keyCode>47 && event.keyCode<58) || event.keyCode==8 || event.keyCode==16 || event.keyCode==116 || event.keyCode==18 || event.keyCode==9 ||(event.keyCode>=37 && event.keyCode<=40) || event.keyCode==46);
					else{
						event.returnValue=false;
					}
			   }
function onlyNumber1(){
					if( (event.keyCode>=96 && event.keyCode<=105) || (event.keyCode>47 && event.keyCode<58) || event.keyCode==8 || event.keyCode==16 || event.keyCode==116 || event.keyCode==18 || event.keyCode==9 ||(event.keyCode>=37 && event.keyCode<=40) || event.keyCode==46);
					else{
						event.returnValue=false;
					}
			   }
function golden(){
}

function golden(){	
	url = '../golden/main.html';
	window.open (url,'golden','width=800,height=600,menubars=no,scrollbars=no')
}

function  number_validate(theForm,comment)
{
     if (theForm.value != "") {
          var str=theForm.value;
          for (var i = 0; i< str.length; i++) {
			var ch = str.substring(i, i + 1);
				    
			if ( (ch<"0" || ch>"9") ) {
					alert(comment);					
					theForm.value="";
					theForm.focus();
					return ;
			}						
		}		
    }			
}	
function autotab(num,fromform,toform){
	var str = fromform.value.length;
	if(str == num)
	toform.focus();
}
function openfocus(theForm) 
{
	theForm.focus();
}
function onfocus_color(theform)
{
	theform.style.backgroundColor='#C0F375';
}
function onblur_color(theform)
{
	theform.style.backgroundColor='#FFFFFF'
}
function  null_chk(theForm,comment)
{
     if (theForm.value == "") {
         alert(comment);					
	 theForm.focus();
	 return (false);
    }			
}
function phoneCheck(input1,input2,input3,msg) {
	
	if (null_chk(input1,msg+"¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.") ==false){
		return false;
	}  
	if (input1.value.length < 2 ) {
		alert (msg+" ±¹¹øÀº 2ÀÚ¸® ÀÌ»óÀÔ´Ï´Ù.");
		input2.focus();
		return false;
	}

	if (null_chk(input2,msg+"¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.") ==false){
		return false;
	}  
	if (input2.value.length < 3 ) {
		alert (msg+" ¾ÕÀÚ¸®´Â 3ÀÚ¸® ÀÌ»óÀÔ´Ï´Ù.");
		input2.focus();
		return false;
	}
		
	if (null_chk(input3,msg+"¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.") ==false){
		return false;
	}
	if (input3.value.length != 4 ) {
		alert (msg+" µÞÀÚ¸®´Â 4ÀÚ¸®ÀÔ´Ï´Ù.");
		input3.focus();
		return false;
	}
	return true;
}

function cpCheck(input1,input2,input3,msg) {
	
	if (null_chk(input1,msg+"¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.") ==false){
		return false;
	}  
	if (input1.value.length < 3 ) {
		alert (msg+" ¾ÕÀÚ¸®´Â 3ÀÚ¸® ÀÌ»óÀÔ´Ï´Ù.");
		input2.focus();
		return false;
	}

	if (null_chk(input2,msg+"¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.") ==false){
		return false;
	}  
	if (input2.value.length < 3 ) {
		alert (msg+" °¡¿îµ¥ÀÚ¸®´Â 3ÀÚ¸® ÀÌ»óÀÔ´Ï´Ù.");
		input2.focus();
		return false;
	}
		
	if (null_chk(input3,msg+"¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.") ==false){
		return false;
	}
	if (input3.value.length != 4 ) {
		alert (msg+" µÞÀÚ¸®´Â 4ÀÚ¸®ÀÔ´Ï´Ù.");
		input3.focus();
		return false;
	}
	return true;
}
/** * Ã¼Å©¹Ú½º °è¿­ Ã¼Å© */
function checkedRadioButton(input) {
    if (input.length > 1) {
        for (var inx = 0; inx < input.length; inx++) {
            if (input[inx].checked) return true;
        }
    } else {
        if (input.checked) return true;
    }
    return false;
}
function loginchk() 
{
	alert("·Î±×ÀÎ ÈÄ ÀÌ¿ëÀÌ °¡´ÉÇÕ´Ï´Ù.");
	return;	
}

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 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_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_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 playMovie()    { document.all["mPlayer"].play(); }
	function stopMovie()    { document.all["mPlayer"].stop();}
	function pauseMovie()    { document.all["mPlayer"].pause(); }
	
	
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 

document.body.focus(); 
} 
document.onfocusin=bluring; 

function JS_viewObj(objhtml) { 
    document.write(objhtml); 
} 

//2006³â °¡À» ºñ³Ê½ºÇÁ·Î¸ð¼Ç ÆË¾÷À» À§ÇÑ ½ºÅ©¸³Æ®
function sofitevent_go() 
{ 
    window.open("http://www.venus.co.kr/sline/index.asp","sline","width=900,height=600");
}

//ºñ³Ê½º ÄÚµð ·¹½¼ ÁÂÃø ½ºÅ©¸³Æ®
function view_lesson(obj)
{
	if(obj=="1")
	{
		lessonOff.style.display="none";
		lessonOn.style.display="block";
	} else {
		lessonOff.style.display="block";
		lessonOn.style.display="none";

	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}