PageSourceSearch

https://www.aeecq.org/js/modal_fd.js

js aeecq.org collected 2026-10-08 01:41:34 UTC 2,772 bytes, 106 lines download raw bytes

1// Utf-8 é 
2//*
3// MODAL WINDOW
4// By Francois Dupras
5var isIE=(document.all)?true:false;
6
7
8function setModalWindow(el, options) {
9	if(options == undefined) options = {top:"center", left:"center"};
10	if(typeof(el) == 'string') el = document.getElementById(el);
11	if(el == null || typeof(el) != 'object') return false;
12	setFadeWindow();
13	
14	var scroll=getScrollOffset();
15	if(isIE == undefined || isIE == true) {
16		selectList = document.getElementsByTagName('select');
17		selectException = el.getElementsByTagName('select');
18		if(selectList) {
19			for(var i=0; i<selectList.length; i++) {
20				var select = selectList[i];
21				if(select) {
22					select.oldVisibility = select.style.visibility;
23					if(selectException.length == 0 || !in_array(selectException, select)) {
24						select.style.visibility = 'hidden';
25					}
26				}
27			}
28		}
29	}
30
31	toggleOn(el);
32	if(options.top == 'center') {
33		var size = getWindowSize();
34		el.style.top = (((size.height/2)-(el.clientHeight/2))+scroll.top)+"px";
35	}
36	if(options.left == 'center') {
37		var size = getWindowSize();
38		el.style.left = (((size.width/2)-(el.clientWidth/2))+scroll.left)+"px";
39	}
40	if(typeof(options.top) == 'number') {
41		el.style.top = (options.top+scroll.top)+"px";
42	}
43	if(typeof(options.left) == 'number') {
44		el.style.left = (options.left+scroll.left)+"px";
45	}
46	
47}
48
49function setFadeWindow() {
50	var body = document.getElementsByTagName('body')[0];
51	var fade = createFadeWindow();
52
53	var scroll=getScrollOffset();
54	
55	fade.style.top = scroll.top+"px";
56	fade.style.left = scroll.left+"px";
57	
58	body.appendChild(fade);
59	body.style.overflow = 'hidden';
60}
61
62function cancelModalWindow(el) {
63	var body = document.getElementsByTagName('body')[0];
64	var fade = document.getElementById('ObjFadeWindow');
65   if(fade!=null){
66      body.removeChild(fade);  
67   }
68	body.style.overflow = '';
69
70	if(isIE == undefined || isIE) {
71		selectList = document.getElementsByTagName('select');
72		for(var i=0; i<selectList.length; i++) {
73			var select = selectList[i];
74			select.style.visibility=select.oldVisibility;
75		}
76	}
77	if(el != undefined) {
78		if(typeof(el) == "string") el=document.getElementById(el);
79		if(typeof(el) == "object") {
80			toggleOff(el);
81		}
82	}
83}
84
85
86function createFadeWindow()	{
87	var fade = document.getElementById('ObjFadeWindow');
88	if(fade != null && typeof(fade) == 'object') return fade;
89
90	fade = document.createElement("div");
91	fade.id = "ObjFadeWindow";
92
93	fade.style.position = "absolute";
94	fade.style.top = "-200px";
95	fade.style.left = "0px";
96	fade.style.width = "100%";
97	fade.style.height = "200%";
98	fade.style.backgroundColor = "#b3b3b3";
99	fade.style.backgroundColor = "#000";
100	fade.style.cursor = "not-allowed";
101	fade.style.filter = "Alpha(Opacity=75)";
102	fade.style.opacity = "0.75";
103	fade.style.zIndex = "900";
104
105	return fade;
106}

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.