/**
 * Preload Function
 * -> Preloads Images used with Javascript
 * @params image paths
 */
function preload () {
	var args = preload.arguments;
	if ( typeof document.imageArray == 'undefined' ) {
		document.imageArray = new Array(args.length);
	}
	for(var i=0; i<args.length; i++) {
		document.imageArray[i] = new Image;
		document.imageArray[i].src = args[i];
	}
}
//Preload();



function scrollup () {window.scrollTo(0,0)}

<!--
function popup_global(url, breite, hoehe, oben, links, modus, scrollbars) {
		
	if (url != "#")
	{
		var newWindow;
	   	var undefined;
		
		if (oben == "") {var oben = (screen.height / 2) - 125;}
		if (links == "") {var links = (screen.width / 2) - 125;}
		//esli eshe gde nibud ne budet sushestvovat var scrollbars
		if(scrollbars == undefined) {scrollbars="1";}
		newWindow=window.open(url,'fenster',"height="+hoehe+",width="+breite+",toolbar=0,scrollbars="+scrollbars+",location=0,statusbar=0,menubar=0,resizable=0,top ="+oben+",left ="+links);
		// Abfragen für fokusieren.
		if (modus == "popup")
		{
	  		newWindow.focus();
		}
		else 
		{
	  		focus();
		}
	}
}
//-->

 function reload_dp(url, variable) 
 {
 	//alert(url);
	if (variable != "")
	{
		location.href = url+''+variable+'&modul=hilfe_faq';
	}

 }

<!--
function window_global(variable, url, parameter, feld, modus, error_modus, breite, hoehe, oben, links, scrollbars) 
{
	//alert(url);
	var check_text;
	
	if (error_modus == 1)
	{
		check_text = 'auswählen';
	}
	else
	{
		check_text = 'eingeben';
	}
	
	
	if (variable != "#")
	{
		
		var newWindow;
		
		if (modus == "window")
		{
			
		   	url = url + variable + '.html?'+parameter;
			
			//alert(url);
			
			if (variable == '')
			{
				alert('Bitte '+ feld + unescape(" "+check_text+"."));
			}
			else
			{
				newWindow=window.open(url,"","");
			}
		}
		
		else if (modus == "popup")
		{
		   	var undefined;
			
			url = url + variable + parameter;
			
			if (oben == "") {var oben = (screen.height / 2) - 125;}
			if (links == "") {var links = (screen.width / 2) - 125;}
			//esli eshe gde nibud ne budet sushestvovat var scrollbars
			if(scrollbars == undefined) {scrollbars="1";}
			
			if (variable == '')
			{
				alert('Bitte '+ feld + unescape(" "+check_text+"."));
			}
			else
			{	newWindow=window.open(url,'fenster',"height="+hoehe+",width="+breite+",toolbar=0,scrollbars="+scrollbars+",location=0,statusbar=0,menubar=0,resizable=0,top ="+oben+",left ="+links);
			}
			// Abfragen für fokusieren.
			if (modus == "popup")
			{
		  		newWindow.focus();
			}
			else 
			{
		  		focus();
			}
		}
	}
	
}

function set_ibe (variable) // get_switch nur for Abflughafen
{
	qs_hmi = window.document.quicksearch.hmi.value;
	qs_region = window.document.quicksearch.region.value;
	qs_dsi = window.document.quicksearch.dsi.value;
	qs_epc = window.document.quicksearch.epc.value;
	qs_ka1 = window.document.quicksearch.ka1.value;
	qs_ka2 = window.document.quicksearch.ka2.value;
	qs_ka3 = window.document.quicksearch.ka3.value;
	qs_vnd = document.getElementById('vnd').value;
	qs_bsd = document.getElementById('bsd').value;
	qs_mmc = window.document.quicksearch.mmc.value;
	qs_stc = window.document.quicksearch.stc.value;

	
	url = variable+'/hmi='+qs_hmi+'/region='+qs_region+'/dsi='+qs_dsi+'/epc='+qs_epc+'/ka1='+qs_ka1+'/ka2='+qs_ka2+'/ka3='+qs_ka3+'/vnd='+qs_vnd+'/bsd='+qs_bsd+'/mmc='+qs_mmc+'/stc='+qs_stc+'/rmask=1/hmask=1/stp=2';

	//alert(url);
	popup_global(url, '647','850','0','0','popup','1');
}

function catcalc(cal) {
		
		var date = cal.date;
        var time = date.getTime()
        // use the _other_ field
        var field = document.getElementById("katalog-bsd");
        if (field == cal.params.inputField) {
            field = document.getElementById("katalog-vnd");
            time -= Date.WEEK; // substract one week
        } else {
            time += Date.WEEK; // add one week
            time += Date.WEEK; // add one week
        }
        var date2 = new Date(time);
        field.value = date2.print("%d.%m.%Y");
        
        jahr_vnd = document.getElementById("katalog-vnd").value; jahr_vnd = jahr_vnd.substr(6,4);
		jahr_bsd = document.getElementById("katalog-bsd").value; jahr_bsd = jahr_bsd.substr(6,4);
        
        monat_vnd = document.getElementById("katalog-vnd").value; monat_vnd = monat_vnd.substr(3,2);
		monat_bsd = document.getElementById("katalog-bsd").value; monat_bsd = monat_bsd.substr(3,2);
        
        tag_vnd = document.getElementById("katalog-vnd").value; tag_vnd = tag_vnd.substr(0,2);
		tag_bsd = document.getElementById("katalog-bsd").value; tag_bsd = tag_bsd.substr(0,2);
        
       	document.getElementById("vnd").value = new Date(jahr_vnd,monat_vnd-1,tag_vnd,12,0,0).getTime()/1000;
		document.getElementById("bsd").value = new Date(jahr_bsd,monat_bsd-1,tag_bsd,12,0,0).getTime()/1000;
        
  }
  
function setstartdatum() {
	
	var cal_startdatum = new Date();
	var cal_in7Tagen = new Date( cal_startdatum.getTime() + ( 3  * 24 * 60 * 60 * 1000) );  
	document.getElementById("katalog-vnd").value = cal_in7Tagen.print("%d.%m.%Y");
	var cal_in21Tagen = new Date( cal_startdatum.getTime() + ( 30  * 24 * 60 * 60 * 1000) );
	document.getElementById("katalog-bsd").value = cal_in21Tagen.print("%d.%m.%Y");
	
	jahr_vnd = document.getElementById("katalog-vnd").value; jahr_vnd = jahr_vnd.substr(6,4);
	jahr_bsd = document.getElementById("katalog-bsd").value; jahr_bsd = jahr_bsd.substr(6,4);
    
    monat_vnd = document.getElementById("katalog-vnd").value; monat_vnd = monat_vnd.substr(3,2);
	monat_bsd = document.getElementById("katalog-bsd").value; monat_bsd = monat_bsd.substr(3,2);
    
    tag_vnd = document.getElementById("katalog-vnd").value; tag_vnd = tag_vnd.substr(0,2);
	tag_bsd = document.getElementById("katalog-bsd").value; tag_bsd = tag_bsd.substr(0,2);
    
   	document.getElementById("vnd").value = new Date(jahr_vnd,monat_vnd-1,tag_vnd,12,0,0).getTime()/1000;
	document.getElementById("bsd").value = new Date(jahr_bsd,monat_bsd-1,tag_bsd,12,0,0).getTime()/1000;
	
}

//-->

