PageSourceSearch

https://www.univacco.com/js/ws_main.js

js univacco.com collected 2026-10-08 08:16:02 UTC 4,271 bytes, 140 lines download raw bytes

1// JavaScript Document
2//只能輸入數字跟刪除鍵
3function CheckNum(e){
4    var key = window.event ? e.keyCode : e.which;
5	var keychar = String.fromCharCode(key);
6	reg = /\d/;
7	return reg.test(keychar);
8}
9
10// 開啟檔案管理視窗
11function upload_window(action_file,return_id){   
12    var new_width  = 720;
13    var new_height = 500;
14    //var scr_width  = screen.availWidth;
15    //var scr_height = screen.availHeight;
16    //var old_width  = scr_width - new_width;
17    //var old_height = scr_height;
18    //var space = 0 - window.screenLeft ;
19    //window.resizeTo(old_width,old_height);
20    //window.moveBy(space,0);
21    window.open(action_file + '&return_id=' + return_id ,'','width='+new_width+',height='+new_height+',scrollbars=yes,status=yes');
22}
23
24function resize_opener(){
25    var scr_width  = screen.availWidth;
26    var scr_height = screen.availHeight;
27    window.opener.resizeTo(scr_width,scr_height);
28}
29
30function ConfirmMSG(msg,url){
31    var conf = confirm(msg);
32    if(conf){
33        location.href= url;
34        return true;
35    }else{
36        return false;
37    }
38}
39function MM_openBrWindow(theURL,winName,features) { //v2.0
40    window.open(theURL,winName,features);
41}
42function popinquiry(txt){
43    var url="cart.php?func=s_inquiry&p_id=" + txt;
44    wo=window.open(url,"Inquiry","toolbar=no,top=200,left=400,width=600,height=420");
45    wo.focus();
46}
47//加入我的最愛
48function addBookmarkForBrowser(sTitle, sUrl) {
49// Returns the version of Internet Explorer or a -1
50// (indicating the use of another browser).
51    if(window.sidebar && window.sidebar.addPanel){
52        window.sidebar.addPanel(sTitle, sUrl, "");
53    }else if(window.external) {
54        try{
55            window.external.AddFavorite(sUrl, sTitle);
56        }catch(e){
57            alert('Please help yourself to add this page into bookmarks');         
58        }
59    }else{
60        alert('Please help yourself to add this page into bookmarks');         
61    }
62}
63/* 勾選詢價車時之檢查事項 */
64function CheckProducts_eng(form) {  
65    onchecked=0;
66    if (form.total_box.value ==1 && form['p_id[]'].checked==true) {
67        onchecked++;     
68    } else if(form.total_box.value > 1) { 
69
70        for (var i=0;i<form.total_box.value;i++) {
71            var e = form['p_id[]'][i];
72            if (e.checked==true) { 
73                onchecked++;
74            }   
75        }
76    }  
77    if(onchecked==0) {
78        alert("Please check the product!!")
79        return false;
80    }else{
81        form.submit();
82        return true;    
83    }
84}  
85function CheckProducts_cht(form) {  
86    onchecked=0;
87    if (form.total_box.value ==1 && form['p_id[]'].checked==true) {
88        onchecked++;     
89    } else if(form.total_box.value > 1) { 
90        for (var i=0;i<form.total_box.value;i++) {
91            var e = form['p_id[]'][i];
92            if (e.checked==true) { 
93                onchecked++;
94            }   
95        }
96    }  
97    if(onchecked==0) {
98        alert("請勾選產品!!")
99        return false;
100    }else{
101        form.submit();
102        return true;    
103    }
104}  
105/* 詢價車&購物車 CONTINUE更新數量 */  
106function cart_continue(obj,url) {
107  obj.submit();
108  location.href=url;
109}
110/* 詢價車&購物車 FINISH更新數量 */
111function cart_finish(obj) {
112  obj.submit();
113  location.href='cart.php?func=c_finish';    
114}
115//設定cookie
116function setCookie(c_name,value,exdays){
117    var exdate=new Date();
118    exdate.setDate(exdate.getDate() + exdays);
119    var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()) + "; path=/ ";
120    document.cookie=c_name + "=" + c_value;
121}
122//讀取cookie
123function getCookie(c_name){
124    var c_value = document.cookie;
125    var c_start = c_value.indexOf(" " + c_name + "=");
126    if (c_start == -1){
127        c_start = c_value.indexOf(c_name + "=");
128    }
129    if (c_start == -1) {
130        c_value = null;
131    }else{
132        c_start = c_value.indexOf("=", c_start) + 1;
133        var c_end = c_value.indexOf(";", c_start);
134        if (c_end == -1){
135            c_end = c_value.length;
136        }
137        c_value = unescape(c_value.substring(c_start,c_end));
138    }
139    return c_value;
140}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.