PageSourceSearch

https://dipendenti.ferroviedellacalabria.it/portale/Include/TopSplit.js?v=560905677

js ferroviedellacalabria.it collected 2026-10-01 12:27:00 UTC 48,988 bytes, 2,361 lines download raw bytes

1var TimeOutSplit = null;
2var TopDvTop = null;
3var TopDvSubTitle = null;
4var TopTdL = null;
5var TopTdC = null;
6var TopTdR = null;
7var TopWizDv1 = null;
8var TopWizDv2 = null;
9var TopWizDv3 = null;
10var TopWizDv4 = null;
11var TopWizDv5 = null;
12var TopWizDv6 = null;
13var TopWizDv7 = null;
14var TopWizMenu = null;
15var TopPhotoDv = null;
16var TopDialogDv = null;
17var TopWizIFrm1 = null;
18var TopWizIFrm2 = null;
19var TopWizIFrm3 = null;
20var TopWizIFrm4 = null;
21var TopWizIFrm5 = null;
22var TopWizIFrm6 = null;
23var TopWizIFrm7 = null;
24var TopPhotoFrame = null;
25
26var TopTdRT = null;
27var TopTdRC = null;
28var TopTdRB = null;
29var TopDvMove = null;
30var TopDvOver = null;
31var SplitSize = 15;
32var TitleSize = 35;
33var SizeX = 0;
34var SizeY = 0;
35var LastX = 0;
36var LastY = 0;
37var DeltaX = 0;
38var DeltaY = 0;
39var LeftSize = 225;
40var TopSize = 200;
41var NewX = 0;
42var NewY = 0;
43var BeginOrizz = false;
44var BeginVert = false;
45var StatoOriz = 2;
46var StatoVert = 0;
47var WizLevel = 0;
48var FunAreaIsCollapse = false;
49var SizeCollapse = 0;
50var InitStatoOriz = 2;
51var IsInitialized = false;
52var IfrmCorrMainArea = null;
53var IfrmPrimMainArea = null;
54var wf_statechanged = false;
55
56function Init()
57{
58	TopDvTop = document.getElementById("DvTop");
59	TopDvSubTitle = document.getElementById("DvSubTitle");
60	TopTdL = document.getElementById("TopTdLeft");
61	TopTdC = document.getElementById("TopTdCenter");
62	TopTdR = document.getElementById("TopTdRight");
63	TopWizDv1 = document.getElementById("TopWizDiv1");
64	TopWizDv2 = document.getElementById("TopWizDiv2");
65	TopWizDv3 = document.getElementById("TopWizDiv3");
66	TopWizDv4 = document.getElementById("TopWizDiv4");
67	TopWizDv5 = document.getElementById("TopWizDiv5");
68	TopWizDv6 = document.getElementById("TopWizDiv6");
69	TopWizDv7 = document.getElementById("TopWizDiv7");
70	TopWizMenu = document.getElementById("TopWizMenu");
71	TopPhotoDv = document.getElementById("TopPhotoDiv");
72	TopDialogDv = document.getElementById("TopDivDialog");
73	TopWizIFrm1 = document.getElementById("WizFrame1");
74	TopWizIFrm2 = document.getElementById("WizFrame2");
75	TopWizIFrm3 = document.getElementById("WizFrame3");
76	TopWizIFrm4 = document.getElementById("WizFrame4");
77	TopWizIFrm5 = document.getElementById("WizFrame5");
78	TopWizIFrm6 = document.getElementById("WizFrame6");
79	TopWizIFrm7 = document.getElementById("WizFrame7");
80	TopPhotoFrame = document.getElementById("PhotoFrame");
81	TopTdRT = document.getElementById("TopRightTop");
82	TopTdRC = document.getElementById("TopRightCenter");
83	TopTdRB = document.getElementById("TopRightBottom");
84	TopDvMove = document.getElementById("TopDraggerDiv");
85	TopDvOver = document.getElementById("TopDivOverlay");
86	TopDvOriz = document.getElementById("DvOriz");
87	IfrmCorrMainArea = document.getElementById("CorrMainArea");
88	IfrmPrimMainArea = document.getElementById("PrimMainArea");
89	TopSize = Math.round((GetClientHeight() - 50) / 2);
90	SizeX = GetClientWidth();
91	SizeY = GetClientHeight();
92	if(OnLogin)
93	{
94		SetStatoOriz(0, 0);
95	}
96	else
97	{
98		TopDvTop.style.display = "block";
99		if(TopDvSubTitle != null)
100		{
101			TopDvSubTitle.style.display = "block";
102		}
103		SetStatoOriz(InitStatoOriz, LeftSize);
104	}
105	TopWizDv1.style.display = "none";
106	TopWizDv2.style.display = "none";
107	TopWizDv3.style.display = "none";
108	TopWizDv4.style.display = "none";
109	TopWizDv5.style.display = "none";
110	window.onmouseup = function (event) { FunOverMouseUP(event); };
111	IsInitialized = true;
112}
113
114function CheckApplVersion(ApplVersione)
115{
116	if(typeof (JSApplVersion) == 'undefined')
117	{
118		return(true);
119	}
120	if(ApplVersione != JSApplVersion)
121	{
122		alert("Versione Applicazione: " + ApplVersione + "\nVersione JavaScript: " + JSApplVersion + "\nAttenzione: occorre svuotare la cache del Browser!");
123		return(false);
124	}
125	return(true);
126}
127
128var LastTsize = 0;
129function SetTopRightAreaSize(Valore)
130{
131	var Tsize = SizeY - SplitSize - TitleSize;
132	if(Valore == 2)
133	{
134		Tsize = Math.round(Tsize * 0.5);
135		if(LastTsize > 0 && TopSize > 0)
136		{
137			var x = GetClientWidth();
138			var y = GetClientHeight();
139			if(x == SizeX && y == SizeY)
140			{
141				Tsize = TopSize;
142			}
143		}
144		LastTsize = Tsize;
145		SetStatoVert(2, Tsize);
146		return(true);
147	}
148	LastTsize = 0;
149	if(Valore == 3)
150	{
151		SetStatoVert(2, 45);
152		return(true);
153	}
154	SetStatoVert(0, 0);
155	return(true);
156}
157
158/*
159*  0   Solo Left
160*  1   100% Left
161*  2   Left e Right
162*  3   100% Right
163*  4   Solo Right
164*/
165function SetStatoOriz(Stato, LSize)
166{
167	StatoOriz = Stato;
168	switch(StatoOriz)
169	{
170		case 0:
171			TopTdL.style.display = "block";
172			TopTdC.style.display = "none";
173			TopTdR.style.display = "none";
174			LeftSize = SizeX;
175			break;
176		case 1:
177			TopTdL.style.display = "block";
178			TopTdC.style.display = "block";
179			TopTdR.style.display = "block";
180			LeftSize = SizeX - SplitSize;
181			break;
182		case 2:
183			TopTdL.style.display = "block";
184			TopTdC.style.display = "block";
185			TopTdR.style.display = "block";
186			if(LSize >= 0)
187			{
188				if(LSize > SizeX - SplitSize)
189				{
190					LSize = SizeX - SplitSize;
191				}
192				LeftSize = LSize;
193			}
194			break;
195		case 3:
196			TopTdL.style.display = "block";
197			TopTdC.style.display = "block";
198			TopTdR.style.display = "block";
199			LeftSize = 0;
200			break;
201		case 4:
202			TopTdL.style.display = "none";
203			TopTdC.style.display = "none";
204			TopTdR.style.display = "block";
205			LeftSize = 0;
206			break;
207	}
208	SetSize(true);
209}
210
211/*
212*  0   Solo Top
213*  1   100% Top
214*  2   Top e Bottom
215*  3   100% Bottom
216*/
217function SetStatoVert(Stato, TSize)
218{
219	StatoVert = Stato;
220	if(StatoVert == 0)
221	{
222		TopTdRC.style.display = "none";
223		TopTdRB.style.display = "none";
224		TopSize = SizeY - TitleSize;
225	}
226	else
227	{
228		TopTdRC.style.display = "block";
229		TopTdRB.style.display = "block";
230		if(StatoVert == 1)
231		{
232			TopSize = SizeY - SplitSize - TitleSize;
233		}
234		if(StatoVert == 2)
235		{
236			if(TSize >= 0)
237			{
238				if(TSize > SizeY - SplitSize - TitleSize)
239				{
240					TSize = SizeY - SplitSize - TitleSize;
241				}
242				TopSize = TSize;
243			}
244		}
245		if(StatoVert == 3)
246		{
247			TopSize = 0;
248		}
249	}
250	SetSize(true);
251}
252
253function SetSize(Force)
254{
255	var x = GetClientWidth();
256	var y = GetClientHeight();
257	if(Force == false && x == SizeX && y == SizeY)
258	{
259		return;
260	}
261	SizeX = x;
262	SizeY = y;
263	if(StatoOriz == 0)
264	{
265		LeftSize = SizeX;
266	}
267	if(StatoVert == 0)
268	{
269		TopSize = SizeY - TitleSize;
270	}
271	var LSize = LeftSize;
272	if(LSize < 0)
273	{
274		LSize = 0;
275	}
276	if(LSize + SplitSize > SizeX && StatoOriz != 0)
277	{
278		LSize = SizeX - SplitSize;
279	}
280	var TSize = TopSize;
281	if(TSize < 0)
282	{
283		TSize = 0;
284	}
285	if(TSize + SplitSize + TitleSize > SizeY && StatoVert != 0)
286	{
287		TSize = SizeY - SplitSize - TitleSize;
288	}
289	y -= TitleSize;
290	if(y < 0)
291	{
292		y = 0;
293	}
294	TopTdL.style.top = TitleSize + "px";
295	TopTdC.style.top = TitleSize + "px";
296	TopTdR.style.top = TitleSize + "px";
297	TopTdL.style.height = y + "px";
298	TopTdC.style.height = y + "px";
299	TopTdR.style.height = y + "px";
300	TopTdL.style.width = LSize + "px";
301	TopTdC.style.width = SplitSize + "px";
302	var n = x - LSize - SplitSize;
303	if(StatoOriz == 4)
304	{
305		n = x;
306	}
307	if(n < 0)
308	{
309		n = 0;
310	}
311	TopTdR.style.width = n + "px";
312	var k = n - 8;
313	if(k < 0)
314	{
315		k = 0;
316	}
317	TopDvOriz.style.width = k + "px";
318
319	TopTdL.style.left = 0 + "px";
320	TopTdC.style.left = LSize + "px";
321	if(StatoOriz != 4)
322	{
323		TopTdR.style.left = (LSize + SplitSize) + "px";
324	}
325	else
326	{
327		TopTdR.style.left = 0 + "px";
328	}
329
330	n = y - SplitSize;
331	if(n < 0)
332	{
333		n = 0;
334	}
335	var t = TSize;
336	if(t > n && StatoVert != 0)
337	{
338		t = n;
339	}
340	//var t = Math.round(n * 0.5);
341	var b = n - t;
342	if(b < 0)
343	{
344		b = 0;
345	}
346	TopTdRT.style.height = t + "px";
347	TopTdRC.style.height = SplitSize + "px";
348	TopTdRB.style.height = b + "px";
349
350	if(navigator.platform == "iPad" || navigator.platform == 'iPhone')
351	{
352		if(IfrmCorrMainArea != null)
353		{
354			IfrmCorrMainArea.style.width = TopTdRB.offsetWidth + 'px';
355			IfrmCorrMainArea.style.height = TopTdRB.offsetHeight + 'px';
356		}
357		if(IfrmPrimMainArea != null)
358		{
359			IfrmPrimMainArea.style.height = TopTdRT.offsetHeight + 'px';
360			IfrmPrimMainArea.style.width = TopTdRT.offsetWidth + 'px';
361		}
362	}
363
364	CenterElem(TopWizDv1, GetPercWizContainer(1));
365	CenterElem(TopWizDv2, GetPercWizContainer(2));
366	CenterElem(TopWizDv3, GetPercWizContainer(3));
367	CenterElem(TopWizDv4, GetPercWizContainer(4));
368	CenterElem(TopWizDv5, GetPercWizContainer(5));
369	if(navigator.platform == "iPad" || navigator.platform == "iPhone")
370	{
371		//Baco su iPad, non sente il resize in diminuzione su FunArea
372		var vfa = top.GetTopArea("FunArea", false);
373		if(vfa != null)
374		{
375			if(typeof (vfa.MyLeftMenuResize) == "function")
376			{
377				vfa.MyLeftMenuResize();
378			}
379		}
380	}
381}
382
383function CenterCustom(Elem, PercX, PercY, DefaultX, DefaultY)
384{
385	var x = Math.round(SizeX * PercX);
386	if(DefaultX !== undefined && x < DefaultX) { x = SizeX; }
387	var y = Math.round(SizeY * PercY);
388	if(DefaultY !== undefined && y < DefaultY) { y = SizeY; }
389
390	ChangeElemSize(Elem, x, y, 1);
391}
392
393function CenterElem(Elem, Perc)
394{
395	var x = Math.round(SizeX * Perc);
396	var y = Math.round(SizeY * Perc);
397	ChangeElemSize(Elem, x, y, 1);
398}
399
400//Position 0=Top, Position 1=Center, Position 2= bottom
401function ChangeElemSize(Elem, x, y, Position)
402{
403	if(typeof (Elem) == 'undefined' || Elem == null)
404	{
405		return;
406	}
407	if(x < 0)
408	{
409		x = 0;
410	}
411	if(y < 0)
412	{
413		y = 0;
414	}
415	if(x > SizeX)
416	{
417		x = SizeX;
418	}
419	if(y > SizeY)
420	{
421		y = SizeY;
422	}
423	var px = Math.round((SizeX - x) / 2);
424	var py = 0;
425	switch(Position)
426	{
427		case 0: //Top
428			py = 0;
429			break;
430		case 2: //Bottom
431			py = SizeY - y;
432			break;
433		default: //Center
434			py = Math.round((SizeY - y) / 2);
435			break;
436	}
437	if(px < 0)
438	{
439		px = 0;
440	}
441	if(py < 0)
442	{
443		py = 0;
444	}
445	Elem.style.left = px + "px";
446	Elem.style.top = py + "px";
447	Elem.style.width = x + "px";
448	Elem.style.height = y + "px";
449}
450
451function ResizeWin()
452{
453	if(TimeOutSplit != null)
454	{
455		return;
456	}
457	TimeOutSplit = setTimeout("myResizeWin()", 50);
458}
459
460function myResizeWin()
461{
462	TimeOutSplit = null;
463	var w = GetClientWidth();
464	var h = GetClientHeight();
465
466	SetSize(false);
467}
468
469function GetWizardLevel()
470{
471	return(WizLevel);
472}
473
474function GetNextWizardArea(NomeChiamante)
475{
476	switch(NomeChiamante)
477	{
478		case "FunArea":
479		case "PrimMainArea":
480		case "CorrMainArea":
481			return("WizFrame1");
482		case "WizFrame1":
483			return("WizFrame2");
484		case "WizFrame2":
485			return("WizFrame3");
486		case "WizFrame3":
487			return("WizFrame4");
488		case "WizFrame4":
489			return("WizFrame5");
490		case "WizFrame5":
491			return("WizFrame6");
492		case "WizFrame6":
493			return("WizFrame7");
494		default:
495			alert("GetNextWizardArea(" + NomeChiamante + "): superato max livello di wizard!");
496			return("");
497	}
498}
499
500function GetNumNextWizardArea(NomeChiamante)
501{
502	switch(NomeChiamante)
503	{
504		case "FunArea":
505		case "PrimMainArea":
506		case "CorrMainArea":
507			return(7);
508		case "WizFrame1":
509			return(6);
510		case "WizFrame2":
511			return(5);
512		case "WizFrame3":
513			return(4);
514		case "WizFrame4":
515			return(3);
516		case "WizFrame5":
517			return(2);
518		case "WizFrame6":
519			return(1);
520		default:
521			return(0);
522	}
523}
524
525
526function MostraWizard(WizardArea)
527{
528	switch(WizardArea)
529	{
530		case "WizFrame1":
531			WizLevel = 1;
532			ShowOverlayDiv(100);
533			if(TopWizDv1.style.display != "block")
534			{
535				CenterElem(TopWizDv1, GetPercWizContainer(1));
536			}
537			TopWizDv1.style.display = "block";
538			TopWizDv2.style.display = "none";
539			TopWizDv3.style.display = "none";
540			TopWizDv4.style.display = "none";
541			TopWizDv5.style.display = "none";
542			TopWizDv6.style.display = "none";
543			TopWizDv7.style.display = "none";
544			TopWizIFrm2.src = "about:blank";
545			TopWizIFrm3.src = "about:blank";
546			TopWizIFrm4.src = "about:blank";
547			TopWizIFrm5.src = "about:blank";
548			TopWizIFrm6.src = "about:blank";
549			TopWizIFrm7.src = "about:blank";
550			break;
551		case "WizFrame2":
552			WizLevel = 2;
553			ShowOverlayDiv(200);
554			if(TopWizDv1.style.display != "block")
555			{
556				CenterElem(TopWizDv1, GetPercWizContainer(1));
557			}
558			if(TopWizDv2.style.display != "block")
559			{
560				CenterElem(TopWizDv2, GetPercWizContainer(2));
561			}
562			TopWizDv1.style.display = "block";
563			TopWizDv2.style.display = "block";
564			TopWizDv3.style.display = "none";
565			TopWizDv4.style.display = "none";
566			TopWizDv5.style.display = "none";
567			TopWizDv6.style.display = "none";
568			TopWizDv7.style.display = "none";
569			TopWizIFrm3.src = "about:blank";
570			TopWizIFrm4.src = "about:blank";
571			TopWizIFrm5.src = "about:blank";
572			TopWizIFrm6.src = "about:blank";
573			TopWizIFrm7.src = "about:blank";			
574			break;
575		case "WizFrame3":
576			WizLevel = 3;
577			ShowOverlayDiv(300);
578			if(TopWizDv1.style.display != "block")
579			{
580				CenterElem(TopWizDv1, GetPercWizContainer(1));
581			}
582			if(TopWizDv2.style.display != "block")
583			{
584				CenterElem(TopWizDv2, GetPercWizContainer(2));
585			}
586			if(TopWizDv3.style.display != "block")
587			{
588				CenterElem(TopWizDv3, GetPercWizContainer(3));
589			}
590			TopWizDv1.style.display = "block";
591			TopWizDv2.style.display = "block";
592			TopWizDv3.style.display = "block";
593			TopWizDv4.style.display = "none";
594			TopWizDv5.style.display = "none";
595			TopWizDv6.style.display = "none";
596			TopWizDv7.style.display = "none";
597			TopWizIFrm4.src = "about:blank";
598			TopWizIFrm5.src = "about:blank";
599			TopWizIFrm6.src = "about:blank";
600			TopWizIFrm7.src = "about:blank";
601			break;
602		case "WizFrame4":
603			WizLevel = 4;
604			ShowOverlayDiv(400);
605			if(TopWizDv1.style.display != "block")
606			{
607				CenterElem(TopWizDv1, GetPercWizContainer(1));
608			}
609			if(TopWizDv2.style.display != "block")
610			{
611				CenterElem(TopWizDv2, GetPercWizContainer(2));
612			}
613			if(TopWizDv3.style.display != "block")
614			{
615				CenterElem(TopWizDv3, GetPercWizContainer(3));
616			}
617			if(TopWizDv4.style.display != "block")
618			{
619				CenterElem(TopWizDv4, GetPercWizContainer(4));
620			}
621			TopWizDv1.style.display = "block";
622			TopWizDv2.style.display = "block";
623			TopWizDv3.style.display = "block";
624			TopWizDv4.style.display = "block";
625			TopWizDv5.style.display = "none";
626			TopWizDv6.style.display = "none";
627			TopWizDv7.style.display = "none";
628			TopWizIFrm5.src = "about:blank";
629			TopWizIFrm6.src = "about:blank";
630			TopWizIFrm7.src = "about:blank";
631			break;
632		case "WizFrame5":
633			WizLevel = 5;
634			ShowOverlayDiv(500);
635			if(TopWizDv1.style.display != "block")
636			{
637				CenterElem(TopWizDv1, GetPercWizContainer(1));
638			}
639			if(TopWizDv2.style.display != "block")
640			{
641				CenterElem(TopWizDv2, GetPercWizContainer(2));
642			}
643			if(TopWizDv3.style.display != "block")
644			{
645				CenterElem(TopWizDv3, GetPercWizContainer(3));
646			}
647			if(TopWizDv4.style.display != "block")
648			{
649				CenterElem(TopWizDv4, GetPercWizContainer(4));
650			}
651			if(TopWizDv5.style.display != "block")
652			{
653				CenterElem(TopWizDv5, GetPercWizContainer(5));
654			}
655			TopWizDv1.style.display = "block";
656			TopWizDv2.style.display = "block";
657			TopWizDv3.style.display = "block";
658			TopWizDv4.style.display = "block";
659			TopWizDv5.style.display = "block";
660			TopWizDv6.style.display = "none";
661			TopWizDv7.style.display = "none";
662			TopWizIFrm6.src = "about:blank";
663			TopWizIFrm7.src = "about:blank";
664			break;
665		case "WizFrame6":
666			WizLevel = 6;
667			ShowOverlayDiv(600);
668			if(TopWizDv1.style.display != "block")
669			{
670				CenterElem(TopWizDv1, GetPercWizContainer(1));
671			}
672			if(TopWizDv2.style.display != "block")
673			{
674				CenterElem(TopWizDv2, GetPercWizContainer(2));
675			}
676			if(TopWizDv3.style.display != "block")
677			{
678				CenterElem(TopWizDv3, GetPercWizContainer(3));
679			}
680			if(TopWizDv4.style.display != "block")
681			{
682				CenterElem(TopWizDv4, GetPercWizContainer(4));
683			}
684			if(TopWizDv5.style.display != "block")
685			{
686				CenterElem(TopWizDv5, GetPercWizContainer(5));
687			}
688			if(TopWizDv6.style.display != "block")
689			{
690				CenterElem(TopWizDv6, GetPercWizContainer(6));
691			}
692			TopWizDv1.style.display = "block";
693			TopWizDv2.style.display = "block";
694			TopWizDv3.style.display = "block";
695			TopWizDv4.style.display = "block";
696			TopWizDv5.style.display = "block";
697			TopWizDv6.style.display = "block";
698			TopWizDv7.style.display = "none";
699			TopWizIFrm7.src = "about:blank";
700			break;
701		case "WizFrame7":
702			WizLevel = 7;
703			ShowOverlayDiv(700);
704			if(TopWizDv1.style.display != "block")
705			{
706				CenterElem(TopWizDv1, GetPercWizContainer(1));
707			}
708			if(TopWizDv2.style.display != "block")
709			{
710				CenterElem(TopWizDv2, GetPercWizContainer(2));
711			}
712			if(TopWizDv3.style.display != "block")
713			{
714				CenterElem(TopWizDv3, GetPercWizContainer(3));
715			}
716			if(TopWizDv4.style.display != "block")
717			{
718				CenterElem(TopWizDv4, GetPercWizContainer(4));
719			}
720			if(TopWizDv5.style.display != "block")
721			{
722				CenterElem(TopWizDv5, GetPercWizContainer(5));
723			}
724			if(TopWizDv6.style.display != "block")
725			{
726				CenterElem(TopWizDv6, GetPercWizContainer(6));
727			}
728			if(TopWizDv7.style.display != "block")
729			{
730				CenterElem(TopWizDv7, GetPercWizContainer(7));
731			}
732			TopWizDv1.style.display = "block";
733			TopWizDv2.style.display = "block";
734			TopWizDv3.style.display = "block";
735			TopWizDv4.style.display = "block";
736			TopWizDv5.style.display = "block";
737			TopWizDv6.style.display = "block";
738			TopWizDv7.style.display = "block";
739			break;
740		default:
741			WizLevel = 0;
742			HideOverlayDiv();
743			TopWizDv1.style.display = "none";
744			TopWizDv2.style.display = "none";
745			TopWizDv3.style.display = "none";
746			TopWizDv4.style.display = "none";
747			TopWizDv5.style.display = "none";
748			TopWizDv6.style.display = "none";
749			TopWizDv7.style.display = "none";
750			TopWizIFrm1.src = "about:blank";
751			TopWizIFrm2.src = "about:blank";
752			TopWizIFrm3.src = "about:blank";
753			TopWizIFrm4.src = "about:blank";
754			TopWizIFrm5.src = "about:blank";
755			TopWizIFrm6.src = "about:blank";
756			TopWizIFrm7.src = "about:blank";
757			break;
758	}
759}
760
761function NascondiWizard(WizardArea)
762{
763	NascondiDivAttesa();
764	switch(WizardArea)
765	{
766		case "WizFrame1":
767			MostraWizard("");
768			break;
769		case "WizFrame2":
770			MostraWizard("WizFrame1");
771			break;
772		case "WizFrame3":
773			MostraWizard("WizFrame2");
774			break;
775		case "WizFrame4":
776			MostraWizard("WizFrame3");
777			break;
778		case "WizFrame5":
779			MostraWizard("WizFrame4");
780			break;
781		case "WizFrame6":
782			MostraWizard("WizFrame5");
783			break;
784		case "WizFrame7":
785			MostraWizard("WizFrame6");
786			break;
787		default:
788			MostraWizard("");
789			break;
790	}
791}
792
793function IsWizard(WizardArea)
794{
795	switch(WizardArea)
796	{
797		case "WizFrame1":
798		case "WizFrame2":
799		case "WizFrame3":
800		case "WizFrame4":
801		case "WizFrame5":
802		case "WizFrame6":
803		case "WizFrame7":
804			return(true);
805		default:
806			return(false);
807	}
808}
809
810
811function SetWizardMode(NomeChiamante, IsWizard, IsFunction)
812{
813	if(IsWizard == false)
814	{
815		//Chiudo tutti i Wizard
816		if(WizLevel <= 0)
817		{
818			return;
819		}
820		MostraWizard("");
821		return;
822	}
823	var NextArea = GetNextWizardArea(NomeChiamante);
824	if(NextArea == "")
825	{
826		return;
827	}
828	MostraWizard(NextArea);
829}
830
831function GetPhotoArea()
832{
833	return("PhotoFrame");
834}
835
836function GetDivDialog()
837{
838	return(TopDialogDv);
839}
840
841function MostraDivDialog()
842{
843	ShowOverlayDiv(1000);
844	TopDialogDv.style.display = "block";
845}
846
847function NascondiDivDialog()
848{
849	if(WizLevel > 0)
850	{
851		ShowOverlayDiv(WizLevel * 100);
852	}
853	else
854	{
855		HideOverlayDiv();
856	}
857	TopDialogDv.style.display = "none";
858}
859
860function GetPhotoAreaDiv()
861{
862	return(TopPhotoDv);
863}
864
865function MostraPhotoArea()
866{
867	ShowOverlayDiv(1000);
868	TopPhotoDv.style.display = "block";
869}
870
871function NascondiPhotoArea()
872{
873	if(WizLevel > 0)
874	{
875		ShowOverlayDiv(WizLevel * 100);
876	}
877	else
878	{
879		HideOverlayDiv();
880	}
881	TopPhotoDv.style.display = "none";
882	TopPhotoFrame.src = "about:blank";
883}
884
885function GetClientWidth()
886{
887	if(document.documentElement.clientWidth)
888	{
889		return(document.documentElement.clientWidth);
890	}
891	if(document.body.clientWidth)
892	{
893		return(document.body.clientWidth);
894	}
895	return(0);
896}
897
898function GetClientHeight()
899{
900	if(document.documentElement.clientHeight)
901	{
902		return(document.documentElement.clientHeight);
903	}
904	if(document.body.clientHeight)
905	{
906		return(document.body.clientHeight);
907	}
908	return(0);
909}
910
911function SyncOverlayDiv(Elem, dx, dy)
912{
913	TopDvMove.style.left = (Elem.offsetLeft + dx) + "px";
914	TopDvMove.style.top = (Elem.offsetTop + dy) + "px";
915	TopDvMove.style.width = Elem.offsetWidth + "px";
916	TopDvMove.style.height = Elem.offsetHeight + "px";
917	TopDvMove.style.display = "block";
918}
919
920function ShowOverlayDiv(ZIndex)
921{
922	TopDvOver.style.zIndex = ZIndex;
923	TopDvOver.style.display = "block";
924}
925
926function HideOverlayDiv()
927{
928	TopDvOver.style.display = "none";
929}
930
931var oldAreazIndex = "";
932
933function ShowOverlayDivTop(ActiveAreaName)
934{
935	var TopTdRight = document.getElementById("TopTdRight");
936	if(TopTdRight == null)
937	{
938		return;
939	}
940	TopTdRight.style.zIndex = 92;
941	var area = document.getElementById(ActiveAreaName);
942	if(area == null)
943	{
944		return;
945	}
946	var zindex = area.style.zIndex;
947	var newzindex = zindex;
948	if(newzindex == "" || newzindex <= 92)
949	{
950		newzindex = 93;
951	}
952	area.style.zIndex = newzindex + "";
953	oldAreazIndex = zindex;
954	ShowOverlayDiv(91);
955}
956
957function HideOverlayDivTop(ActiveAreaName)
958{
959	var TopTdRight = document.getElementById("TopTdRight");
960	if(TopTdRight == null)
961	{
962		return;
963	}
964	TopTdRight.style.removeProperty("z-index");
965	var area = document.getElementById(ActiveAreaName);
966	if(area == null)
967	{
968		return;
969	}
970	if(oldAreazIndex == null || oldAreazIndex == "")
971	{
972		area.style.removeProperty("z-index");
973	}
974	else
975	{
976		area.style.zIndex = oldAreazIndex + "";
977	}
978	HideOverlayDiv();
979}
980
981function SpostaOrizz()
982{
983	var n = NewX - DeltaX;
984	if(n < 0)
985	{
986		n = 0;
987	}
988	if(n + SplitSize > SizeX)
989	{
990		n = SizeX - SplitSize;
991	}
992	TopDvMove.style.left = n + "px";
993}
994
995function SpostaVert()
996{
997	var n = NewY - DeltaY;
998	if(n < TitleSize)
999	{
1000		n = TitleSize;
1001	}
1002	if(n + SplitSize > SizeY)
1003	{
1004		n = SizeY - SplitSize;
1005	}
1006	TopDvMove.style.top = n + "px";
1007}
1008
1009function SyncOrizz()
1010{
1011	LeftSize = TopDvMove.offsetLeft;
1012	TopDvMove.style.display = "none";
1013	SetSize(true);
1014}
1015
1016function SyncVert()
1017{
1018	TopSize = TopDvMove.offsetTop - TitleSize;
1019	TopDvMove.style.display = "none";
1020	SetSize(true);
1021}
1022
1023function SetMouseX(e, Elem)
1024{
1025	if(Elem == null)
1026	{
1027		return;
1028	}
1029	if(e.pageX == null)
1030	{
1031		//IE8
1032		NewX = event.offsetX + Elem.offsetLeft;
1033	}
1034	else
1035	{
1036		NewX = e.pageX;
1037	}
1038}
1039
1040function SetMouseY(e, Elem)
1041{
1042	if(Elem == null)
1043	{
1044		return;
1045	}
1046	if(e.pageY == null)
1047	{
1048		//IE8
1049		NewY = event.offsetY + Elem.offsetTop;
1050	}
1051	else
1052	{
1053		NewY = e.pageY;
1054	}
1055	NewY += TitleSize;
1056}
1057
1058function GestMouseMove(e, Elem)
1059{
1060	if(BeginOrizz)
1061	{
1062		SetMouseX(e, Elem);
1063		SpostaOrizz();
1064	}
1065	if(BeginVert)
1066	{
1067		SetMouseY(e, Elem);
1068		SpostaVert();
1069	}
1070}
1071
1072function FunOverMouseUP(e)
1073{
1074	var x = 0;
1075	var y = 0;
1076	if(e.pageX == null)
1077	{
1078		//IE8
1079		x = event.offsetX;
1080		y = event.offsetY;
1081	}
1082	else
1083	{
1084		x = e.pageX;
1085		y = e.pageY;
1086	}
1087	if(x < 0 || x >= SizeX || y < 0 || y >= SizeY)
1088	{
1089		FunMouseUP(e, null);
1090		e.returnValue = false;
1091		return(false);
1092	}
1093	else
1094	{
1095		return(true);
1096	}
1097}
1098
1099function FunMouseDownOrizz(e, Elem)
1100{
1101	if(BeginOrizz || BeginVert)
1102	{
1103		FunMouseUP(e, Elem);
1104	}
1105	if(e.pageX == null)
1106	{
1107		//IE8
1108		if(event.button != 1)
1109		{
1110			return;
1111		}
1112		LastX = event.offsetX + Elem.offsetLeft;
1113		DeltaX = LastX - Elem.offsetLeft;
1114	}
1115	else
1116	{
1117		if(e.button != 0)
1118		{
1119			return;
1120		}
1121		LastX = e.pageX;
1122		DeltaX = LastX - Elem.offsetLeft;
1123	}
1124	BeginOrizz = true;
1125	SyncOverlayDiv(Elem, 0, 0);
1126	ShowOverlayDiv(100);
1127}
1128
1129function FunMouseDownVert(e, Elem)
1130{
1131	if(BeginOrizz || BeginVert)
1132	{
1133		FunMouseUP(e, Elem);
1134	}
1135	if(e.pageY == null)
1136	{
1137		//IE8
1138		if(event.button != 1)
1139		{
1140			return;
1141		}
1142		LastY = event.offsetY + Elem.offsetTop + TitleSize;
1143		DeltaY = LastY - Elem.offsetTop;
1144	}
1145	else
1146	{
1147		if(e.button != 0)
1148		{
1149			return;
1150		}
1151		LastY = e.pageY;
1152		DeltaY = LastY - Elem.offsetTop;
1153	}
1154	BeginVert = true;
1155	SyncOverlayDiv(Elem, LeftSize + SplitSize, TitleSize);
1156	ShowOverlayDiv(100);
1157}
1158
1159function FunMouseUP(e, Elem)
1160{
1161	if(e.pageY == null)
1162	{
1163		//IE8
1164		if(event.button != 1)
1165		{
1166			return;
1167		}
1168	}
1169	else
1170	{
1171		if(e.button != 0)
1172		{
1173			return;
1174		}
1175	}
1176	if(BeginOrizz)
1177	{
1178		BeginOrizz = false;
1179		SetMouseX(e, Elem);
1180		SpostaOrizz();
1181		SyncOrizz();
1182		HideOverlayDiv();
1183	}
1184	if(BeginVert)
1185	{
1186		BeginVert = false;
1187		SetMouseY(e, Elem);
1188		SpostaVert();
1189		SyncVert();
1190		HideOverlayDiv();
1191	}
1192}
1193
1194function CollapseFunArea(objImg)
1195{
1196	if(FunAreaIsCollapse)
1197	{
1198		SetStatoOriz(2, SizeCollapse);
1199		objImg.src = "images/Collapse.png";
1200		objImg.title = "Collapse";
1201		document.getElementById("ImgLeft").style.display = "block";
1202		document.getElementById("ImgRight").style.display = "block";
1203		FunAreaIsCollapse = false;
1204	}
1205	else
1206	{
1207		SizeCollapse = LeftSize;
1208		SetStatoOriz(3, 0);
1209		objImg.src = "images/Espandi.png";
1210		objImg.title = "Expand";
1211		document.getElementById("ImgLeft").style.display = "none";
1212		document.getElementById("ImgRight").style.display = "none";
1213		FunAreaIsCollapse = true;
1214	}
1215}
1216
1217function LeftStepFunArea(objImg)
1218{
1219	if(LeftSize < 50)
1220	{
1221		CollapseFunArea(document.getElementById("SplitImage"));
1222	}
1223	else
1224	{
1225		LeftSize -= 40;
1226		SetSize(true);
1227	}
1228}
1229
1230function RightStepFunArea(objImg)
1231{
1232	LeftSize += 40;
1233	SetSize(true);
1234}
1235
1236function GetDivContainerNoAlert(IdFrame)
1237{
1238	switch(IdFrame)
1239	{
1240		case "TitArea":
1241			return(document.getElementById("DvTop"));
1242		case "SubTitleArea":
1243			return(document.getElementById("TopDvSubTitle"));
1244		case "FunArea":
1245			return(document.getElementById("TopTdLeft"));
1246		case "PrimMainArea":
1247			return(document.getElementById("TopRightTop"));
1248		case "CorrMainArea":
1249			return(document.getElementById("TopRightBottom"));
1250		case "WizFrame1":
1251			return(document.getElementById("TopWizDiv1"));
1252		case "WizFrame2":
1253			return(document.getElementById("TopWizDiv2"));
1254		case "WizFrame3":
1255			return(document.getElementById("TopWizDiv3"));
1256		case "WizFrame4":
1257			return(document.getElementById("TopWizDiv4"));
1258		case "WizFrame5":
1259			return (document.getElementById("TopWizDiv5"));
1260		case "WizFrame6":
1261			return (document.getElementById("TopWizDiv6"));
1262		case "WizFrame7":
1263			return (document.getElementById("TopWizDiv7"));
1264		case "PhotoFrame":
1265			return(document.getElementById("TopPhotoDiv"));
1266		case "TopDivDialog":
1267			return(document.getElementById("TopDivDialog"));
1268		default:
1269			return(null);
1270	}
1271}
1272
1273function GetDivContainer(IdFrame)
1274{
1275	var divContainer = GetDivContainerNoAlert(IdFrame);
1276	if(divContainer == null)
1277	{
1278		alert("GetDivContainer: IFrame " + IdFrame + " sconosciuto!");
1279	}
1280	return(divContainer);
1281}
1282
1283function GetNumberWizContainer(IdFrame)
1284{
1285	switch(IdFrame)
1286	{
1287		case "WizFrame1":
1288			return(1);
1289		case "WizFrame2":
1290			return(2);
1291		case "WizFrame3":
1292			return(3);
1293		case "WizFrame4":
1294			return(4);
1295		case "WizFrame5":
1296			return(5);
1297		case "WizFrame6":
1298			return(6);
1299		case "WizFrame7":
1300			return(7);
1301		default:
1302			alert("GetNumberWizContainer: IFrame " + IdFrame + " sconosciuto!");
1303			return(0);
1304	}
1305}
1306
1307function GetPercWizContainer(WizNumber)
1308{
1309	switch(WizNumber)
1310	{
1311		case 1:
1312			return(0.95);
1313		case 2:
1314			return(0.90);
1315		case 3:
1316			return(0.85);
1317		case 4:
1318			return(0.80);
1319		case 5:
1320			return(0.75);
1321		case 6:
1322			return(0.70);
1323		case 7:
1324			return(0.65);
1325		default:
1326			alert("WizContainer: " + WizNumber + " sconosciuto!");
1327			return(0.6);
1328	}
1329}
1330
1331function IsWizContainer(IdFrame)
1332{
1333	switch(IdFrame)
1334	{
1335		case "WizFrame1":
1336		case "WizFrame2":
1337		case "WizFrame3":
1338		case "WizFrame4":
1339		case "WizFrame5":
1340		case "WizFrame6":
1341		case "WizFrame7":
1342			return(true);
1343		default:
1344			return(false);
1345	}
1346}
1347
1348function GetTopArea(IdArea, ShowMsgErr)
1349{
1350	var Elem = document.getElementById(IdArea);
1351	if(Elem == null)
1352	{
1353		if(ShowMsgErr == true)
1354		{
1355			alert("top." + IdArea + " non trovata!");
1356		}
1357		return(null);
1358	}
1359	return(Elem.contentWindow);
1360}
1361
1362function GetTopAreaName(IdArea, ShowMsgErr)
1363{
1364	var Elem = document.getElementById(IdArea);
1365	if(Elem == null)
1366	{
1367		if(ShowMsgErr == true)
1368		{
1369			alert("top." + IdArea + " non trovata!");
1370		}
1371		return("");
1372	}
1373	return(IdArea);
1374}
1375
1376function GetTopTitArea(ShowMsgErr)
1377{
1378	return(GetTopArea("TitArea", ShowMsgErr));
1379}
1380
1381function GetTopFunArea(ShowMsgErr)
1382{
1383	return(GetTopArea("FunArea", ShowMsgErr));
1384}
1385
1386function GetTopPrimMainArea(ShowMsgErr)
1387{
1388	return(GetTopArea("PrimMainArea", ShowMsgErr));
1389}
1390
1391function GetTopCorrMainArea(ShowMsgErr)
1392{
1393	return(GetTopArea("CorrMainArea", ShowMsgErr));
1394}
1395
1396function GetTopHideMainArea(ShowMsgErr)
1397{
1398	return(GetTopArea("HideMainArea", ShowMsgErr));
1399}
1400
1401function GetTopPrimMainAreaName(ShowMsgErr)
1402{
1403	var Elem = GetTopPrimMainArea(ShowMsgErr);
1404	if(Elem == null)
1405	{
1406		return("");
1407	}
1408	try
1409	{
1410		return(Elem.name);
1411	}
1412	catch(Err)
1413	{
1414		return("");
1415	}
1416}
1417
1418function GetTopCorrMainAreaName(ShowMsgErr)
1419{
1420	var Elem = GetTopCorrMainArea(ShowMsgErr);
1421	if(Elem == null)
1422	{
1423		return("");
1424	}
1425	return(Elem.name);
1426}
1427
1428function GetTopHideMainAreaName(ShowMsgErr)
1429{
1430	var Elem = GetTopHideMainArea(ShowMsgErr);
1431	if(Elem == null)
1432	{
1433		return("");
1434	}
1435	return(Elem.name);
1436}
1437
1438function RicaricaTop()
1439{
1440	var s = document.location.href;
1441	var n = s.toLowerCase().indexOf(".aspx");
1442	if(n >= 0)
1443	{
1444		s = s.substring(0, n + 5);
1445	}
1446	document.location.href = s;
1447}
1448
1449function GetAbilitaNavigazione()
1450{
1451	return(mAbilitaNavigazione);
1452}
1453
1454function SetAbilitaNavigazione(Valore)
1455{
1456	mAbilitaNavigazione = Valore;
1457}
1458
1459function TestCorrIsModify()
1460{
1461	if(SuHrWeb() == false)
1462	{
1463		return(false);
1464	}
1465	var TopArea = GetTopCorrMainArea(false);
1466	if(TopArea == null)
1467	{
1468		return(false);
1469	}
1470	try
1471	{
1472		if(TopArea.onChange_Record == null)
1473		{
1474			return(false);
1475		}
1476	}
1477	catch(Err)
1478	{
1479		return(false);
1480	}
1481	return(!TopArea.onChange_Record());
1482}
1483
1484function myHtmlEncode(Valore)
1485{
1486	Valore = Valore.replace(/&/g, "&amp;");
1487	Valore = Valore.replace(/"/g, "&quot;");
1488	Valore = Valore.replace(/'/g, "&#39;");
1489	Valore = Valore.replace(/</g, "&lt;");
1490	Valore = Valore.replace(/>/g, "&gt;");
1491	Valore = Valore.replace(/\n/g, "<br>");
1492	//Valore = Valore.replace("\n", "<br>");
1493	return(Valore);
1494}
1495
1496
1497
1498/* GESTIONE DIALOG */
1499
1500//classe dialog (div dialog)
1501//Text = testo da vidualizzare nella textbox
1502//Info informazioni per utente
1503var windlg = null;
1504function Dialog(Titolo, Text, editable, objSource)
1505{
1506	var _varText = Text;
1507	var _iWidth;
1508	var _iHeight;
1509	var _iMaxWidth;
1510	var _iMaxHeight;
1511	var _editable;
1512	var _titolo = Titolo;
1513	var _this = this;
1514	var _Objcampo = typeof (objSource) == 'undefined' ? null : objSource;
1515
1516	if(typeof (editable) == 'undefined')
1517	{
1518		_editable = false;
1519	}
1520	else
1521	{
1522		_editable = editable;
1523	}
1524
1525	this.HtmlEncodeOnShow = true;
1526	this.CloseBoxAsConferma = false;
1527	this.show = function (percWidth, percHeight, percMaxWidth, percMaxHeight)
1528	{
1529		var objHtml;
1530		var objDiv;
1531		_iWidth = percWidth;
1532		_iHeight = percHeight;
1533		_iMaxWidth = percMaxWidth;
1534		_iMaxHeight = percMaxHeight;
1535
1536
1537		objHtml = _gElem("dlgtitolo");
1538
1539		if(objHtml != null)
1540		{
1541			if(typeof (objHtml.textContent) != 'undefined')
1542			{
1543				objHtml.textContent = _titolo;
1544			}
1545			else
1546			{
1547				objHtml.innerText = _titolo;
1548			}
1549		}
1550
1551
1552		objDiv = top.GetDivDialog();
1553		if(objDiv != null)
1554		{
1555			if(_editable)
1556			{
1557				objHtml = _gElem("DivDialogDivBody");
1558				objHtml.style.overflow = 'hidden';
1559				var iLength = _Objcampo.getAttribute("maxlength");
1560				objHtml.innerHTML = "<textarea onkeypress='return(popupedit_KeyPress(event,this))'; maxlength='" + iLength + "' id='textDialog" + _Objcampo.id + "' style='width:100%;height:100%;overflow:auto;margin-left:-1px;font-family: system, sans-serif;font-size:11px'>" + _varText + "</textarea>";
1561				objHtml = _gElem("textDialog" + _Objcampo.id);
1562				objHtml.style.backgroundColor = 'white';
1563				setTimeout("impostaFuoco('textDialog" + _Objcampo.id + "');", 500);
1564
1565
1566			}
1567			else
1568			{
1569
1570				objHtml = _gElem("DivDialogDivBody");
1571				var t = _varText;
1572				if(this.HtmlEncodeOnShow)
1573				{
1574					t = myHtmlEncode(_varText);
1575				}
1576				objHtml.innerHTML = "<p id='DialogDivBody' class='ClsDialogParBody'>" + t + "</p>";
1577				//objHtml.style.backgroundColor = '#DADCD3';
1578				objHtml = _gElem("DivDialogBtConferma");
1579				if(objHtml != null)
1580				{
1581					objHtml.style.display = 'none';
1582				}
1583				var obj = _gElem("DivDialogBtchiudi");
1584				obj.setAttribute("type", "");
1585				setTimeout("impostaFuoco('" + obj.id + "');", 0);
1586
1587			}
1588			this.refresh();
1589		}
1590
1591	};
1592
1593	this.getVisible = function ()
1594	{
1595		var objDiv = GetDivDialog();
1596		if(objDiv != null)
1597		{
1598			if(objDiv.style.display == 'none')
1599			{
1600				return(false);
1601			}
1602			else
1603			{
1604				return(true);
1605			}
1606		}
1607		return(false);
1608	};
1609
1610	this.hide = function (formBt)
1611	{
1612		if(typeof (formBt) == 'undefined' || formBt == false)
1613		{
1614			if(this.CloseBoxAsConferma)
1615			{
1616				var obj = _gElem("DivDialogBtConferma");
1617				obj.click();
1618			}
1619		}
1620		if(_Objcampo != null)
1621		{
1622			try
1623			{
1624				_Objcampo.focus();
1625			}
1626			catch(Err)
1627			{
1628			}
1629		}
1630
1631		NascondiDivDialog();
1632	};
1633
1634	this.setText = function (Text)
1635	{
1636		_varText = Text;
1637	};
1638
1639	this.GetVisibleBtClosed = function ()
1640	{
1641		var obj = _gElem("DivDialogBtchiudi");
1642		if(obj == null)
1643		{
1644			return(false);
1645		}
1646		if(obj.style.display == '')
1647		{
1648			return(true);
1649		}
1650		return(false);
1651	};
1652
1653	this.GetVisibleBtConferma = function ()
1654	{
1655		var obj = _gElem("DivDialogBtConferma");
1656		if(obj == null)
1657		{
1658			return(false);
1659		}
1660		if(obj.style.display == '')
1661		{
1662			return(true);
1663		}
1664		return(false);
1665	};
1666
1667	this.SetBtClosedText = function (Text)
1668	{
1669		var obj = _gElem("DivDialogBtchiudi");
1670		if(obj == null)
1671		{
1672			return;
1673		}
1674		if(Text != "")
1675		{
1676			if(typeof (obj.textContent) != 'undefined')
1677			{
1678				obj.textContent = Text;
1679			}
1680			else
1681			{
1682				obj.innerText = Text;
1683			}
1684			obj.style.display = '';
1685			this.CloseBoxAsConferma = false;
1686		}
1687		else
1688		{
1689			obj.style.display = 'none';
1690		}
1691	};
1692
1693	this.SetBtConferma = function (Text)
1694	{
1695		var obj = _gElem("DivDialogBtConferma");
1696		if(obj == null)
1697		{
1698			return;
1699		}
1700		if(Text != "")
1701		{
1702			if(typeof (obj.textContent) != 'undefined')
1703			{
1704				obj.textContent = Text;
1705			}
1706			else
1707			{
1708				obj.innerText = Text;
1709			}
1710			obj.style.display = '';
1711			this.CloseBoxAsConferma = true;
1712			if(this.GetVisibleBtClosed())
1713			{
1714				this.CloseBoxAsConferma = false;
1715			}
1716			obj.onclick = function ()
1717			{
1718				impostavalore(_Objcampo);
1719				windlg.hide(true);
1720			};
1721		}
1722		else
1723		{
1724			obj.style.display = 'none';
1725		}
1726	};
1727
1728	function impostavalore(objDest)
1729	{
1730		if(objDest != null)
1731		{
1732			var svalore = _this.getText();
1733			if(objDest.value != svalore)
1734			{
1735				objDest.value = _this.BtConfermaFun(svalore);
1736				if(typeof (objDest.onchange) == 'function')
1737				{
1738					objDest.onchange();
1739				}
1740			}
1741		}
1742	}
1743
1744	//Questa funzione viene chiamata sul conferma
1745	this.BtConfermaFun = function (txt)
1746	{
1747		return(txt);
1748	};
1749
1750	this.getText = function ()
1751	{
1752		var obj;
1753		var s = "";
1754		if(_editable)
1755		{
1756			obj = _gElem("textDialog" + _Objcampo.id);
1757			s = obj.value;
1758		}
1759		else
1760		{
1761			obj = _gElem("DialogDivBody");
1762			s = (typeof (obj.textContent) != 'undefined') ? obj.textContent : obj.innerText;
1763		}
1764		return(s);
1765	};
1766
1767	this.refresh = function ()
1768	{
1769		var objDiv = top.GetDivDialog();
1770		if(typeof (_iWidth) == 'undefined' || _iWidth == "")
1771		{
1772			_iWidth = "30%";
1773		}
1774		if(typeof (_iMaxWidth) == 'undefined' || _iMaxWidth == "")
1775		{
1776			_iMaxWidth = "60%";
1777		}
1778
1779		if(typeof (_iHeight) == 'undefined' || _iHeight == "")
1780		{
1781			_iHeight = "30%";
1782		}
1783		if(typeof (_iMaxHeight) == 'undefined' || _iMaxHeight == "")
1784		{
1785			_iMaxHeight = "60%";
1786		}
1787		_iHeight = _formatSize(_iHeight, false);
1788		objDiv.style.height = _iHeight;
1789
1790		_iMaxHeight = _formatSize(_iMaxHeight, false);
1791		objDiv.style.maxHeight = _iMaxHeight;
1792
1793		_iWidth = _formatSize(_iWidth, true);
1794		objDiv.style.width = _iWidth;
1795
1796		_iMaxWidth = _formatSize(_iMaxWidth, true);
1797		objDiv.style.maxWidth = _iMaxWidth;
1798
1799
1800		objDiv.style.left = ((GetClientWidth() - parseInt(_iWidth)) / 2) + 'px';
1801		objDiv.style.top = ((GetClientHeight() - parseInt(_iHeight)) / 2) + 'px';
1802		MostraDivDialog();
1803	};
1804
1805	function _formatSize(iSize, bWidth)
1806	{
1807		var iPos = iSize.lastIndexOf("%");
1808
1809		var iPerc;
1810		if(iPos == iSize.length - 1)
1811		{
1812
1813			iPerc = iSize.substring(0, iPos);
1814			if(bWidth)
1815			{
1816				iSize = parseInt(screen.availWidth / 100 * iPerc);
1817			}
1818			else
1819			{
1820				iSize = parseInt(screen.availHeight / 100 * iPerc);
1821			}
1822		}
1823		iPos = iSize.toString().toLowerCase().lastIndexOf("px");
1824		if(iPos == -1 && iSize.toString().toLowerCase() != 'auto')
1825		{
1826			iSize = iSize + "px";
1827		}
1828		return(iSize);
1829	}
1830	/* inizio metodi privati */
1831	function _gElem(sId)
1832	{
1833		return(document.getElementById(sId));
1834	}
1835
1836	function _getValueId(sId, sValue)
1837	{
1838		var obj = _gElem(sId);
1839		return(_getValue(obj));
1840	}
1841
1842	function _getValue(obj)
1843	{
1844		if(obj == null)
1845		{
1846			return(null);
1847		}
1848		return(obj.value);
1849	}
1850
1851	function _setValue(obj, sValue)
1852	{
1853		if(obj == null)
1854		{
1855			return;
1856		}
1857		obj.value = sValue;
1858	}
1859	/* fine metodi privati */
1860}
1861
1862function ShowDialogMsg(Titolo, vText, stestoChiudi, objSource)
1863{
1864	if(typeof (stestoChiudi) == 'undefined' || stestoChiudi == null)
1865	{
1866		stestoChiudi = MsgConfChiudi;
1867	}
1868	vText = vText.replaceAll("$$$br$$$", "\n");
1869	windlg = new Dialog(Titolo, vText, false, objSource);
1870	windlg.SetBtClosedText(stestoChiudi);
1871	windlg.show("40%", "30%", "60%", "50%");
1872	return(windlg);
1873}
1874
1875function ShowDialogMsgNoEncode(Titolo, vText, stestoChiudi, objSource)
1876{
1877	if(typeof (stestoChiudi) == 'undefined' || stestoChiudi == null)
1878	{
1879		stestoChiudi = MsgConfChiudi;
1880	}
1881	windlg = new Dialog(Titolo, vText, false, objSource);
1882	windlg.SetBtClosedText(stestoChiudi);
1883	windlg.HtmlEncodeOnShow = false;
1884	windlg.show("40%", "30%", "60%", "50%");
1885	return(windlg);
1886}
1887
1888function ShowDialogEdit(Titolo, ObjSource, stestoConferma, stestoChiudi)
1889{
1890	if(typeof (stestoChiudi) == 'undefined' || stestoChiudi == null)
1891	{
1892		stestoChiudi = "";
1893	}
1894
1895	if(typeof (stestoConferma) == 'undefined' || stestoConferma == null)
1896	{
1897		stestoConferma = "Ok";
1898	}
1899
1900	windlg = new Dialog(Titolo, ObjSource.value, true, ObjSource);
1901
1902	windlg.SetBtClosedText(stestoChiudi);
1903	windlg.SetBtConferma(stestoConferma);
1904
1905	//la x della win funziona come bt conferma
1906	windlg.ShowCloseBox = false;
1907
1908	windlg.show("40%", "30%", "60%", "50%");
1909	return(windlg);
1910}
1911
1912function ShowDialogTrova(Titolo, ObjSource, stestoConferma, stestoChiudi, BtConfermaFun)
1913{
1914	if(typeof (stestoChiudi) == 'undefined' || stestoChiudi == null)
1915	{
1916		stestoChiudi = "";
1917	}
1918
1919	if(typeof (stestoConferma) == 'undefined' || stestoConferma == null)
1920	{
1921		stestoConferma = "Ok";
1922	}
1923
1924	windlg = new Dialog(Titolo, ObjSource.value, true, ObjSource);
1925
1926	windlg.SetBtClosedText(stestoChiudi);
1927	windlg.SetBtConferma(stestoConferma);
1928	//windlg.BtConfermaFun = BtConfermaFun;
1929	//la x della win funziona come bt conferma
1930	windlg.ShowCloseBox = false;
1931	windlg.BtConfermaFun = BtConfermaFun;
1932
1933	windlg.show("40%", "30%", "60%", "50%");
1934	return(windlg);
1935}
1936
1937var LastEnlarge = -1;
1938function EnlargeDvTop(Large, Height)
1939{
1940	if(TopDvTop == null)
1941	{
1942		return(false);
1943	}
1944	if(LastEnlarge == Height)
1945	{
1946		return(true);
1947	}
1948	if(Large)
1949	{
1950		TopDvTop.style.height = Height + "px";
1951	}
1952	else
1953	{
1954		TopDvTop.style.height = Height + "px";
1955		RicalcolaTopMenuSize(Height);
1956	}
1957	LastEnlarge = Height;
1958	var ta = GetTopTitArea(false);
1959	if(ta != null)
1960	{
1961		if(ta.AfterEnlargeDvTop != null)
1962		{
1963			ta.AfterEnlargeDvTop(Large);
1964		}
1965	}
1966	return(true);
1967}
1968
1969function RicalcolaTopMenuSize(Height)
1970{
1971	if(TitleSize != Height && Height > 20)
1972	{
1973		TitleSize = Height;
1974		SetSize(true);
1975	}
1976}
1977
1978function popupedit_KeyPress(obJevent, objTxt)
1979{
1980	var ilen = objTxt.getAttribute("maxlength");
1981	if(obJevent.keyCode == 13 && ilen <= 254)
1982	{
1983		if(typeof (obJevent.cancelBubble) != 'undefined')
1984		{
1985			obJevent.cancelBubble = true;
1986		}
1987		else
1988		{
1989			obJevent.stopPropagation();
1990		}
1991		return(false);
1992	}
1993	return(true);
1994}
1995
1996function impostaFuoco(sid)
1997{
1998	var obj = document.getElementById(sid);
1999
2000	if(obj != null)
2001	{
2002		try
2003		{
2004			obj.focus();
2005		}
2006		catch(Err)
2007		{
2008		}
2009		if(obj.tagName == "TEXTAREA")
2010		{
2011			//metto cursore
2012			var val = obj.value;
2013			obj.value = '';
2014			obj.value = val;
2015		}
2016	}
2017}
2018
2019/* Gestione Context Menu */
2020var menuObj = null;
2021
2022function GetMouseX(e)
2023{
2024	if(e.pageX == null)
2025	{
2026		if(event != null)
2027		{
2028			return(event.clientX);
2029		}
2030		else
2031		{
2032			return(e.clientX);
2033		}
2034	}
2035	else
2036	{
2037		return(e.pageX);
2038	}
2039}
2040
2041function GetMouseY(e)
2042{
2043	if(e.pageY == null)
2044	{
2045		if(event != null)
2046		{
2047			return(event.clientY);
2048		}
2049		else
2050		{
2051			return(e.clientY);
2052		}
2053	}
2054	else
2055	{
2056		return(e.pageY);
2057	}
2058}
2059
2060function ShowCtxMenu(DivId, e, ObjSource, blockMenu = false)
2061{
2062	if(!blockMenu)
2063		HideCtxMenu();
2064	else
2065		HideCtxMenuNew();
2066	menuObj = document.getElementById(DivId);
2067	if(menuObj == null)
2068	{
2069		return(false);
2070	}
2071
2072	//Dimensione window
2073	var ScreenX = GetClientWidth();
2074	var ScreenY = GetClientHeight();
2075
2076	var PosX = 0;
2077	var PosY = 0;
2078	if(typeof (ObjSource) == "undefined")
2079	{
2080		//Posizione Mouse
2081		PosX = GetMouseX(e);
2082		PosY = GetMouseY(e);
2083	}
2084	else
2085	{
2086		//Posizione in base all'oggetto
2087		PosX = ObjSource.offsetLeft - 15;
2088		PosY = ObjSource.offsetTop + 40;
2089	}
2090
2091	//Dimensione Popup Div
2092	menuObj.style.display = "block";
2093	var SizeDivX = menuObj.offsetWidth;
2094	var SizeDivY = menuObj.offsetHeight;
2095
2096	if(PosX + SizeDivX > ScreenX)
2097	{
2098		PosX = ScreenX - SizeDivX;
2099		if(PosX < 0)
2100		{
2101			PosX = 0;
2102		}
2103	}
2104
2105	if(PosY + SizeDivY > ScreenY)
2106	{
2107		PosY = ScreenY - SizeDivY;
2108		if(PosY < 0)
2109		{
2110			PosY = 0;
2111		}
2112	}
2113	menuObj.style.left = PosX + "px";
2114	menuObj.style.top = PosY + "px";
2115	return(false);
2116}
2117
2118function ShowCtxMenuPreferiti(e)
2119{
2120	CloseMenuLeft();
2121	if(FromForceTop3)
2122	{
2123		return;
2124	}
2125	var n = LstPreferitiKey.length;
2126	if(n <= 0)
2127	{
2128		return;
2129	}
2130	var sHTML = "";
2131	var menuApertoLabel = TraduciMessaggioJs("Msg00386", "Menu preferiti aperto, premere Esc per 
2131chiudere");
2132	var preferitiLabel = TraduciMessaggioJs("Msg00387", "Preferiti");
2133	var elencoPreferitiLabel = TraduciMessaggioJs("Msg00388", "Elenco preferiti:");
2134	sHTML += "<span id='menuPreferitiDesc' class='sr-only' aria-hidden='true'>" + menuApertoLabel + "</span>";
2135	sHTML += "<nav role='navigation' id='navPreferiti' aria-labelledby='menuPreferitiDesc' tabindex='-1' onkeydown='navPreferitiOnKeyDown(event, this);'>\r\n";
2136	sHTML += "<div class='MenuTitleDiv'>\r\n";
2137	sHTML += "<p aria-hidden='true'>" + preferitiLabel + "</p> \r\n";
2138	sHTML += "<p id='preferitiTitleLbl' class='sr-only'>" + elencoPreferitiLabel + "</p> \r\n";
2139	sHTML += "</div>\r\n";
2140	sHTML += "<div class='MenuBodyDiv'>\r\n";
2141	sHTML += "<ul class='ulNoBullets'>\r\n";
2142	for(var i = 0; i < n; i++)
2143	{
2144		sHTML += "<li class='liPreferiti' >";
2145		sHTML += "<a tabindex = '-1' class=\"aPreferiti\" href='#' onclick=\"GetTopTitArea(false).OpenMenuTop3Bis(" + LstPreferitiKey[i] + ", event);event.preventDefault();HideCtxMenuNew();\" onmousedown=\"fixLiPreferitiFocused(this);\" onblur='liPreferitiOnBlur(this);' onkeydown='liPreferitiOnKeyDown(event,this);'><div>" + HtmlEncode(LstPreferitiTitolo[i]) + "<div></a>";
2146		sHTML += "</li >\r\n";
2147	}
2148	sHTML += "</ul>\r\n";
2149	sHTML += "</div>\r\n";
2150	sHTML += "</nav>\r\n";
2151	/* Spostato sul top per farlo andare sugli iFrame */
2152	var Elem = top.document.getElementById("TopCxMenu");
2153	if(Elem != null)
2154	{
2155		Elem.innerHTML = sHTML;
2156		top.ShowCtxMenu('TopCxMenu', e, document.getElementById("ImgBookmark"), true);
2157
2158		var navPreferiti = top.document.getElementById("navPreferiti");
2159		if(navPreferiti != undefined)
2160			navPreferiti.focus();
2161
2162		top.document.getElementById("DvTop").style.height = "100%";
2163		document.getElementsByClassName("ClsBody")[0].style.height = "100%";
2164		document.getElementsByTagName("html")[0].style.height = "100%";
2165		top.EnlargeDvTop(true, document.body.clientHeight);
2166
2167		var ImgBookmark = document.getElementById("ImgBookmark");
2168		ImgBookmark.setAttribute("aria-expanded", "true");
2169		ImgBookmark.classList.add('menuOpen');
2170
2171		HideBehindMenuForSR();
2172	}
2173}
2174
2175function DelayHideCtxMenu()
2176{
2177	DelayHide = setTimeout("HideCtxMenu()", 250);
2178}
2179
2180function ClearHideCtxMenu()
2181{
2182	if(typeof (DelayHide) != "undefined")
2183	{
2184		clearTimeout(DelayHide);
2185	}
2186}
2187
2188function HideCtxMenu()
2189{
2190	ClearHideCtxMenu();
2191	if(menuObj != null)
2192	{
2193		menuObj.style.display = "none";
2194	}
2195}
2196
2197function HideCtxMenuNew(divId)
2198{
2199	ClearHideCtxMenu();
2200	if(menuObj == null && divId != undefined)
2201	{
2202		menuObj = top.document.getElementById('TopCxMenu');
2203	}
2204	if(menuObj != null)
2205	{
2206		menuObj.style.display = "none";
2207		top.document.getElementById("DvTop").style.height = document.body.clientHeight;
2208		top.document.getElementById("TitArea").contentWindow.document.getElementsByClassName("ClsBody")[0].style.height = "";
2209		top.document.getElementById("TitArea").contentWindow.document.getElementsByTagName("html")[0].style.height = "";
2210		top.EnlargeDvTop(false, top.document.getElementById("TitArea").contentWindow.document.body.clientHeight);
2211
2212		var ImgBookmark = top.document.getElementById("TitArea").contentWindow.document.getElementById("ImgBookmark");
2213		if(ImgBookmark != undefined)
2214		{
2215			ImgBookmark.setAttribute("aria-expanded", "false");
2216			ImgBookmark.classList.remove('menuOpen');
2217
2218			//ResetBehindMenuForSR()
2219			var ObjTdRight = document.getElementById("TopTdRight");
2220			if(ObjTdRight != null)
2221			{
2222				ObjTdRight.setAttribute("aria-hidden", "false");
2223			}
2224			top.document.getElementById("TitArea").contentWindow.document.getElementById("DvMenuTop").setAttribute("aria-hidden", "false");
2225		}
2226	}
2227}
2228
2229function IsShowCtxMenu()
2230{
2231	if(menuObj != null)
2232	{
2233		if(menuObj.style.display == "block")
2234		{
2235			return(true);
2236		}
2237	}
2238	return(false);
2239}
2240
2241var TimeOutDivAttesa = null;
2242function MostraDivAttesa()
2243{
2244	if(typeof (HrAppJS) != 'undefined' && typeof (HrAppJS.Attesa) == 'function')
2245	{
2246		HrAppJS.Attesa(true);
2247		return;
2248	}
2249
2250	if(TopDivAttesa == null)
2251	{
2252		return;
2253	}
2254	TopDivAttesa.style.display = "block";
2255	if(TimeOutDivAttesa != null)
2256	{
2257		clearTimeout(TimeOutDivAttesa);
2258		TimeOutDivAttesa = null;
2259	}
2260	TimeOutDivAttesa = setTimeout("NascondiDivAttesa()", 120000);
2261}
2262
2263function NascondiDivAttesa()
2264{
2265	if(typeof (HrAppJS) != 'undefined' && typeof (HrAppJS.Attesa) == 'function')
2266	{
2267		HrAppJS.Attesa(false);
2268		return;
2269	}
2270
2271	if(TopDivAttesa == null)
2272	{
2273		return;
2274	}
2275	TopDivAttesa.style.display = "none";
2276	if(TimeOutDivAttesa != null)
2277	{
2278		clearTimeout(TimeOutDivAttesa);
2279		TimeOutDivAttesa = null;
2280	}
2281}
2282
2283function DelayDivAttesa(Millisec)
2284{
2285	var bApp = (typeof (HrAppJS) != 'undefined');
2286	if(bApp == false && TopDivAttesa == null)
2287	{
2288		return;
2289	}
2290	if(TimeOutDivAttesa != null)
2291	{
2292		clearTimeout(TimeOutDivAttesa);
2293		TimeOutDivAttesa = null;
2294	}
2295	TimeOutDivAttesa = setTimeout("NascondiDivAttesa()", Millisec);
2296}
2297
2298function GestDivAttesa(Pagina)
2299{
2300	if(Pagina == null || Pagina == "")
2301	{
2302		NascondiDivAttesa();
2303		return;
2304	}
2305	Pagina += '';
2306	var NewPag = Pagina.toLowerCase();
2307	if(NewPag.indexOf("/homeinaz.aspx") >= 0)
2308	{
2309		NascondiDivAttesa();
2310		return;
2311	}
2312	if(NewPag.indexOf("/homecliente.aspx") >= 0)
2313	{
2314		NascondiDivAttesa();
2315		return;
2316	}
2317	if(NewPag.indexOf("/home.aspx") >= 0)
2318	{
2319		NascondiDivAttesa();
2320		return;
2321	}
2322	if(top.GetHomePageName != null)
2323	{
2324		if(NewPag.indexOf("/" + top.GetHomePageName().toLowerCase()) >= 0)
2325		{
2326			NascondiDivAttesa();
2327			return;
2328		}
2329	}
2330	if(NewPag.indexOf("/goics.aspx") >= 0)
2331	{
2332		NascondiDivAttesa();
2333		return;
2334	}
2335	if(NewPag.indexOf("/goicsframe.aspx") >= 0)
2336	{
2337		NascondiDivAttesa();
2338		return;
2339	}
2340	if(NewPag.indexOf("/goicswin.aspx") >= 0)
2341	{
2342		NascondiDivAttesa();
2343		return;
2344	}
2345	MostraDivAttesa();
2346}
2347
2348function MostraWizMenu()
2349{
2350	TopWizMenu.style.display = "block";
2351}
2352
2353function NascondiWizMenu()
2354{
2355	TopWizMenu.style.display = "none";
2356}
2357
2358function GetTopWizMenuArea(ShowMsgErr)
2359{
2360	return(GetTopArea("WizMenu", ShowMsgErr));
2361}

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.