// BREAK-OUT
// function fehler() {
// alert("Sehr geehrter User\nDie Seite kann nicht geladen werden. Gründe dafür können sein:\n• ein Fehler unsererseits\n• der Versuch APA-Content außerhalb des APA-Framesets darzustellen\n• eine nicht mehr aktuelle Browserversion");
// top.location.replace("http://www.apa.at/"); }
	
// DATUM
var heutigesDatum = new Date();
var TagInWoche = heutigesDatum.getDay();
var Wochentag = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
var Tag = heutigesDatum.getDate();
var ddTag = ((Tag<10)?"0":"")+Tag;
var Jahresmonat = heutigesDatum.getMonth();
var mmMonat = (((Jahresmonat+1)<10)?"0":"")+(Jahresmonat+1);
var Monat = new Array("Januar","Februar","März","April","Mai","Juni", "Juli","August","September","Oktober","November","Dezember");
var JahrBasis = heutigesDatum.getYear();
var Jahr = (JahrBasis<1000)? JahrBasis+1900:JahrBasis;
var Std = heutigesDatum.getHours();
var Min = heutigesDatum.getMinutes();
var Uhrmin = ((Min<10)?"0":"")+Min;
var UhrStd = ((Std<10)?"0":"")+Std;

// ANFAHRTSPLAN
function plan() {
	window.open('http://apa.cms.apa.at/cms/site/home/plan.htm','plan','width=494,height=465,menubar=no,status=no,resizable=no'); }

// SITESEARCH
function sitesearch() {
	parent.parent.url = 'http://apa.cms.apa.at/cms/site/search.html?' + parent.document.location.href.split('?')[1];
	parent.parent.frame = 'http://apa.cms.apa.at/cms/site/sitesearch/SITESEARCHset2.htm';
	document.location.href = 'http://apa.cms.apa.at/cms/site/search.html?' + parent.document.location.href.split('?')[1]; }

// HOMEloader
function HOMEloader() {
	document.location.href = unescape(parent.document.location.href.split('?')[1]); }
	
// APA QUICKSTART
function APAQuickStart() {
	if (document.forms[1].QuickStart.selectedIndex!=0) {
	window.open(document.forms[1].QuickStart.options[document.forms[1].QuickStart.selectedIndex].value,'blank'+document.forms[1].QuickStart.options.selectedIndex);
	document.forms[1].QuickStart.selectedIndex=0; }
	}

// SCHRIFTWAHL
function lade() {
	parent.CONTENTset.location.href = "../home/HOMEsetDETAIL.htm?schrift.htm"; }

// KONTAKT-MAILER
function selecttheright() {
var suche=self.location.search.substring(1);
for (i=0; i<document.mailer.elements.length; i++) {
if (document.mailer.elements[i].value==suche) {
document.mailer.elements[i].checked=true; }
}
}

// KONSENSUS
function printConsensus() {
if (c==Math.floor(c)) c=c+".00";
document.write(c); }

// BILD/GRAFIK-MICRO
function bildgrafik() {
window.open('bildgrafik.htm','bildgrafik','width=650,height=550,menubar=no,status=no,resizable=no'); }

// TOP NEWS - ARCHIV
function history() {
	var wert = document.archiv.datum.value;
	if (wert.length != 10 || wert.substring(2,3) != "." || wert.substring(5,6) != ".") { hinweis(wert); }
	else { check2(wert); }
	}
function check2(wert) {
	var teile = wert.split(".");
	if (teile[0] < 1 || teile[0] > 31 || isNaN(teile[0]) == true || teile[1] < 1 || teile[1] > 12 || isNaN(teile[1]) == true || isNaN(teile[2]) == true) { hinweis(wert); }
	else {
	if (wert == document.archiv.datum.value) {
	var elemente = wert.split(".");
	parent.CONTENTset.document.location.href = "../news/NEWSset.htm?" + escape("../news/NEWScontent_overview_archiv.htm?datum=") + elemente[2] + elemente[1] + elemente[0]; }
	else { check1(document.archiv.datum.value); }
	}
	}
function hinweis(wert) {
	alert ("Bitte überprüfen Sie Ihre Datumseingabe (TT.MM.JJJJ): " + wert);
	if (wert == document.archiv.datum.value) {
	document.archiv.datum.focus();
	document.archiv.datum.select(); }
	}
	
// NOM-Info laden
function NOMinfo() {
HOMEset();
parent.CONTENTset.document.location.href = "../home/HOMEsetDETAIL.htm?nom_info.htm"; }

// NAVIGATION HISTORIE
function weiter() {
document.unload.status.value = "weiter"; }
function weiterCheck() {
if (document.unload.status.value != "weiter") {
parent.DOWNLOADSsubheader.changeHEADERback();
parent.DOWNLOADSsubcontent.changeCONTENTback(); }
}

// NAVIGATIONEN LADEN
function HOMEset() {
if (parent.HEADcenter.home) {
	parent.MITTEmenu.document.location.href = "../html/MITTEmenu.htm";
	parent.HEADcenter.HEADchangeHOME(); }
}
function NEWSset() {
if (parent.HEADcenter.home) {
	parent.MITTEmenu.document.location.href = "NEWSmenu.htm";
	parent.HEADcenter.HEADchangeNEWS(); }
}
function PRODUKTEset() {
if (parent.HEADcenter.home) {
	parent.MITTEmenu.document.location.href = "PRODUKTEmenu.htm";
	parent.HEADcenter.HEADchangePRODUKTE(); }
}
function APAGRUPPEset() {
if (parent.HEADcenter.home) {
	parent.MITTEmenu.document.location.href = "APA-GRUPPEmenu.htm";
	parent.HEADcenter.HEADchangeAPAGRUPPE(); }
}