/*
function checkdate(datum,formatted)				-67
function enlarge_pic(img,w,h,factor)			-110
function is_empty(field)						-127
function money_format(m)						-144
function schliessen()							-179
function is_num(value)							-191
function show_copyright()						-202
function fokus_setzen(formular,feld)			-218
function zurueck()								-225
function js_redirect(formular)					-231
function bb()									-244
function set_cid()								-265
function highlight(e)							-279
function stop_highlight(e)						-291
function spell_check(inp)						-302
function change_bool(elem)						-318
function required(aRequired,e)					-330
function fillcheck(form,button,aRequired)		-344
function email_open(headline, subject)			-364
function isEmail(fm, fld)						-375
function checkEmail (strng)						-388
function set_conf_cancel(id)					-426
function cncl()									-438
function addhandlers(f)							-454
function change_content(p, id)					-468
function mark(a)								-487
function form_reset(f,post)						-502
function insert(aTag, eTag, formular, feld, url)-525
function send_reminder_date()					-595
function send_reminder_short()					-601
function send_reminder_long()					-607
function admin_check(user)						-617
function iframecheck()							-1327























*/

/****************************
*    Datum prüfen - Form: XX.XX.XXXX
*   prüft nur bei Jahr > 2000
*   gibt Datum als Array zurück, wenn das Datum existiert
*	wenn formatted == true: wird am Punkt gesplittet
*	sonst am Bindestrich und entsprechend umgesetzt
*/
function checkdate(datum,formatted)    // dat muss das Format Tag.Monat.Jahr haben !
{
    if((!datum) || (datum == null)) return false;
    datum = String(datum);
    if(formatted)
    {
        var aDat = datum.split('.'); // Datum am Komma aufsplitten
        var day     = parseInt(aDat[0],10);  // Basis 10, um Hex-Interpretation bei führender 0 zu vermeiden
        var month   = parseInt(aDat[1],10);
        var year    = parseInt(aDat[2],10);
    }
    else
    {
        var aDat = datum.split('-'); // Datum am Komma aufsplitten
        var day     = parseInt(aDat[1],10);  // Basis 10, um Hex-Interpretation bei führender 0 zu vermeiden
        var month   = parseInt(aDat[2],10);
        var year    = parseInt(aDat[0],10);
    }
    var date	= new Date();
    var now		= date.getFullYear() + 2;
    if(year <= (now-2000)) year += 2000;// macht das Jahr 4-stellig
    if(year < 100) year += 1900;
    if((year < 999) && (year > 99)) return false;
    var feb     = (year % 4 == 0) ? 29 : 28;  // beim Schaltjahr hat der Februar 29 Tage
    var mDays   = new Array(0,31,feb,31,30,31,30,31,31,30,31,30,31); // Anzahl der Tage jedes Monats ! Index 1 = Januar
    if( (day && (day > 0))      &&
        (month && (month > 0 )) &&
        //(year && (year > 2000)) &&
        (day <= mDays[month])   &&
        (month <= 12) )
    {
        aDat[0] = day;
        aDat[1] = month;
        aDat[2] = year;
        return day + '.' + month + '.' + year;
    }
    return false;
}


/****************************
 * Link im Image-Tag zur Anzeige des vergrößerten Bildes
 */
function enlarge_pic(img,w,h,factor) {
    var wHeight = (h * factor) + 4;
    var wWidth = (w * factor) + 4;
    var link = "enlarge_pic.php?imgSrc=images/";
    link += img;
    link += "&imgWidth=" + (w * factor);
    link += "&imgHeight=" + (h * factor) + "'";

    //alert('left=50,top=50,width=' + wWidth + ',height=' + wHeight + ',scrollbars=no,toolbar=no,menubar=no');
    window.open(link,'vergrößert','left=50,top=50,width=' + wWidth + ',height=' + wHeight + ',scrollbars=no,toolbar=no,menubar=no');
}


/****************************
*    überprüft Eingabefelder und
*    gibt true zurück, wenn ein Feld leer ist
*/
function is_empty(field)
{
    for(var i = 0; i < field.length; i++)
    {
        var chrc = field.charAt(i);
        if((chrc != ' ') && (chrc != '\n') && (chrc != '')) return false;
    }
    return true;
}


