// JavaScript Document
var bgTimer = false;
function pageStart()
{
	/* Scroll */
	try
	{
		ScrollListener = new Fusi_scroll_listener();
		ScrollListener.construct();
	}catch(e){}
	/* Randompicheader */
	try
	{
		AjaxStartmenu = new fusi_Ajax_Startmenu();
		AjaxStartmenu.construct();
	}catch(e){}
	/* Youtubevideo Startseite */
	try
	{
		VideoAni = new fusi_VideoAni();
		VideoAni.construct();
	}catch(e){}
	//Beschreibende Bilder Galerie Modul Eintragsliste
	try
	{
		var flashDescPicContainer = document.getElementById('el_pic_container');
		flashDescPicContainer.style.visibility = "visible";
		Set_AC_FL_RunContent_GET(flashDescPicContainer.innerHTML);
		flashDescPicContainer.innerHTML = AC_FL_RunContent( "codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0","width","250","height","176","src","flash/desc_gal","quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","flash/desc_gal", "wmode", "transparent" );
		Set_AC_FL_RunContent_GET('');
	}catch(e){}
	try
	{
		/* Datumsauswahl bekommt Javascriptfunktionen */
		hurra_addEvent(document.getElementById('bookingDepartureField'),'focus',change_time_date_field);
		hurra_addEvent(document.getElementById('bookingArrivelField'),'focus',change_time_date_field);
	}catch(e){}
}
hurra_registerOnLoad(pageStart);

/* Scroll listener */
var headerOpacity = 1;
var ScrollListener;
function watch_scroll()
{
	ScrollListener.watch_scroll();
}
function Fusi_scroll_listener()
{
	this.maxAllowedScroll = document.getElementById('head_spacer').offsetHeight - document.getElementById('page_header').offsetHeight;
	this.srcrollPos;
	this.header = document.getElementById('page_header');
	this.backNav = document.getElementById('back_2_head');
	this.interval;
	
	this.construct = function()
	{
		hurra_addEvent(window,'scroll',watch_scroll);
		this.interval = window.setInterval('watch_scroll()',10);
	}
	this.watch_scroll = function()
	{
		this.srcrollPos = this.getScrollY();
		if(this.srcrollPos < this.maxAllowedScroll)
		{
			this.header.style.display = 'block';
			this.backNav.style.display = 'none';
			/* Alphawert je nach scrollen setzen */
//			headerOpacity = (maxAllowedScroll - srcrollPos) / (maxAllowedScroll / 100) / 100;
//			header.style.opacity = headerOpacity;
		}
		else
		{
			this.header.style.display = 'none';
			this.backNav.style.display = 'block';
		}
	}
	this.getScrollY = function()
	{
		if (document.body && document.body.scrollTop)
		  return document.body.scrollTop;
		if (document.documentElement && document.documentElement.scrollTop)
		  return document.documentElement.scrollTop;
		if (window.pageYOffset)
		  return window.pageYOffset;
		return 0;
	}

}

