PageSourceSearch

https://inko.vn/Scripts/Common.js

js inko.vn collected 2026-09-28 13:32:34 UTC 5,413 bytes, 222 lines download raw bytes

1// JScript File
2//21/08/2007
3//Cac ham thong dung co ban duoc dung lai nhieu lan
4//this is to select or unselect the datagrid check boxes 
5
6function DGSelectOrUnselectAll(grdid,obj,objlist){ 
7
8    //this function decides whether to check or uncheck all
9     if(obj.checked) 
10
11    DGSelectAll(grdid,objlist) 
12
13    else 
14
15    DGUnselectAll(grdid,objlist)    
16 } 
17
18//---------- 
19function DGSelectAll(grdid,objid){ 
20
21    //.this function is to check all the items
22
23    var chkbox; 
24
25    var i=2; 
26
27
28    chkbox=document.getElementById(grdid + 
29
30    '_ctl0' + i + '_' + objid); 
31
32
33    while(chkbox!=null){ 
34
35        chkbox.checked=true; 
36
37        i=i+1; 
38
39        chkbox=document.getElementById(grdid + 
40
41        '_ctl0' + i + '_' + objid); 
42
43    } 
44
45
46}//-------------- 
47
48
49function DGUnselectAll(grdid,objid){ 
50
51    //.this function is to uncheckcheck all the items
52
53    var chkbox; 
54
55    var i=2; 
56
57
58    chkbox=document.getElementById(grdid + 
59
60    '_ctl0' + i + '_' + objid); 
61
62
63    while(chkbox!=null){ 
64
65        chkbox.checked=false; 
66
67        i=i+1; 
68
69        chkbox=document.getElementById(grdid + 
70
71        '_ctl0' + i + '_' + objid); 
72
73    } 
74
75}
76
77//-------------------------------------------------------
78
79function GetParam(pName, pDef)
80	{
81		var	str=location.href;
82		var	pos=str.indexOf('?'.concat(pName).concat('='));
83
84		if (pos==-1)
85		{
86			pos=str.indexOf('&'.concat(pName).concat('='));
87			if (pos==-1) return pDef;
88		}
89		
90		str=str.substring(pos + pName.length + 2);
91		pos=str.indexOf('&');
92
93		if (pos==-1)
94		{
95			pos=str.length;
96		}	
97
98		if (pos > 0)
99		{
100			str=str.substring(0, pos);
101		}
102
103		return str;
104}
105
106var imageinput = null;
107function chonanh(controlid)
108	{
109		if(navigator.appName.indexOf('Microsoft')!=-1)
110		{
111		    var retval = window.showModalDialog('ImageUpload.aspx','','dialogWidth:670px;dialogHeight:500px');
112			if (retval != null)	
113			{
114				var textreturn = document.getElementById(controlid);
115				textreturn.value = retval;
116			}
117		}
118		else
119		{	
120		    imageinput = controlid;
121			activeModalWin = window.open('ImageUpload.aspx', "", "width=670px,height=500px,left=10,top=10,resizable=yes");
122            window.onfocus = function(){if (activeModalWin.closed == false){activeModalWin.focus();};};
123        }
124		
125	}
126	
127	// ---- Cac ham tao menu trai
128	function additemmnu(mnusite,mnuid,mnuname,sLink,mnulevel,mnustyle)
129			{
130				var strLink =sLink;
131				var stemp="";
132				
133				
134			var sMenuOff = 'MenuOffWindow';
135				var sMenuHover = 'MenuHoverWindow';
136				stemp += '<tr><td nowrap><div class=' + sMenuOff + ' onmouseover=\"this.className=\'' + sMenuHover ;
137				stemp += '\'\" onmouseout=\"this.className=\'' + sMenuOff + '\'\" onclick=\"location.href=\'' ;
138				stemp += strLink +'\'\"><div style=\"padding-top:7px;\">'; 
139				stemp += mnuname + '</div></div></td></tr>';
140				
141				
142				return stemp;
143			};
144			
145			function hienmnu(position,msg,mnusite)
146			{
147				var subID = 'menucon';
148				if (position.offsetLeft && position.offsetTop)
149				{
150					var x = position.offsetLeft + 190 + 'px'   ;
151					var y = position.offsetTop - 2 + 'px';
152					//alert(y);
153					var content='';
154					var submenu = new Array();
155					submenu = msg.split("^");
156					//alert(msg);
157					if (msg.length > 4 )
158					{
159						var i=0;
160						content = '<table cellspacing=\'0\' cellpadding=\'0\' width=\'120px\' class=\'hienMenu\'>';    
161						content += '<tr><td style=\"padding-left:1px; padding-right:1px; border:solid 1px #ffffff;\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">';
162						while (i<submenu.length)
163						{
164							var itemmnu = new Array();
165							itemmnu = submenu[i].split("*");
166							content += additemmnu(mnusite,itemmnu[0],itemmnu[1],itemmnu[2],itemmnu[3],itemmnu[4]);
167							
168							
169							i = i+ 1;
170						}
171						content += '</table></td></tr>';
172						content += '</table>';
173						
174						//alert(content);
175						
176						if (document.getElementById(subID) && (i > 0))
177						{
178							var sub = document.getElementById(subID);
179							if (sub.style)
180							{
181								sub.style.visibility = 'visible';
182								sub.style.left = x  ;
183								sub.style.top = y ;
184								sub.innerHTML = content ;
185							}
186						}
187					}
188					
189				}
190				
191			};
192			function anmnu()
193			{
194				
195				if (document.getElementById('menucon'))
196				{
197					var sub = document.getElementById('menucon');
198					sub.style.visibility = 'hidden';
199					
200				}
201			};
202			//----end menu----
203			// Popup
204			function popUp(theURL,width, height)
205            {
206	            if (width == null) width = 300;
207	            if (height == null) height = screen.height;
208	            if (width > screen.width) width=screen.width;
209	            if (height > screen.height) height = screen.height;
210	            
211	            if ( height  >= screen.height) { 
212		            
213		            popUpWin = window.open(theURL,'_blank','toolbar=no,width='+ width+',height='+ height+ ',directories=no,status=no,scrollbars=1,resizable=yes, menubar=no');
214	            }
215	            else
216	            {
217		            popUpWin = window.open(theURL,'_blank','toolbar=no,width='+ width+',height='+ height+ ',directories=no,status=no,scrollbars=0,resizable=yes, menubar=no');
218	            }
219	            popUpWin.moveTo(50,50);
220            	
221            }
222

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.