/***************************
*    formatiert einen String aus
*    Ziffern, Punkten und Kommata
*    mit '.' als Tausender-Separator
*    und ',' als Dezimal-Trenner (Rückgabe OHNE Währungssymbol)
*/
function money_format(m)
{
    var cmp = '', res = '', a, b, c, d, nen;
    var end = new Array(), anf = new Array(), dez = new Array(), tsnd = new Array(), mSplit = new Array();
    if((m.indexOf('.') > -1) || (m.indexOf(',') > -1)) {
        if(m.indexOf(',') > -1) mSplit = m.replace(/\./g,'').split(/,/);  // entferne die Punkte und teile nach Kommata
        if(m.indexOf('.') > -1) mSplit = m.split(/\./); // waren keine Kommata vorhanden, teile den String nach Punkten
        dez = mSplit[(mSplit.length - 1)];              // der Teil NACH dem letzten Komma/Punkt
        if(dez.length == 2)        end = dez;           // bei Länge 2 des letzten Teils -> Nachkommastellen gefunden
        else if(dez.length == 1)end = (dez *= 10);      // bei Länge 1 des letzten Teils -> Nachkommastelle * 10
        else {
            nen = Math.pow(10,(dez.length - 2));// Teiler = 10 hoch (Nachkommastellen-Anzahl - 2)
            end = Math.round(dez / nen);        // rundet den Nachkommateil auf 2 Stellen
        }
        // fügt alle übrigen nach Kommata/Punkten gesplitteten Teile zusammen
        for(i = 0; i < (mSplit.length - 1); i++) cmp += parseInt(mSplit[i],10);
        cmp += end; // hängt das gerundete Ende an
    }
    else if(isNaN(m)) return false;    // evtl. Error bei NaN ausgeben
    else cmp = (m * 100).toString();   // waren weder Punkte noch Kommata vorhanden
    anf = cmp.slice(0,cmp.length - 2); // Nachkommateil
    end = cmp.slice(cmp.length - 2);   // Vorkommateil
    a = anf.length; // Zählvariable für die Tausender-Trennung
    b = a - 3;      // Zählvariable für die Tausender-Trennung
    for(c = 0; c < Math.abs(anf.length / 3);c++) {  // splittet den Vorkommateil in 3-stellige Teile auf
        tsnd[c] = anf.slice(b,a); b = (b >= 3) ? b -= 3 : 0; a -= 3;
    }
    // hängt die 3-stelligen Teile mit Punkt dazwischen aneinander
    for(d = (tsnd.length - 1); d >= 0 ; d--) res += (tsnd[d] + '.');
    // ersetzt den letzten Punkt durch ein Komma und hängt den Nachkommateil an
    res = (res.slice(0,res.length - 1) + ',' + end);
    return res;  // Rückgabe des formatierten Strings OHNE Währungssymbol
}


function schliessen()
{
    setTimeout('window.close()',300);
}


/**********************************
*    Validierung:
*    checkt onblur, ob der eingegebene
*    Wert gesetzt ist und wenn ja,
*    ob es eine Zahl ist
*/
function is_num(value)
{
    if((value != '') && (isNaN(value)))
    {
        alert('keine Zahl');
        return false;
    }
    return true;
}


function show_copyright()
{
    var htmlObj = document.getElementsByTagName('html')[0];
    var cp = document.getElementById('copyright');

    if(htmlObj.clientHeight < 700) //  schreiben Sie statt 700 z.B. eine Fensterhöhe von 2000, dann
    {                              // wird das Copyright nicht angezeigt
        cp.style.visibility = 'hidden';
    }
    else
    {
        cp.style.visiblity = 'visible';
    }
}


function fokus_setzen(formular,feld)
{
    feld_id = document.getElementById(feld);
    document.feld_id.focus();
}


function zurueck()
{
    parent.topFrame.document.tabelle.submit();
}


function js_redirect(formular)
{
    document.forms['' + formular + ''].submit();
}


/******************************
*    animierter Lauftext in der Statuszeile
*/
var text = 'dataGast                        '; // Statuszeilen-Text
var speed = 100;
var x = 0;

