<!--
	function selAll(){				
		var field=document.listform.dataid;	
		
		if (field != undefined) {
			if (field.length == undefined) {
				field.checked=true;	
			}	else {				
				for (j=0; j<field.length; j++)
					field[j].checked=true;									
			}	
		}
		
		cf = 'true';		
	}	
				
	function deSelAll() {
		var field=document.listform.dataid;
		
		if (field != undefined) {
			if (field.length == undefined) {
				field.checked=false;	
			}
			else {
			 	for (j=0; j<field.length; j++)
					field[j].checked=false;				
			}				
  		}
  	  	
		cf = 'false';		  	
	}
	
	
	var cf = 'false';	
	function checkAll() {
		if (cf == 'true') {
			deSelAll();
			cf = 'false';
		} else {
			selAll();
			cf = 'true';
		}			
	}


	function selAll2(){				
		var field=document.listform.dataid;	
		var allChk=document.listform.allChk;	
		
		if (field != undefined) {
			if (field.length == undefined) {
				field.checked=true;	
			}	else {				
				for (j=0; j<field.length; j++)
					field[j].checked=true;									
			}	
		}
		
		allChk.checked = true;
		cf2 = 'true';		
	}	
				
	function deSelAll2() {
		var field=document.listform.dataid;
		var allChk=document.listform.allChk;	
		
		if (field != undefined) {
			if (field.length == undefined) {
				field.checked=false;	
			}
			else {
			 	for (j=0; j<field.length; j++)
					field[j].checked=false;				
			}				
  		}
  	  	
		allChk.checked = false;
		cf2 = 'false';		  	
	}
	
	
	var cf2 = 'false';	
	function checkAll2() {
		if (cf2 == 'true') {
			deSelAll2();
			cf2 = 'false';
		} else {
			selAll2();
			cf2 = 'true';
		}			
	}		

	
	function addFolder() {		
		var f = document.listform;				
		//folderWindow = window.open("","folderwin","width=420,height=260,scrollbars=yes,resizable=yes");				
		//f.target="folderwin";			
		f.action = "/common/addToFolder2.cfm";				
		f.submit();				
	}
		
	function addCatalogFolder() {		
		var f = document.listform;		
		//folderWindow = window.open("","folderwin","width=420,height=260,scrollbars=yes,resizable=yes");				
		//f.target="folderwin";			
		f.action = "/common/addToCFolder.cfm?type=catalog";				
		f.submit();				
	}
	
	function addBizFolder() {
		var f = document.listform;
		//folderWindow = window.open("","folderwin","width=420,height=260,scrollbars=yes,resizable=yes");				
		//f.target="folderwin";			
		f.action = "/common/addToBFolder.cfm";				
		f.submit();				
	}
		
	function deleteFolder() {
		f = document.listform;
		count = 0;
		if (f.dataid.length) {
			for (i=0;i<f.dataid.length;i++)
				if (f.dataid[i].checked) {
					count = count + 1;
					break;
				}
		} else {
			if (f.dataid.checked)
				count = count + 1;
		}
		if (count > 0) {		
			f.actdelete.value = '1';			
			f.submit();
		} else {
			alert("You should select at least one to delete.");
		}		
	}		
	
	function Pagethru(page){
		document.pt_p.pageno.value=page;
		document.pt_p.submit();
	}
	
	function doOptimize() {
		document.pt_p.foptimize.value='0';
		document.pt_p.pageno.value='1';		
		document.pt_p.submit();
	}	
	
	function filterDate(indate) {
		document.pt_p.findate.value=indate;
		document.pt_p.pageno.value="1";
		document.pt_p.submit();
	}
	
	function filterFsc() {
		document.pt_p.ffsc.value = document.filterform.ffsc[document.filterform.ffsc.selectedIndex].value;
		document.pt_p.pageno.value="1";
		document.pt_p.submit();
	}	
	
	function filterState() {
		document.pt_p.fregion.value = document.filterform.fregion[document.filterform.fregion.selectedIndex].value;
		document.pt_p.pageno.value="1";
		document.pt_p.submit();
	}	
	
	function filterGov() {
		document.pt_p.fgov.value = document.filterform.fgov[document.filterform.fgov.selectedIndex].value;
		document.pt_p.pageno.value="1";
		document.pt_p.submit();
	}


	function checkboxChk(field){
					
		var ischeck = false;

		if (field != undefined) {
			if (field.length == undefined) {
				if (field.checked) ischeck=true;	
			}else {				
				for (j=0; j<field.length; j++) {
					if (field[j].checked) {
						ischeck=true;										
						break;
					}
				}
			}	
		}
		return ischeck;
	}


	function actDel(next_url, title){

		var f = document.listform;
		var field = f.dataid;	
		var ischeck = false;
		
		ischeck = checkboxChk(field);
		
		if (ischeck) {
		
			if (confirm("Are you sure you want to delete?")) {      
				f.action  = next_url;
				f.submit();
			}
		} else {
			alert("No "+title+"(es) selected. Please select at least one "+title+" and try again.");
		}

	}
	

	function add(nextPage, companyid){
		location.href= nextPage+'?companyid='+companyid;
	}
	