/* Ajax Bildwechsler */
var AjaxStartmenu;
function fusi_Ajax_Startmenu()
{
	this.timer = false;
	
	this.PageArray = new Array();
	this.MenupointArray = new Array();
	
	this.intervals = new Array();
	this.alphas = new Array();
	
	this.activeIndex = 0;
	
	this.construct = function()
	{
		var MenuContainer = document.getElementById('img_nav_container');
		var BgContainer = document.getElementById('bg_img_container');
		this.PageArray = new Array();
		this.MenupointArray = new Array();
		for(var i = 0; i < BgContainer.childNodes.length; i++)
		{
			this.PageArray[i] = BgContainer.childNodes[i];
		}
		for(var i = 0; i < MenuContainer.childNodes.length; i++)
		{
			this.MenupointArray[i] = MenuContainer.childNodes[i];
			hurra_addEvent(this.MenupointArray[i], 'mouseover', fusi_Ajax_Startmenu_activatePage);
		}
		for(var i = 0; i < this.PageArray.length; i++)
		{
			this.intervals[i] = false;
			if(this.activeIndex != i)
			{
				this.PageArray[i].style.opacity = 0;
				//this.PageArray[i].style.display = "none";
				this.alphas[i] = 0;
				this.MenupointArray[i].className = "";
			}
			else
			{
				this.PageArray[i].style.opacity = 1;
				//this.PageArray[i].style.display = "block";
				this.alphas[i] = 100;
				this.MenupointArray[i].className = "active";
			}
		}
		this.start_timer()
	}

	this.start_timer = function()
	{
		if(!bgTimer)
		{
			return false;
		}
		this.timer = window.setTimeout('AjaxStartmenu.start_timer_fade()',10000);
	}
	this.start_timer_fade = function()
	{
		window.clearTimeout(AjaxStartmenu.timer);
		this.timer = false;
		
		var maxIndex = this.MenupointArray.length -1;
		if(this.activeIndex+1 > maxIndex)
		{
			this.setFade(this.MenupointArray[0]);
		}
		else
		{
			this.setFade(this.MenupointArray[this.activeIndex+1]);
		}
	}

	this.returnIndex_by_menupoint = function(menupoint)
	{
		for(var i = 0; i < this.MenupointArray.length ;i++)
		{
			if(this.MenupointArray[i].id == menupoint.id)
			{
				return i;
			}
		}
	}
	this.setFade = function(menupoint)
	{
		var index = this.returnIndex_by_menupoint(menupoint);
		if(index != this.activeIndex)
		{
			this.activeIndex = index;
			for(var i = 0; i < this.MenupointArray.length; i++)
			{
				if(i == this.activeIndex)
				{
					this.PageArray[i].style.display = "block";
					if(this.intervals[i] !== false)
					{
						window.clearInterval(this.intervals[i]);
						this.intervals[i] = false;
					}
					this.intervals[i] = window.setInterval("AjaxStartmenu.fadeIn("+i+")",50);
					this.MenupointArray[i].className = "active";
				}
				else
				{
					this.MenupointArray[i].className = "";
					if(this.alphas[i] != 0)
					{
						this.PageArray[i].style.display = "block";
						if(this.intervals[i] !== false)
						{
							window.clearInterval(this.intervals[i]);
							this.intervals[i] = false;
						}
						this.intervals[i] = window.setInterval("AjaxStartmenu.fadeOut("+i+")",50);
					}
				}
			}
		}
	}
	this.fadeOut = function(i)
	{
		var growth = -10;
		if(this.alphas[i] + growth > 0)
		{
			this.alphas[i] += growth;
			try{this.PageArray[i].style.filter = "alpha(opacity="+this.alphas[i]+")";}catch(e){}
			try{this.PageArray[i].style.opacity = this.alphas[i]/100;}catch(e){}
		}
		else
		{
			this.PageArray[i].style.display = "none";
			this.alphas[i] = 0;
			try{this.PageArray[i].style.filter = "alpha(opacity=0)";}catch(e){}
			try{this.PageArray[i].style.opacity = 0;}catch(e){}
			window.clearInterval(this.intervals[i]);
			this.intervals[i] = false;
			this.start_timer();
		}
	}
	this.fadeIn = function(i)
	{
		var growth = 10;
		if(this.alphas[i] + growth < 100)
		{
			this.alphas[i] += growth;
			try{this.PageArray[i].style.filter = "alpha(opacity="+this.alphas[i]+")";}catch(e){}
			try{this.PageArray[i].style.opacity = this.alphas[i]/100;}catch(e){}
		}
		else
		{
			this.alphas[i] = 100;
			try{this.PageArray[i].style.filter = "alpha(opacity=100)";}catch(e){}
			try{this.PageArray[i].style.opacity = 1;}catch(e){}
			window.clearInterval(this.intervals[i]);
			this.intervals[i] = false;
		}
	}
}
function fusi_Ajax_Startmenu_activatePage()
{
	window.clearTimeout(AjaxStartmenu.timer);
	AjaxStartmenu.timer = false;
	AjaxStartmenu.setFade(this);
}