function bb()
{
    var a = text.substring(0,x);
    var b = text.substring(x,x+1).toUpperCase();
    var c = text.substring(x+1,text.length);
    window.status = a + b + c;
    if (x == text.length)
    {
        x = 0;
    }
    else
    {
        x++;
    }
    setTimeout('bb()',speed);
}


/****************************
*   für news.php
*/
function set_cid()
{
    document.getElementById('news').setAttribute('action','newslist.php');
    document.getElementById('news').setAttribute('target','_self');
    document.getElementById('cid').value = 'lookup';
    document.forms.news.submit();
}


/****************************
*   formatiert Formular-Textfelder
*	mit roter Umrandung und
*	peachpuff Hintergrund
*/
function highlight(e)
{
    e.style.border		= '1px solid red';
    e.style.background	= 'peachpuff';
}


/****************************
*   formatiert Formular-Textfelder
*	mit scharzer Umrandung und
*	weißem Hintergrund
*/
function stop_highlight(e)
{
    e.style.border		= '1px solid black';
    e.style.background	= 'white';
}


/********************
*	Kontrolliert die Schreibweise bei Formulareingaben
*	läßt nur Buchstaben, Zahlen, den Bindestrich und den Unterstrich zu
*/
function spell_check(inp)
{
    var term    = /[^0-9A-Za-z-\s]/;
    var result  = inp.search(term);
    if( result != -1 )
    {
        alert(' nur die Zeichen A-Z, a-z, 0-9,Bindestrich und Leerzeichen ');
        return false;
    }
    return true;
}


/********************
*	ändert den Wert von Checkboxen
*/
function change_bool(elem)
{
    var boxValue = document.getElementById(elem).value;
    boxValue     = (boxValue == 0) ? 1 : 0;
    document.getElementById(elem).value = boxValue;
}


/********************
*	gibt bei Formularfeldern
*	im Array aRequired true zurück
*/
function required(aRequired,e)
{
    for(var i=0;i<aRequired.length;i++)
    {
        if(fields[i] == e.name) return true;
    }
    return false;
}


/*********************
*	aktiviert den Submit-Button
*	erst nach Füllen aller Felder
*/
function fillcheck(form,button,aRequired)
{
    var empty = false;
    button.disabled		= true;
    //button.style.color	= 'lightgray';
    //button.style.border	= '1px solid lightgray;';
    for(var i = 0; i < form.length; i++)
    {
        var e = form.elements[i];
        if((required(aRequired,e) == true) && (e.value == '')) empty = true;
    }
    if(!empty) button.disabled = false;
    //else document.form.button.disabled = false;
    //return true;
}


/*********************
*	öffnet email.php
*/
function email_open(hdl, s)
{

    var target = "email.php?action=main.php&headline=" + hdl + "&subject=" + s + "";
    window.open(target,"","left=50,top=50,width=500,height=500,location=no");
}


/*****************************
*	Email Validierung
*/
function isEmail(fm, fld)
 {
  s = document[fm][fld].value;
  ret = (s.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1);
  if (ret && (s == "EMail@yourdomain.de"))
   {
    ret = false;
   }
  if(!ret) alert('Bitte geben Sie eine korrekte E-Mail-Adresse ein');
  return(ret);
 }

/**********************************
*	Email-Check
*/
function checkEmail (strng)
{
var error="";
var usr = "([a-zA-Z0-9][a-zA-Z0-9_.-]*|\"([^\\\\\x80-\xff\015\012\"]|\\\\[^\x80-\xff])+\")";
var domain = "([a-zA-Z0-9][a-zA-Z0-9._-]*\\.)*[a-zA-Z0-9][a-zA-Z0-9._-]*\\.[a-zA-Z]{2,5}";
var regex = "^"+usr+"\@"+domain+"$";

if (strng == "") {
   error = "Sie haben keine Email-Adresse angegeben.\n";
}
    var emailFilter = /^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    //var emailFilter =/^.+@.+\..{2,3}$/;
    //var emailFilter = / + regex + /;
    if (!(emailFilter.test(strng))) {
       error = "Bitte geben Sie ein gültige Email-Adresse an.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "Die Email-Adresse enthält ungültige Zeichen.\n";
       }
    }
    if(error) {
        alert(error);
        return false;
    }
