PageSourceSearch

https://batteries4laptop.com/include/js.js

js batteries4laptop.com collected 2026-10-05 22:57:54 UTC 3,215 bytes, 117 lines download raw bytes

1// Following functions are used to show and hide the layer for left menu
2<!--
3		// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
4		function swapImgRestore() {
5		var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
6		}
7		function preloadImages() {
8		var d=document; if(d.images){ if(!d.p) d.p=new Array();
9			var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
10			if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
11		}
12		function findObj(n, d) {
13		var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
14			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
15		if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
16		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
17		}
18		function swapImage() {
19		var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
20		if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
21		}
22		function showHideLayers() {
23		var i,p,v,obj,args=showHideLayers.arguments;
24		for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
25			if (obj.style) { obj=obj.style	; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
26			obj.visibility=v; }
27		}
28//-->
29
30//this function will remove the extra space from string
31function trim(val) {
32	var cnt, chr, startIndex, endIndex;
33	cnt = 0;
34	var str = new String(val);
35	var finalStr = new String();
36	for (var i=0; i<str.length; i++) {
37		chr = str.charCodeAt(i);
38		if (chr == 32) {
39			cnt++;
40			continue;
41		}
42		else break;
43	}
44	startIndex = cnt;
45	if (startIndex == str.length) return "";
46	cnt = str.length - 1;
47	for (var i=str.length-1; i>0; i--) {
48		chr = str.charCodeAt(i);
49		if (chr == 32) {
50			cnt--;
51			continue;
52		}
53		else break;
54	}
55	endIndex = cnt;
56	finalStr = str.substring(startIndex, endIndex + 1);
57	return finalStr;
58}
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74function ontemplateRegister(){
75	//alert("nowprem")  
76	//alert(document.frmtemplateSearch.txttemplateRegister.value)
77	
78	if (document.frmtemplateSearch.txttemplateRegister.value == ""){
79		alert("[Register] Please Enter your loginid")
80	}
81	else{	
82	   document.frmtemplateSearch.action="prem.asp"
83	   document.frmtemplateSearch.submit();
84	  } 
85}
86
87
88function ontemplateSearch(){
89	//alert("nowprem") 
90		
91	if (document.frmtemplateLogin.txttemplateSearch.value == ""){
92		alert("[Search] Please Enter the Search Keyword")
93	}
94	else{	
95	   document.frmtemplateLogin.action="prem.asp"
96	   document.frmtemplateLogin.submit();
97	  } 
98}
99
100
101
102function ontemplatelogin(){
103	//alert("nowprem") 
104	
105	//alert(document.frmtemplateLogin.txttemplateUsername.value)
106	//alert(document.txttemplatePassword.txttemplateUsername.value)
107			
108	if ((document.frmtemplateLogin.txttemplateUsername.value == "") ||(document.frmtemplateLogin.txttemplateUsername.value == "")) {
109	    alert("[Login] Please Enter the  Username and Password")
110	}
111	else{	
112	   document.frmtemplateLogin.action="prem.asp"
113	   document.frmtemplateLogin.submit();
114	  } 
115}
116
117

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.