/* Youtube Video */
var VideoAni;
function fusi_VideoAni()
{
	this.container = document.getElementById('youtube_container');
	this.bttn = document.getElementById('video_bttn');
	this.maxHeight = 425;
	this.height = 0;
	this.growth = 30;
	
	this.HTML = '<span onclick="fusi_VideoAni_start()">X</span><div><iframe id="videocontainer" width="610" height="374" src="http://www.youtube.com/embed/8fdeUvmvNXg?rel=0&autoplay=1&wmode=opaque" frameborder="0" allowfullscreen></iframe></div>';
	
	this.isMoving = false;
	this.interval;
	
	this.construct = function()
	{
		hurra_addEvent(this.bttn, 'click', fusi_VideoAni_start);
	}
	this.start = function()
	{
		if(this.isMoving == true)
		{
			return false;
		}
		this.isMoving = true;
		if(this.height == 0)
		{
			this.container.innerHTML = this.HTML;
			this.interval = window.setInterval('VideoAni.open()',10);
		}
		else if(this.height == this.maxHeight)
		{
			this.interval = window.setInterval('VideoAni.close()',10);
		}
		
	}
	this.open = function()
	{
		if(this.height + this.growth < this.maxHeight)
		{
			this.height = this.height + this.growth;
			this.container.style.height = this.height+'px';
		}
		else
		{
			this.height = this.maxHeight;
			this.container.style.height = this.height+'px';
			window.clearInterval(this.interval);
			this.isMoving = false;
		}
	}
	this.close = function()
	{
		if(this.height - this.growth > 0)
		{
			this.height = this.height - this.growth;
			this.container.style.height = this.height+'px';
		}
		else
		{
			this.height = 0;
			this.container.style.height = this.height+'px';
			window.clearInterval(this.interval);
			
			this.container.innerHTML = '';
			this.isMoving = false;
		}
	}
}
function fusi_VideoAni_start()
{
	VideoAni.start();
}

/* Datumsauswahl */
Date.prototype.getMonthString = function()
{
	var monthString = new Array('Jänner','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember');
	return monthString[this.getMonth()];
}
Date.prototype.getDayString = function()
{
	var dayString = new Array('Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag');
	return dayString[this.getDay()];
}
Date.prototype.getDayOfWeekIndex = function()
{
	var dayString = new Array(6,0,1,2,3,4,5);
	return dayString[this.getDay()];
}
Date.prototype.getDaysInMonth = function()
{
	var year = this.getFullYear();
    var daysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	daysInMonth[1] = ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year))) ? 29 : 28; //if is LeapYear
    return daysInMonth[this.getMonth()];
}