return true;
}


/*****************************
*	Hinweis auf Datenspeicherung
*	nach geändertem Formularinhalt
*	erfordert <span> mit id zur
*	Speicherung der onchange-Information
*	Aufruf bei onclick der Buttons
*/
function set_conf_cancel(id)
{

    var button = document.getElementById(id);

    var attr = "if(cncl()) history.back();";

    button.setAttribute("onclick",attr);

}


function cncl()
{

    var msg =	"\n________________________________________\n" +
                "________________________________________\n\n" +
                "Wenn Sie abbrechen, ohne zu speichern, \n" +
                "gehen Ihre Änderungen verloren! \n\n" +
                "________________________________________\n" +
                "________________________________________\n";

    if(confirm(msg)) return true;

    return false;
}


function addhandlers(f)
{

    for(var i = 0; i < f.elements.length; i++) {
        var e = f.elements[i];
        //e.onclick = function() { set_conf_cancel('cancel'); }
        e.onchange = function() { set_conf_cancel('cancel'); }
        //e.onfocus = function() { set_conf_cancel('cancel'); }
        //e.onblur = function() { set_conf_cancel('cancel'); }
        e.onselect = function() { set_conf_cancel('cancel'); }
    }
}


function change_content(p, id)
{

    var target	= document.getElementById(id);

    var page	= p + '.php';

    //alert(page);

    var content = target.createAttribute('src');

    content.nodeValue = page;

    target.setAttributeNode(content);

    alert(target.innerHTML);
}


function mark(a)
{
    //var ul = document.getElementById('nav_ul');
    a.style.backgroundColor = 'blue';
}


/******************************
*	Formular-Reset für Text und Textareas
*	Resetten des $_POST-Arrays
*	mit post = true kann das Leeren
*	des $_POST-Arrays erreicht werden
*	(hidden-input und entspr. Abfrage
*	im Seitenkopf)
*/
function form_reset(f,post)
{
    for(var i = 0; i < f.length; i++)
    {
        var e = f.elements[i];
        if((e.type == 'text') || (e.type == 'textarea')) e.value = '';
    }
    if(post == true)
    {
        document.getElementById('empty').value = 'reset'; // setzt $_POST = array();
        f.submit();
    }
    return false;
}


/***********************************
*	formatiert markierten Text in einem
*	Formularfeld z.B. textarea
*	@params aTag,eTag einschließende Tags
*	@params formular Formularname
*	@params feld Textfeldname
*/
function insert(aTag, eTag, formular, feld, url)
{
  var input = document.forms[formular].elements[feld];
  input.focus();
  /* für Internet Explorer */
  if(typeof document.selection != 'undefined') {
    /* Einfügen des Formatierungscodes */
    var range = document.selection.createRange();
    var insText = range.text;
    if(url) {
         aTag = "<a href='" + insText + "' target='_blank'>";
         eTag = "</a>";
    }
    range.text = aTag + insText + eTag;


    /* Anpassen der Cursorposition */
    range = document.selection.createRange();

    if (insText.length == 0) {
      range.move('character', -eTag.length);
    } else {
      range.moveStart('character', aTag.length + insText.length + eTag.length);
    }
    range.select();
  }
  /* für neuere auf Gecko basierende Browser */
  else if(typeof input.selectionStart != 'undefined')
  {
    /* Einfügen des Formatierungscodes */
    var start = input.selectionStart;
    var end = input.selectionEnd;
    var insText = input.value.substring(start, end);

    if(url) {
         aTag = "<a href='" + insText + "' target='_blank'>";
         eTag = "</a>";
    }

    input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
    /* Anpassen der Cursorposition */
    var pos;
    if (insText.length == 0) {
      pos = start + aTag.length;
    } else {
      pos = start + aTag.length + insText.length + eTag.length;
    }
    input.selectionStart = pos;
    input.selectionEnd = pos;
  }
  /* für die übrigen Browser */
  else
  {
    /* Abfrage der Einfügeposition */
    var pos;
    var re = new RegExp('^[0-9]{0,3}$');
    while(!re.test(pos)) {
      pos = prompt("Einfügen an Position (0.." + input.value.length + "):", "0");
    }
    if(pos > input.value.length) {
      pos = input.value.length;
    }
    /* Einfügen des Formatierungscodes */
    var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:");
    input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos);
  }
  return false;
}