// ----------------------------------------
// @ ÀÌ¹ÌÁö URLÀ» ÀÔ·ÂÇÏ°í ¹öÆ°À» Å¬¸¯ÇÏ¸é,
// ÀÌ¹ÌÁö »çÀÌÁî¿¡ ¸Â°Ô »õÃ¢À» ¶ç¿ì°í (ÀÌ¹ÌÁö ·ÎµùÀÌ ³¡³ª¸é »õÃ¢ »çÀÌÁî°¡ ÀÚµ¿ Á¶Àý)
// ÇØ´ç »õ Ã¢¿¡¼­ ±×¸²À» Å¬¸¯ÇÏ¸é »õ Ã¢ÀÌ ÀÚµ¿À¸·Î ´ÝÈü´Ï´Ù.
// ----------------------------------------
	function showPicture(src, windowName) {
	  var imgObj = new Image();
	  imgObj.src = src;	  
	  var wopt = "scrollbars=no,status=no,resizable=no";
	  wopt += ",width=" + imgObj.width;
	  wopt += ",height=" + imgObj.height;
	  var wbody = "<head><title>"+windowName+"</title>";
	  wbody += "<script language='javascript'>";
	  wbody += "function finalResize(){";
	  wbody += "  var oBody=document.body;";
	  wbody += "  var oImg=document.images[0];";	  	  
	  wbody += "  var xdiff=oImg.width-oBody.clientWidth;";
	  wbody += "  var ydiff=oImg.height-oBody.clientHeight;";	  
	  wbody += "  window.resizeBy(xdiff,ydiff);";
	  wbody += "}";
	  wbody += "</"+"script>";
	  wbody += "</head>";
	  wbody += "<body onLoad='finalResize()' style='margin:0'>";
	  wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
	  wbody += "</body>";
	  winResult = window.open("about:blank","",wopt);
	  winResult.document.open("text/html", "replace");
	  winResult.document.write(wbody);
	  winResult.document.close();	  
	  
	  var li_a_width  = window.screen.availWidth;  
   	var li_a_height = window.screen.availHeight; 
   	var li_width    = winResult.document.body.clientWidth; 
   	var li_height   = winResult.document.body.clientHeight;   	
   	
   	winResult.moveTo((li_a_width - li_width)/2,(li_a_height - li_height)/2);
   	
	  return;
	}	
	
  function showPictureNS(src, windowName) {
	  var imgObj = new Image();
	  imgObj.src = src;	  
	  var wopt = "scrollbars=no,status=no,resizable=no";
	  wopt += ",width=" + imgObj.width;
	  wopt += ",height=" + imgObj.height;
	  var wbody = "<head><title>"+windowName+"</title>";
	  wbody += "<script language='javascript'>";
	  wbody += "function finalResize(){";
	  wbody += "  var oBody=document.body;";
	  wbody += "  var oImg=document.images[0];";	  		  
	  wbody += "  var xdiff=oImg.width;";
	  wbody += "  var ydiff=oImg.height;";
	  wbody += "  window.resizeTo(xdiff,ydiff);";
	  wbody += "  window.moveTo(300,200);";	  
	  wbody += "}";
	  wbody += "</"+"script>";
	  wbody += "</head>";
	  wbody += "<body onLoad='finalResize()' style='margin:0'>";
	  wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
	  wbody += "</body>";
	  winResult = window.open("about:blank","",wopt);
	  winResult.document.open("text/html", "replace");
	  winResult.document.write(wbody);
	  winResult.document.close();	   	  
	  
	  return;
	}


// ----------------------------------------
// @ °´Ã¼¸¦ disabled ? true : false
// ----------------------------------------
function chkDisabled(name, mode)
{
	name.disabled = mode;  

	return;
}

function viewCompany(id) {
	window.open("/vendor_directory/view.htm?companyid="+id,"comwin","width=860,height=640,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,resizable=0,location=yes,menu=no");		
}
//-->