function change_time_date_field()
{
	var input = this;
	try
	{
		DateTimeChooser.destruct();
	}
	catch(e)
	{
		null;	
	}
	input.blur();
	DateTimeChooser = new Date_Time_Chooser('DateTimeChooser', 'pix/img_timeDatechooser/');
	DateTimeChooser.construct(input);
}
function Date_Time_Chooser(name, imgPath)
{
	this.name = name;
	this.imgPath = imgPath;
	this.callingInput = false;
	this.gloabalContainer = null;
	this.top = null;
	this.left = null;
	this.shaddow = null;
	this.contentContainer = null;
	this.timeContent = null;
	this.dateContent = null;
	this.totalWidth = 223;
	this.dateHeight = 220;
	this.totalHeight = null;
	this.id = 'timeDateChooserContainer';
	this.isOpen = false;
	this.today = new Date();
	this.selectedDate = null;
	
	this.construct = function(input)
	{
		//hurra_hide_select_for_ie6();
		
		this.callingInput = input;
		this.setDateByInput();
		this.isOpen = true;
		var pos = hurra_return_absolute_pos(input);
		this.top = pos.top+21;
		this.left = pos.left-72;

		this.totalHeight = this.dateHeight + 3;
		this.createContent();
		this.createDateContent();
	}
	this.createContent = function()
	{
		this.gloabalContainer = document.createElement('div');
		this.gloabalContainer.id = this.id;
		this.gloabalContainer.style.position = 'absolute';
		this.gloabalContainer.style.top = this.top+'px';
		this.gloabalContainer.style.left = this.left+'px';
		this.gloabalContainer.style.height = this.totalHeight+'px';
		this.gloabalContainer.style.width = this.totalWidth+'px';
		this.shaddow = document.createElement('div');
		this.shaddow.style.position = 'absolute';
		this.shaddow.style.top = '-2px';
		this.shaddow.style.left = '-2px';
		this.shaddow.style.height = this.totalHeight-1+'px';
		this.shaddow.style.width = this.totalWidth-1+'px';
		this.shaddow.className = 'timeShaddowContainer';
		this.shaddow.style.display = 'none';
//		this.shaddow.style.backgroundColor = '#F5F2EB';
//		this.shaddow.style.border = '1px solid #E8E1D1';
		this.contentContainer = document.createElement('div');
		this.contentContainer.style.position = 'absolute';
		this.contentContainer.style.top = '0px';
		this.contentContainer.style.left = '0px';
		this.contentContainer.style.height = this.totalHeight-3+'px';
		this.contentContainer.style.width = this.totalWidth-3+'px';
//		this.contentContainer.style.backgroundColor = '#E8E1CF';
//		this.contentContainer.style.lineHeight = '23px';
//		this.contentContainer.style.color = '#ffffff';
//		this.contentContainer.style.fontSize = '12px';
		this.contentContainer.className = 'timeContentContainer';
		
		this.gloabalContainer.appendChild(this.shaddow);
		this.gloabalContainer.appendChild(this.contentContainer);
		document.body.appendChild(this.gloabalContainer);
	}
	this.blurTimeInput = function()
	{
		try
		{
			this.callingInput.blur();
		}
		catch(e){void(null);}
	}
	this.changeCalenderMonth = function(type)
	{
		switch(type)
		{
			case'+':
				var nextMonth = this.selectedDate.getMonth()+1;
				this.selectedDate.setMonth(nextMonth);
				break;
			case'-':
				var lastMonth = this.selectedDate.getMonth()-1;
				this.selectedDate.setMonth(lastMonth);
				break;
		}
//		this.dateContent.childNodes[1].childNodes[2].innerHTML = this.selectedDate.getMonthString();
//		this.dateContent.childNodes[1].childNodes[3].innerHTML = this.selectedDate.getFullYear();
		
		document.getElementById('calenderMonthResult').innerHTML = this.selectedDate.getMonthString();
		document.getElementById('calenderYearResult').innerHTML = this.selectedDate.getFullYear();
		
		this.dateContent.childNodes[2].innerHTML = this.createCalenderContent();
		this.callingInput.value = this.createInputString();
	}
	this.changeCalenderYear = function(type)
	{
		switch(type)
		{
			case'+':
				var nextYear = this.selectedDate.getFullYear()+1;
				this.selectedDate.setFullYear(nextYear);
				break;
			case'-':
				var lastYear = this.selectedDate.getFullYear()-1;
				this.selectedDate.setFullYear(lastYear);
				break;
		}
//		this.dateContent.childNodes[1].childNodes[2].innerHTML = this.selectedDate.getMonthString();
//		this.dateContent.childNodes[1].childNodes[3].innerHTML = this.selectedDate.getFullYear();
		
		document.getElementById('calenderMonthResult').innerHTML = this.selectedDate.getMonthString();
		document.getElementById('calenderYearResult').innerHTML = this.selectedDate.getFullYear();
		
		this.dateContent.childNodes[2].innerHTML = this.createCalenderContent();
		this.callingInput.value = this.createInputString();
	}
	this.changeCalenderDay = function(obj)
	{
		this.selectedDate.setDate(obj.innerHTML*1);
		this.callingInput.value = this.createInputString();
		this.destruct();		
	}
	this.createDateContent = function()
	{
		this.dateContent = document.createElement('div');
		this.dateContent.style.position = 'absolute';
		this.dateContent.style.top = '0px';
		this.dateContent.style.left = '0px';
		this.dateContent.style.height = this.dateHeight+'px';
		this.dateContent.style.width = this.totalWidth-3+'px';
		var HTML = '<span style="display:none">&nbsp;</span>';
		HTML += '<div class="dateMonthYearSelectContainer">';
		
		HTML += '<div class="month_select_container">';
		HTML += '<img title="" onclick="'+this.name+'.changeCalenderMonth(\'-\');" style="left:5px; top:2px;" src="'+this.imgPath+'/arrow_month_down.gif" />';
		HTML += '<span style="font-size:12px; color:#a8b85d; font-family:Georgia, Times New Roman, Times, serif;  font-style:italic;" id="calenderMonthResult">'+this.selectedDate.getMonthString()+'</span>';
		HTML += '<img title="" onclick="'+this.name+'.changeCalenderMonth(\'+\');" style="right:5px; top:2px;" src="'+this.imgPath+'/arrow_month_up.gif" />';		
		HTML += '</div>';
		
		HTML += '<div class="year_select_container">';
		HTML += '<img title="" onclick="'+this.name+'.changeCalenderYear(\'-\');" style="left:5px; top:2px;" src="'+this.imgPath+'/arrow_month_down.gif" />';
		HTML += '<span style="font-size:12px; color:#a8b85d; font-family:Georgia, Times New Roman, Times, serif;  font-style:italic;" id="calenderYearResult">'+this.selectedDate.getFullYear()+'</span>';
		HTML += '<img title="" onclick="'+this.name+'.changeCalenderYear(\'+\');" style="right:5px; top:2px;" src="'+this.imgPath+'/arrow_month_up.gif" />';
		HTML += '</div>';		
		
//		HTML += '<img title="" onclick="'+this.name+'.changeCalenderYear(\'-\');" style="left:8px; top:0px;" src="'+this.imgPath+'/arrow_year_down.gif" />';
//		HTML += '<img title="" onclick="'+this.name+'.changeCalenderMonth(\'-\');" style="left:24px; top:0px;" src="'+this.imgPath+'/arrow_month_down.gif" />';
//		HTML += '<span style="font-size:12px; color:#a8b85d; font-family:Georgia, Times New Roman, Times, serif;  font-style:italic;" id="calenderMonthResult">'+this.selectedDate.getMonthString()+'</span>';
//		HTML += '<span style="font-size:12px; color:#a8b85d; font-family:Georgia, Times New Roman, Times, serif;  font-style:italic;" id="calenderYearResult">'+this.selectedDate.getFullYear()+'</span>';
//		HTML += '<img title="" onclick="'+this.name+'.changeCalenderMonth(\'+\');" style="right:24px; top:0px;" src="'+this.imgPath+'/arrow_month_up.gif" />';
//		HTML += '<img title="" onclick="'+this.name+'.changeCalenderYear(\'+\');" style="right:8px; top:0px;" src="'+this.imgPath+'/arrow_year_up.gif" />';
		HTML += '</div>';
		HTML += '<div class="calenderConteiner">'+this.createCalenderContent()+'</div>';
				
		//var HTML = '<span style="display:none">&nbsp;</span><div class="dateMonthYearSelectContainer"><img title="" onclick="'+this.name+'.changeCalenderYear(\'-\');" style="left:8px; top:0px;" src="'+this.imgPath+'/arrow_year_down.gif" /><img title="" onclick="'+this.name+'.changeCalenderMonth(\'-\');" style="left:24px; top:0px;" src="'+this.imgPath+'/arrow_month_down.gif" /><span style="font-size:12px; color:#a8b85d; font-family:Georgia, Times New Roman, Times, serif;  font-style:italic;">'+this.selectedDate.getMonthString()+'</span><span style="font-size:12px; color:#a8b85d; font-family:Georgia, Times New Roman, Times, serif;  font-style:italic;">'+this.selectedDate.getFullYear()+'</span><img title="" onclick="'+this.name+'.changeCalenderMonth(\'+\');" style="right:24px; top:0px;" src="'+this.imgPath+'/arrow_month_up.gif" /><img title="" onclick="'+this.name+'.changeCalenderYear(\'+\');" style="right:8px; top:0px;" src="'+this.imgPath+'/arrow_year_up.gif" /></div><div class="calenderConteiner">'+this.createCalenderContent()+'</div>';
		
		HTML += '<img title="schließen" style="position:absolute; top:0px; right:0px; cursor:pointer" onclick="'+this.name+'.destruct()"src="'+this.imgPath+'/close.gif" />';	
		this.dateContent.innerHTML = HTML;
		this.contentContainer.appendChild(this.dateContent);
	}
	this.createCalenderContent = function()
	{
		var html = '<div class="headline">M</div><div class="headline">D</div><div class="headline">M</div><div class="headline">D</div><div class="headline">F</div><div class="headline">S</div><div class="headline">S</div>';
		var cacheDate = this.selectedDate;
		var cacheDay = this.selectedDate.getDate();
		cacheDate.setDate(1);
		for(var i = 0; i < 7; i ++)
		{
			if(cacheDate.getDayOfWeekIndex()==i)
			{
				cacheDate.setDate(cacheDay);
				var maxDays = this.selectedDate.getDaysInMonth();
				for(var x = 1; x <= maxDays; x++)
				{
					if(x != this.selectedDate.getDate())
					{
						html += '<div style="cursor:pointer; color:#fff; background-color:#3196c3" onmouseover="this.style.backgroundColor =\'#a8b85d\'; this.style.color=\'#ffffff\'; '+this.name+'.blurTimeInput();" onmouseout="this.style.backgroundColor =\'#3196c3\'; this.style.color=\'#fff\';" onclick="'+this.name+'.changeCalenderDay(this)">'+x+'</div>';
					}
					else
					{
						html += '<div style="cursor:pointer; color:#fff; font-weight:bold; background-color:#a8b85d; position:relative">'+x+'</div>';
					}

					i ++;
				}
				var rest = Math.ceil(i/7)*7 - i;
				for(var x = 1; x <= rest; x++)
				{
					html += '<div style="background-color:#F5F2EB; position:relative"></div>';
				}

				break;
			}
			html += '<div style="background-color:#F5F2EB; position:relative" ></div>';
		}
		this.createInputString();
		return html;
	}
	this.createInputString = function()
	{
		return str = this.addNull(this.selectedDate.getDate())+'.'+this.addNull(this.selectedDate.getMonth()+1)+'.'+this.selectedDate.getFullYear();
	}
	this.setDateByInput = function()
	{
		this.selectedDate = new Date();
		var value = this.callingInput.value;
		if(value.length == 10)
		{
			this.selectedDate.setDate(value.substring(0,2)*1);
			this.selectedDate.setMonth(value.substring(3,5)*1-1);
			this.selectedDate.setFullYear(value.substring(6,10)*1);
		}
		this.callingInput.value = this.createInputString();	
	}
	this.addNull = function(num)
	{
		if(num < 10)
		{
			return ('0'+num).toString();
		}
		return num;
	}
	this.destruct = function()
	{
		try
		{
			this.callingInput.close_dateField();
		}catch(e){}
		
		document.body.removeChild(this.gloabalContainer);
		this.id = null;
		this.isOpen = false;
		this.callingInput = false;
		this.gloabalContainer = null;
		this.top = null;
		this.left = null;
		this.shaddow = null;
		this.contentContainer = null;
		this.timeContent = null;
		this.dateContent = null;
		this.totalHeight = null;
		this.selectedDate = null;
		
		//hurra_show_select_for_ie6();
	}	
}
var DateTimeChooser;