function send_reminder_date()
{
    window.open("newsletter/sendnews_date.php","sendnews","left=50,top=50,width=200,height=50,resizable=yes");
}


function send_reminder_short()
{
    window.open("newsletter/sendnews_inactive14.php","sendnews","left=50,top=50,width=200,height=50,resizable=yes");
}


function send_reminder_long()
{
    window.open("newsletter/sendnews_inactive30.php","sendnews","left=50,top=50,width=200,height=50,resizable=yes");
}


/***********************************
*    (in user_management.php)
*    Checken der Box 'Admin' checkt alle Boxen
*/
function admin_check(user) // Verwaltungsbereich: ACL-Liste 'admin' Checkbox checkt alle
{
    for(m = 1; m < 10; m++)
    {
           var elem = user + "[perm" + m + "]";
           var box = document.acl.elements[elem];
        box.checked = !box.checked;
    }
}
//-------------------------------------------------------------------------------------------

// Title: Tigra Calendar
// URL: http://www.softcomplex.com/products/tigra_calendar/
// Version: 3.2 (European date format)
// Date: 10/14/2002 (mm/dd/yyyy)
// Note: Permission given to use this script in ANY kind of applications if
//    header lines are left unchanged.
// Note: Script consists of two files: calendar?.js and calendar.html

// if two digit year input dates after this year considered 20 century.
var NUM_CENTYEAR = 30;
// is time input control required by default
var BUL_TIMECOMPONENT = false;
// are year scrolling buttons required by default
var BUL_YEARSCROLL = true;

var calendars = [];
var RE_NUM = /^\-?\d+$/;

function calendar1(obj_target) {

    // assigning methods
    this.gen_date = cal_gen_date1;
    this.gen_time = cal_gen_time1;
    this.gen_tsmp = cal_gen_tsmp1;
    this.prs_date = cal_prs_date1;
    this.prs_time = cal_prs_time1;
    this.prs_tsmp = cal_prs_tsmp1;
    this.popup    = cal_popup1;

    // validate input parameters
    if (!obj_target)
        return cal_error('Error beim Aufruf des Kalenders: ungültige Zielparameter');
    if (obj_target.value == null)
        return cal_error('Error beim Aufruf des Kalenders: ungültige Zielparameter');
    this.target = obj_target;
    this.time_comp = BUL_TIMECOMPONENT;
    this.year_scroll = BUL_YEARSCROLL;

    // register in global collections
    this.id = calendars.length;
    calendars[this.id] = this;
}

function cal_popup1 (str_datetime) {
    this.dt_current = this.prs_tsmp(str_datetime ? str_datetime : this.target.value);
    if (!this.dt_current) return;

    var obj_calwindow = window.open(
        'minical.php?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
        'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
        ',status=no,resizable=no,top=200,left=400,dependent=yes,alwaysRaised=yes'
    );
    obj_calwindow.opener = window;
    obj_calwindow.focus();
}

// timestamp generating function
function cal_gen_tsmp1 (dt_datetime) {
    return(this.gen_date(dt_datetime) + ' ' + this.gen_time(dt_datetime));
}

