﻿<!--	
	function showWin(link, w, h){  
	   var winObject=null;	
	   var fw = (screen.width-w)/2;
	   var fh = (screen.height-h)/2;  
        winObject=window.open(link,'','scrollbars=1,width='+ w +',height='+ h +',top='+fh+',left='+fw);	
	}

	function showDialog(link, w, h){
		var fw = (screen.width-w)/2;
	  	var fh = (screen.height-h)/2;  
		window.showModalDialog(link,window,"dialogWitdth="+ w +"px;dialogHeight="+ h +"px;dialogTop="+ fh +";dialogLeft="+ fw +";help:no;status:no;channelmode:yes;");
	}
	
	function showFrm(frm, acf, w, h){
		winName = "winshow";
		var fw = (screen.width-w)/2;
		var fh = (screen.height-h)/2; 
		window.open('about:blank', winName,'toolbar=no,menubar=no,status=no,scrollbars=1,width='+ w +',height='+ h +',top='+fh+',left='+fw);		
		frm.target = winName;		
		if(acf.length!=0){ frm.action = acf; }
		frm.submit();
	}
	
	function submitFrm(frm, acf, exec){
		if(acf.length!=0){ frm.action = acf; }
		frm.exec.value = exec;
		frm.target = "_self";
		frm.submit();
	}

	function goPage(frm, p){
		frm.pageNo.value = p;
		frm.submit();
	}
	
	function DelUrl(execUrl){
		if(confirm('您確定要刪除資料嗎?')){			
			showWin(execUrl, 15, 15);
		}
	}
	
	function DelFrm(execFrm){
		if(confirm('您確定要刪除資料嗎?')){			
			execFrm.exec.value = "d";
			execFrm.submit();
		}
	}
	
	function frmSort(str){
		document.searchfrm.sort.value = str;
		document.searchfrm.submit();
	}
	
	function ItemChange(frm){
		frm.submit();	
	}

	function selectAll(Objaction, Obj, frm){
		var i = 0;
		for(i=0;i<frm.elements.length;i++){
			if(frm.elements[i].type=="checkbox" && frm.elements[i].name==Obj){
				frm.elements[i].checked = Objaction;
			}
		}
	}
	
	function viewPage(url, v1){
		if(url!=""){
			url = url.replace("pcode=1","pcode=" + v1);
			window.open(url);
		}
	}
	
	function ChkRadio(obj, ovalue){
		if(obj.checked == true){
			switch(ovalue){
				case "11": sva_input.style.display = "none";
					break;
				default : sva_input.style.display = "block";
			}
		}
	}
	
	function printWin(link){  
	   var winObject=null;	
        winObject=window.open (link,'','scrollbars=yes,resizable=yes,menubar=yes,status=yes,width=700,height=500,top=0,left=0');	
	}
	
	function printPage(){
	//alert(window.opener.fpContent.innerHTML);
		window.resizeTo(screen.width, screen.height);
		fpPage.innerHTML = window.opener.fpContent.innerHTML;
	}
//-->