
function hrefMList(lcla_cd, mcla_cd) { //v2.0
  window.location.href = "/priceList.do?mode=mcla&lcla_cd="+lcla_cd+"&mcla_cd="+mcla_cd;
  
}

function hrefITList(lcla_cd, mcla_cd, itemst_cd) { //v2.0
  window.location.href = "/priceList.do?mode=item&item_cd=&ltd_cd=&itemsub_cd=&lcla_cd="+lcla_cd+"&mcla_cd="+mcla_cd+"&itemst_cd="+itemst_cd;
  
}


function alignList(lcla_cd, mcla_cd, itemst_cd,align) { //v2.0
  window.location.href = "/priceList.do?mode=item&lcla_cd="+lcla_cd+"&mcla_cd="+mcla_cd+"&itemst_cd="+itemst_cd+"&aling="+align;
  
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  itemDetail=window.open(theURL,winName,features);
  
}

function graWin(j_itemst_cd,j_item_cd,j_itemsub_cd,j_ltd_cd,j_areaclas_cd,j_saleclas_cd) {
	sTop  = (screen.availHeight - 620) / 2;
	sLeft = (screen.availWidth  - 400) / 2;

	var url = "itemDetail.do?p_itemst_cd="+j_itemst_cd+"&p_item_cd="+j_item_cd+"&p_itemsub_cd="+j_itemsub_cd+"&p_ltd_cd="+j_ltd_cd+"&p_areaclas_cd="+j_areaclas_cd+"&p_saleclas_cd="+j_saleclas_cd;
    MM_openBrWindow(url, 'garWin', 'width=618,height=750,alwaysRaised=yes,scrollbars=yes');
}

function graWinDetail(page, j_itemst_cd,j_item_cd,j_itemsub_cd,j_ltd_cd,j_areaclas_cd,j_saleclas_cd) {
	sTop  = (screen.availHeight - 620) / 2;
	sLeft = (screen.availWidth  - 400) / 2;
	var url=page+"p_itemst_cd="+j_itemst_cd+"&p_item_cd="+j_item_cd+"&p_itemsub_cd="+j_itemsub_cd+"&p_ltd_cd="+j_ltd_cd+"&p_areaclas_cd="+j_areaclas_cd+"&p_saleclas_cd="+j_saleclas_cd;
	window.open(url,"garWin","width=618,height=710,top=" + sTop + ",screenY=" + sTop + ",left=" + sLeft + ",screenX=" + sLeft + ",scrollbars=yes,status=yes");
}

function productWin(prod_cd,itemst_cd,item_cd,itemsub_cd,ltd_cd,item_name) {
	sTop  = (screen.availHeight - 620) / 2;
	sLeft = (screen.availWidth  - 400) / 2;
	var url = "/productDetail.do?mode=detailMain&prod_cd="+prod_cd+"&itemst_cd="+itemst_cd+"&item_cd="+item_cd+"&itemsub_cd="+itemsub_cd+"&ltd_cd="+ltd_cd+"&lcla_name=&mcla_name=&itemst_name=&item_name="+item_name;
    MM_openBrWindow(url, 'garWin', 'width=618,height=710,alwaysRaised=yes,scrollbars=yes');
}

function companyWin(ltd_cd) {
	sTop  = (screen.availHeight - 620) / 2;
	sLeft = (screen.availWidth  - 400) / 2;
	var url = "/companyItemDetail.do?mode=&ltd_cd="+ltd_cd;
    
    
    MM_openBrWindow(url, 'garWin', 'width=600,height=710,alwaysRaised=yes');
}


function usedCarPriceWin(maker,car_name) {
	sTop  = (screen.availHeight - 620) / 2;
	sLeft = (screen.availWidth  - 400) / 2;
	var url = "/priceUsedCar.do?mode=price&maker="+maker+"&car_name="+car_name;
    MM_openBrWindow(url, 'garWin', 'width=600,height=260,alwaysRaised=yes');
}


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 openCalendar(psElemtntID,piIndex)
{
	var iIndex=0;
	if(piIndex != null)
		iIndex = piIndex;
	try{window.calWin.close();}catch(exception){};
	
	window.openerItem=window.document.all(psElemtntID,iIndex);
	
	window.calWin=window.open('/common/jsp/calendar.jsp','c','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width=200,height=225');
	
	event.returnValue=false;
}

function contentPrint() {
    var windowLeft = (screen.width-640)/2;
    var windowTop = (screen.height-480)/2;
    var printURL = "/common/jsp/forPrint.html";

    window.open(printURL,"pop_print",'width=740, height=500, menubar=yes, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
}

function contentPrintIframe() {
    var windowLeft = (screen.width-640)/2;
    var windowTop = (screen.height-480)/2;
    var printURL = "/common/jsp/forPrint.jsp";

    window.open(printURL,"pop_print",'width=700, height=500, menubar=yes, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
}

function contentPrint1() {
    var windowLeft = (screen.width-640)/2;
    var windowTop = (screen.height-480)/2;
    var printURL = "/common/jsp/forPrint1.jsp";

    window.open(printURL,"pop_print",'width=700, height=500, menubar=yes, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
}

function MainNewsPup(BoardId) {
	var windowLeft = (screen.width-640)/2;
    var windowTop = (screen.height-480)/2;
    var printURL = "/boardRead.do?boardType=use02&mode=pup&boardID="+BoardId;

    window.open(printURL,"Main_NewPup",'width=740, height=650, toolbar =no, location=no, menubar=no, scrollbars=yes,status=no,resizable=yes,top=' + windowTop + ',left=' + windowLeft + '');
}