<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function img_winopen(img,idx)
{
   var cnj_width=700;
   var cnj_height=700;
   var cnj_width2=700;
   var cnj_height2=700;

  MM_openBrWindow('/popup/vw_image.asp?w='+cnj_width+'&h='+cnj_height+'&idx='+idx+'&img='+img,'win_view','scrollbars=yes,resizable=no,width='+cnj_width2+',height='+cnj_height2+'');
}


function cnj_win_view(img,idx){
  img_conf1= new Image();
  img_conf1.src=(img);
  cnj_view_conf(img,idx);
}

function cnj_view_conf(img,idx){
  if((img_conf1.width!=0)&&(img_conf1.height!=0)){
    cnj_view_img(img,idx);
  }
  else{
    funzione="cnj_view_conf('"+img+"','scrollbars=yes,resizable=no,width=700,height=700')";
    intervallo=setTimeout(funzione,20);
  }
}

var cnj_img_view = null;
function cnj_view_img(img,idx){

    if(cnj_img_view != null) {
      if(!cnj_img_view.closed) { 
      cnj_img_view.close(); 
      }
    }

  cnj_width=img_conf1.width;
  cnj_height=img_conf1.height;
  cnj_width2=img_conf1.width+30;
  cnj_height2=img_conf1.height+20;
//  str_img="width="+cnj_width+",height="+cnj_height;
  MM_openBrWindow('/popup/vw_image.asp?w='+cnj_width+'&h='+cnj_height+'&idx='+idx+'&img='+img,'view','scrollbars=yes,resizable=yes,width='+cnj_width2+',height='+cnj_height2+'');

//  alert(str_img);
}


var sRepeat=null; 

function doScrollerIE(dir, src, amount) { 

if (amount==null) amount=10; 
if (dir=="up") 
document.all[src].scrollTop-=amount; 
else 
document.all[src].scrollTop+=amount; 
if (sRepeat==null) 
sRepeat = setInterval("doScrollerIE('" + dir + "','" + src + "'," + amount + ")",100); 
return false 
} 
window.document.onmouseout = new Function("clearInterval(sRepeat);sRepeat=null"); 
window.document.ondragstart = new Function("return false"); 



function adjustImage(target_img, mw, mh)
{
    var newX, newY;
    var newHeight, newWidth;
    var newImg;

    var maxWidth = mw;
    var maxHeight = mh;

    newImg = new Image();
    newImg.src = target_img.src;
    imgw = newImg.width;
    imgh = newImg.height;
/*
    if (imgw*1.2 >= imgh) {
    	return false;
    }
*/
    if (imgw > maxWidth || imgh > maxHeight)
    {
        if(imgw > imgh)
        {
            if(imgw > maxWidth)
                newWidth = maxWidth;
            else
                newWidth = imgw;
            newHeight = Math.round((imgh*newWidth)/imgw);
        }
        else
        {
            if(imgh > maxHeight)
                newHeight = maxHeight;
            else
                newHeight = imgh;
            newWidth = Math.round((imgw*newHeight)/imgh);
        }
    }
    else
    {
        newWidth = imgw;
        newHeight = imgh;
    }
    newX = maxWidth/2 - newWidth/2;
    newY = maxHeight/2 - newHeight/2;

	target_img.onload = null;
	target_img.src = newImg.src;
	target_img.width = newWidth;
	target_img.height = newHeight;
}

function goto_site() {
	chk = document.siteform.site.options[document.siteform.site.selectedIndex].value;
	window.open(chk,"","")
}


function searchVal(theForm)
{
	if (theForm.p_total_item.value == "") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		theForm.p_total_item.focus();
		return false;
	}
	return true;
}
//-->