//
// Funktionen für die 2te Inhaltsebene
//
var Hurra2ndWindow = null;
function hurra_create_2ndWindow(width, html)
{
	hurra_lockPage_firstLevel();
	var pageSize = hurra_getPageSize();
	var pageScroll = hurra_getPageScroll();
	
	Hurra2ndWindow  = document.createElement('div');
	Hurra2ndWindow.id = 'hurra2ndWindow';
	document.body.appendChild(Hurra2ndWindow);
	Hurra2ndWindow.innerHTML =
	'<div class="close_hurra2ndWindow" onclick="hurra_unlockPage_firstLevel()"><span class="close_hurra2ndWindow_x">X</span><span class="close_hurra2ndWindow_txt">schließen</span><div class="clear_both">&nbsp;</div></div>'
	+'<div id="hurra2ndWindow_scrollContentContainer"><div id="hurra2ndWindow_contentContainer">'+html+'</div></div>';
	Hurra2ndWindow.style.width = width + 'px';
	Hurra2ndWindow.style.top = (pageScroll.yScroll + (pageSize.windowHeight - Hurra2ndWindow.offsetHeight) / 2) + 'px';
	Hurra2ndWindow.style.left = ((pageSize.pageWidth - Hurra2ndWindow.offsetWidth) / 2) + 'px';
	//Hinzufügen zu den zu schließenden Elementen
	HurraLockPageFirstLevelChilds[HurraLockPageFirstLevelChilds.length] = Hurra2ndWindow;
}