// date generating function
function cal_gen_date1 (dt_datetime) {
    return (
        (dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + '.'
        + (dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + '.'
        + dt_datetime.getFullYear()
    );
}
// time generating function
function cal_gen_time1 (dt_datetime) {
    return (
        (dt_datetime.getHours() < 10 ? '0' : '') + dt_datetime.getHours() + ':'
        + (dt_datetime.getMinutes() < 10 ? '0' : '') + (dt_datetime.getMinutes()) + ':'
        + (dt_datetime.getSeconds() < 10 ? '0' : '') + (dt_datetime.getSeconds())
    );
}

// timestamp parsing function
function cal_prs_tsmp1 (str_datetime) {
    // if no parameter specified return current timestamp
    if (!str_datetime)
        return (new Date());

    // if positive integer treat as milliseconds from epoch
    if (RE_NUM.exec(str_datetime))
        return new Date(str_datetime);

    // else treat as date in string format
    var arr_datetime = str_datetime.split(' ');
    return this.prs_time(arr_datetime[1], this.prs_date(arr_datetime[0]));
}

// date parsing function
function cal_prs_date1 (str_date) {

    var arr_date = str_date.split('.');

    if (arr_date.length != 3) return cal_error ("Ungültiges Datum: '" + str_date + "'.\ndas akzeptierte Format ist tt.mm.jjjj.");
    if (!arr_date[0]) return cal_error ("Ungültiges Datum: '" + str_date + "'.\nTag nicht gefunden.");
    if (!RE_NUM.exec(arr_date[0])) return cal_error ("Ungültiger Tag: '" + arr_date[0] + "'.\nNur vorzeichenlose Ganzzahlen erlaubt.");
    if (!arr_date[1]) return cal_error ("Ungültiges Datum: '" + str_date + "'.\nMonat nicht gefunden.");
    if (!RE_NUM.exec(arr_date[1])) return cal_error ("Ungültiger Monat: '" + arr_date[1] + "'.\nNur vorzeichenlose Ganzzahlen erlaubt.");
    if (!arr_date[2]) return cal_error ("Ungültiges Datum: '" + str_date + "'.\nJahr nicht gefunden.");
    if (!RE_NUM.exec(arr_date[2])) return cal_error ("Ungültiges Jahr: '" + arr_date[2] + "'.\nNur vorzeichenlose Ganzzahlen erlaubt.");

    var dt_date = new Date();
    dt_date.setDate(1);

    if (arr_date[1] < 1 || arr_date[1] > 12) return cal_error ("Ungültiger Monat: '" + arr_date[1] + "'.\nnur Monate 01-12.");
    dt_date.setMonth(arr_date[1]-1);

    if (arr_date[2] < 100) arr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900);
    dt_date.setFullYear(arr_date[2]);

    var dt_numdays = new Date(arr_date[2], arr_date[1], 0);
    dt_date.setDate(arr_date[0]);
    if (dt_date.getMonth() != (arr_date[1]-1)) return cal_error ("Ungültiger Tag: '" + arr_date[0] + "'.\nnur Tage 01-"+dt_numdays.getDate()+".");

    return (dt_date)
}

// time parsing function
function cal_prs_time1 (str_time, dt_date) {

    if (!dt_date) return null;
    var arr_time = String(str_time ? str_time : '').split(':');

    if (!arr_time[0]) dt_date.setHours(0);
    else if (RE_NUM.exec(arr_time[0]))
        if (arr_time[0] < 24) dt_date.setHours(arr_time[0]);
        else return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed range is 00-23.");
    else return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed values are unsigned integers.");

    if (!arr_time[1]) dt_date.setMinutes(0);
    else if (RE_NUM.exec(arr_time[1]))
        if (arr_time[1] < 60) dt_date.setMinutes(arr_time[1]);
        else return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed range is 00-59.");
    else return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed values are unsigned integers.");

    if (!arr_time[2]) dt_date.setSeconds(0);
    else if (RE_NUM.exec(arr_time[2]))
        if (arr_time[2] < 60) dt_date.setSeconds(arr_time[2]);
        else return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed range is 00-59.");
    else return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed values are unsigned integers.");

    dt_date.setMilliseconds(0);
    return dt_date;
}

function cal_error (str_message) {
    alert (str_message);
    return null;
}


/**********************************
*    (in details.php)
*    aktualisiert die angezeigten Saison-
*    und Feature-Tarife
*    bei Auswahl eines Objektes
*/
function window_resize()
{
    this.window.width  = 400;
    this.window.height = 400;
}


function iframecheck() {
    var str		= ""+window.document.location+"";
    var file	= str.substring(str.lastIndexOf("/") +1);
    if (parent.frames.length == 0) top.location.replace("index.php?p="+file);
}