PageSourceSearch

https://blagovist.info/wp-content/plugins/bg-orthodox-calendar/js/bg_ortcal_names.js?ver=0.13.10

js blagovist.info collected 2026-10-02 07:27:41 UTC 8,660 bytes, 218 lines download raw bytes

1var bg_ortcal_naming = {
2    left : 0,
3    top  : 0,
4    width: 0,
5    height: 0,
6	css : document.createElement("link"),
7    div : document.createElement("div"),
8	bdD : null,
9    bdM : null,
10    bdY : null,
11	
12	baptism : 40,
13
14	init: function () {
15		bg_ortcal_naming.css.rel = "stylesheet";
16		bg_ortcal_naming.css.href= bg_ortcal_baseUrl+"css/st_names.css";
17		document.body.appendChild(bg_ortcal_naming.css);
18		
19		bg_ortcal_naming.div.id = 'bg_ortcal_snames';
20		bg_ortcal_naming.div.innerHTML = bg_ortcal_naming.html();
21		document.body.appendChild(bg_ortcal_naming.div);
22		bg_ortcal_naming.div.style.display = "none";
23	},
24	html: function() {
25	var t = '<table width="100%" class="bg_ortcal_header"><tr><td></td><td width="20px" style="cursor: pointer;" onclick="bg_ortcal_naming.hide();" title="'+bg_ortcal_lang.close+'"><b>х</b></td></tr>';
26		t += '<tr><td colspan="2"><p style="margin:12px 0px; font-size: 24px;">'+bg_ortcal_lang.the_title1+'</p></td></tr></table>';
27		t += '<div class="bg_ortcal_separator1"></div>';
28		t += '<div class="bg_ortcal_separator2"></div>';
29		t += '<div id="day1" class="bg_ortcal_day"></div>';
30		t += '<table width="100%" class="bg_ortcal_footer"><tr><td width="10%"></td>';
31		t += '<td width="80%">'+bg_ortcal_lang.title1+'</td>';
32		t += '<td width="10%"></td></tr></table>';
33		t += '<div class="bg_ortcal_separator1"></div>';
34		t += '<div class="bg_ortcal_separator2"></div>';
35		t += '<div id="day8" class="bg_ortcal_day"></div>';
36		t += '<table width="100%" class="bg_ortcal_footer"><tr><td width="10%"></td>';
37		t += '<td width="80%">'+bg_ortcal_lang.title2+'</td>';
38		t += '<td width="10%"></td></tr></table>';
39		t += '<div class="bg_ortcal_separator1"></div>';
40		t += '<div class="bg_ortcal_separator2"></div>';
41		t += '<div id="day40" class="bg_ortcal_day"></div>';
42		t += '<table width="100%" class="bg_ortcal_footer"><tr><td id="prevDay" width="10%" style="cursor: pointer;" onclick="bg_ortcal_naming.prevDay();" title="'+bg_ortcal_lang.prev_day+'"><b><<</b></td>';
43		t += '<td id="bapID" width="80%">'+bg_ortcal_lang.title3+' '+bg_ortcal_naming.baptism+bg_ortcal_lang.title3a+'</td>';
44		t += '<td id="nextDay" width="10%" style="cursor: pointer;" onclick="bg_ortcal_naming.nextDay();" title="'+bg_ortcal_lang.next_day+'"><b>>></b></td></tr></table>';
45		t += '<div class="bg_ortcal_bottom1"></div>';
46	return t;
47	},
48	show : function(d, obj) {
49		bg_ortcal_naming.bdD = d.getDate();
50		bg_ortcal_naming.bdM = d.getMonth()+1;
51		bg_ortcal_naming.bdY = d.getFullYear();
52		bg_ortcal_naming.draw ();
53		bg_ortcal_naming.div.style.display = "block";
54
55		setObj(bg_ortcal_naming.div);
56		bg_ortcal_bscal.hide();
57	},
58	draw : function() {
59		var el = document.getElementById("day1");
60		el.innerHTML = bg_ortcal_naming.dayInfo(1);
61		el = document.getElementById("day8");
62		el.innerHTML = bg_ortcal_naming.dayInfo(8);
63		el = document.getElementById("day40");
64		el.innerHTML = bg_ortcal_naming.dayInfo(40);		
65	},
66	hide : function() {
67		bg_ortcal_naming.div.style.display = "none";
68	},
69    pos  : function (el) {
70        var r = { x: el.offsetLeft, y: el.offsetTop };
71        if (el.offsetParent) {
72                var tmp = bg_ortcal_naming.pos(el.offsetParent);
73                r.x += tmp.x;
74                r.y += tmp.y;
75        }
76	return r;
77	},
78	prevDay : function () {
79		if (bg_ortcal_naming.baptism > 2) {
80			bg_ortcal_naming.baptism--;
81			var el = document.getElementById("bapID");
82			el.innerHTML = bg_ortcal_lang.title2+' '+bg_ortcal_naming.baptism+bg_ortcal_lang.title3;		
83			el = document.getElementById("day40");
84			el.innerHTML = bg_ortcal_naming.dayInfo(bg_ortcal_naming.baptism);	
85		}
86	},
87	nextDay : function () {
88		if (bg_ortcal_naming.baptism < 365) {
89			bg_ortcal_naming.baptism++;
90			var el = document.getElementById("bapID");
91			el.innerHTML = bg_ortcal_lang.title2+' '+bg_ortcal_naming.baptism+bg_ortcal_lang.title3;		
92			el = document.getElementById("day40");
93			el.innerHTML = bg_ortcal_naming.dayInfo(bg_ortcal_naming.baptism);	
94		}
95	},
96	dayInfo : function(n) {
97		var d = new Date(0);
98		d.setFullYear(bg_ortcal_naming.bdY, bg_ortcal_naming.bdM-1, bg_ortcal_naming.bdD+n-1);
99		return bg_ortcal_getDayInfo(d);
100	}
101};	
102// Перемещение окна naming по экрану
103bg_ortcal_naming.div.onmousedown = function(e) { // отследить нажатие
104	
105	cursorX = parseInt(bg_ortcal_naming.div.style.left)-e.pageX;
106	cursorY = parseInt(bg_ortcal_naming.div.style.top)-e.pageY;
107
108	//  отследить движение 
109	document.onmousemove = function(e) {
110		bg_ortcal_naming.div.style.left = e.pageX + cursorX + 'px';
111		bg_ortcal_naming.div.style.top = e.pageY + cursorY + 'px';
112	}
113
114	//  отследить окончание переноса
115	bg_ortcal_naming.div.onmouseup = function() {
116		document.onmousemove = null;
117		bg_ortcal_naming.div.onmouseup = null;
118	}
119}
120// Запрет встроенного  Drag'n'Drop 
121bg_ortcal_naming.div.ondragstart = function() {
122	return false;
123};
124var bg_ortcal_today = {
125    left : 0,
126    top  : 0,
127    width: 0,
128    height: 0,
129	css : document.createElement("link"),
130    div : document.createElement("div"),
131	bdD : null,
132    bdM : null,
133    bdY : null,
134	
135	offset : 0,
136
137	init: function () {
138		bg_ortcal_today.css.rel = "stylesheet";
139		bg_ortcal_today.css.href= bg_ortcal_baseUrl+"css/st_names.css";
140		document.body.appendChild(bg_ortcal_today.css);
141		
142		bg_ortcal_today.div.id = 'bg_ortcal_snames';
143		bg_ortcal_today.div.innerHTML = bg_ortcal_today.html();
144		document.body.appendChild(bg_ortcal_today.div);
145		bg_ortcal_today.div.style.display = "none";
146	},
147	html: function() {
148	var t = '<table width="100%" class="bg_ortcal_header"><tr><td></td><td width="20px" style="cursor: pointer;" onclick="bg_ortcal_today.hide();" title="'+bg_ortcal_lang.close+'"><b>х</b></td></tr>';
149		t += '<tr><td colspan="2"><p style="margin:12px 0px; font-size: 24px;">'+bg_ortcal_lang.the_title2+'</p></td></tr></table>';
150		t += '<div class="bg_ortcal_separator"></div>';
151		t += '<div id="thisDay" class="bg_ortcal_day"></div>';
152		t += '<table width="100%" class="bg_ortcal_footer"><tr><td id="prevDay" width="30%" style="cursor: pointer;" onclick="bg_ortcal_today.prevDay();" title="'+bg_ortcal_lang.prev_day+'"><b><< '+bg_ortcal_lang.yesterday+'</b></td>';
153		t += '<td width="40%"> </td>';
154		t += '<td id="nextDay" width="30%" style="cursor: pointer;" onclick="bg_ortcal_today.nextDay();" title="'+bg_ortcal_lang.next_day+'"><b>'+bg_ortcal_lang.tomorrow+' >></b></td></tr></table>';
155	return t;
156	},
157	show : function(d, obj) {
158		bg_ortcal_today.bdD = d.getDate();
159		bg_ortcal_today.bdM = d.getMonth()+1;
160		bg_ortcal_today.bdY = d.getFullYear();
161		var el = document.getElementById("thisDay");
162		el.innerHTML = bg_ortcal_today.dayInfo(1);
163		bg_ortcal_today.div.style.display = "block";
164
165		setObj(bg_ortcal_today.div);
166		bg_ortcal_bscal.hide();
167	},
168	hide : function() {
169		bg_ortcal_today.div.style.display = "none";
170	},
171    pos  : function (el) {
172        var r = { x: el.offsetLeft, y: el.offsetTop };
173        if (el.offsetParent) {
174                var tmp = bg_ortcal_today.pos(el.offsetParent);
175                r.x += tmp.x;
176                r.y += tmp.y;
177        }
178	return r;
179	},
180	prevDay : function () {
181			bg_ortcal_today.offset--;
182			el = document.getElementById("thisDay");
183			el.innerHTML = bg_ortcal_today.dayInfo(bg_ortcal_today.offset);	
184	},
185	nextDay : function () {
186			bg_ortcal_today.offset++;
187			el = document.getElementById("thisDay");
188			el.innerHTML = bg_ortcal_today.dayInfo(bg_ortcal_today.offset);	
189	},
190	dayInfo : function(n) {
191		var d = new Date(0);
192		d.setFullYear(bg_ortcal_today.bdY, bg_ortcal_today.bdM-1, bg_ortcal_today.bdD+n-1);
193		return bg_ortcal_getDayInfo(d);
194	}
195};	
196// Перемещение окна today по экрану
197bg_ortcal_today.div.onmousedown = function(e) { // отследить нажатие
198	
199	cursorX = parseInt(bg_ortcal_today.div.style.left)-e.pageX;
200	cursorY = parseInt(bg_ortcal_today.div.style.top)-e.pageY;
201
202	//  отследить движение 
203	document.onmousemove = function(e) {
204		bg_ortcal_today.div.style.left = e.pageX + cursorX + 'px';
205		bg_ortcal_today.div.style.top = e.pageY + cursorY + 'px';
206	}
207
208	//  отследить окончание переноса
209	bg_ortcal_today.div.onmouseup = function() {
210		document.onmousemove = null;
211		bg_ortcal_today.div.onmouseup = null;
212	}
213}
214// Запрет встроенного  Drag'n'Drop 
215bg_ortcal_today.div.ondragstart = function() {
216	return false;
217};
218

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.