var HurraLockPageFirstLevelChilds = new Array();

var HurraLockPageFirstLevelOpacity = 90;
var HurraLockPageFirstLevel = null;
function hurra_lockPage_firstLevel()
{
	var pageSize = hurra_getPageSize();
	HurraLockPageFirstLevel = document.createElement('div');
	HurraLockPageFirstLevel.id = 'page_lock_firstLevel';
	HurraLockPageFirstLevel.style.display = 'block';
	document.body.appendChild(HurraLockPageFirstLevel);
	HurraLockPageFirstLevel.style.filter = 'alpha(opacity='+HurraLockPageFirstLevelOpacity +')';
	HurraLockPageFirstLevel.style.opacity = HurraLockPageFirstLevelOpacity/100;
	HurraLockPageFirstLevel.style.height = pageSize.pageHeight + 'px';
	HurraLockPageFirstLevel.style.width = '100%';
	//hurra_addEvent(HurraLockPageFirstLevel,'click',hurra_unlockPage_firstLevel);
}
function hurra_lockPage_firstLevel_fix()
{
	var pageSize = hurra_getPageSize();
	HurraLockPageFirstLevel = document.createElement('div');
	HurraLockPageFirstLevel.id = 'page_lock_firstLevel';
	HurraLockPageFirstLevel.style.display = 'block';
	document.body.appendChild(HurraLockPageFirstLevel);
	HurraLockPageFirstLevel.style.filter = 'alpha(opacity='+HurraLockPageFirstLevelOpacity +')';
	HurraLockPageFirstLevel.style.opacity = HurraLockPageFirstLevelOpacity/100;
	HurraLockPageFirstLevel.style.height = pageSize.pageHeight + 'px';
	HurraLockPageFirstLevel.style.width = '100%';
}
function hurra_unlockPage_firstLevel()
{
	try
	{
		hurra_removeNode(HurraLockPageFirstLevel);
		HurraLockPageFirstLevel = null;
		for(var i = 0; i < HurraLockPageFirstLevelChilds.length; i++)
		{
			hurra_removeNode(HurraLockPageFirstLevelChilds[i]);
		}
		HurraLockPageFirstLevelChilds = new Array();		
	}
	catch(e){}
	try
	{
		DateTimeChooser.destruct();
	}
	catch(e)
	{
		null;	
	}
}


