
function allblur() {
         for (i = 0; i < document.links.length; i++)
              document.links[i].onfocus = document.links[i].blur;
    }
	
function changeImg(target, imgURL){
	document.all(target).src = imgURL
}

//·Ñ¿À¹ö

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_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_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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//·¹ÀÌ¾î º¸¿©ÁÖ±â ¼û±â±â
ns = (document.layers)? true:false
ie = (document.all)? true:false

function show(id) {
if (ns) document.layers[id].visibility = "visible"
else if (ie) document.all[id].style.visibility = "visible"
}

function hide(id) {
if (ns) document.layers[id].visibility = "hidden"
else if (ie) document.all[id].style.visibility = "hidden"
}


//trÃ¤·Î º¸¿©ÁÖ±â ¼û±â±â (³ôÀÌ ¸øÁ¤ÇÏ´Â°æ¿ì)
		ie2 = (document.all)? true:false
		
		function show2(id) {
			if (ie2) document.all[id].style.display = 'block'
		}
		
		function hide2(id) {
			if (ie2) document.all[id].style.display = 'none'
		}

/********* ¸¶¿ì½º¸¦ ´ë¾úÀ»¶§ÀÇ ¼¿ ¹è°æ»ö ************/
function myColor(num) {
  if (document.all) {
    eval('document.all.cell'+num+'.style.background = "#FAFAFA"');
  }
}

/********* ¸¶¿ì½º¸¦ ¶¼¾úÀ»¶§ÀÇ ¼¿ ¹è°æ»ö ************/
function myColorOut(num) {
  if (document.all) {
    eval('document.all.cell'+num+'.style.background = "#FFFFFF"');
  }
}

/*Á¦Ç° ÆË¾÷*/
function popup(product){
	Window  =  window.open('popup.jsp?product='+product,'popup','scrollbars=no,resizable=no,width=542,height=454,left=10,top=10'); 
}

// ¿ë    µµ: ¼±ÅÃµÈ ¶óµð¿À¹öÆ°ÀÌ ÀÖ´ÂÁö Ã¼Å©
// return :  boolean ÀÖÀ¸¸é true, ¾øÀ¸¸é false

function hasCheckedRadio(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 checkNumber(obj, message) {
    var valid = obj.value.isNumber();
    if (!valid) {
        alert(message);
        obj.focus();
    }

    return valid;
}


function popLogin(){
	alert('·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä');
	window.open('/member/pop_login.jsp','loginPop','width=510,height=350');
}

function popLoginNoAlert(){
	window.open('/member/pop_login.jsp','loginPop','width=510,height=350');
}

function popContactus(){
	window.open('/common/pop_contact.jsp','','width=510, height=511, left=10, top=10');
}

function popEmailInfo(){
	window.open('http://lgcare.com/care/join/email_info.jsp','','scrollbars=no,resizable=no,copyhistory=no,width=510,height=320');
}

function popAgreement(){
	window.open('http://lgcare.com/care/join/agreement_info.jsp','','scrollbars=yes,resizable=no,copyhistory=no,width=635,height=750');
}

function popPersonalInfo(){
	window.open('http://lgcare.com/care/join/personal_info.jsp','','scrollbars=yes,resizable=no,copyhistory=no,width=627,height=600');
}

function openNaturalPop(){
	var microPop = window.open("/micro/main.jsp", "Natural", "left=50, top=50, width=930, height=700");
	microPop.focus();
}

var targetWin = opener;
function checkOrientalWin(){
	try{
		targetWin.focus();
	}catch(exception){
		targetWin = createNewOrientalPop();
	}
}

function createNewOrientalPop(){
	var win = window.open("/", "oriental", "width=1000, height=700, toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes");
	return win;
}

function goURLOriental(url){
	checkOrientalWin();
	targetWin.location.href = url;
	targetWin.focus();
}