<?php
if (!defined('IS_DEDI')) die();
include_once($cfg_dedi['dedi_path'].'inc/inc.init_external.php');?>
<HTML STYLE="width:300px; Height: 60px;">
 <HEAD>
 <?php echo '<meta http-equiv="content-type" content="text/html; charset='.$lang_charset.'">'."\n"; ?>
  <TITLE><?php echo $dedi_lang['wys_pop_InsDate'] ?></TITLE>

<SCRIPT LANGUAGE="javascript">
  <!--
function shortMonthArray() {
this[0] = "Jan"; this[1] = "Feb"; this[2] = "Mar"; this[3] = "Apr"; this[4] = "May"; this[5] = "Jun";
this[6] = "Jul"; this[7] = "Aug"; this[8] = "Sep"; this[9] = "Oct"; this[10] = "Nov"; this[11] = "Dec";
return (this);
}
function deuMonthArray() {
this[0] = "Jan"; this[1] = "Feb"; this[2] = "Mar"; this[3] = "Apr"; this[4] = "Mai"; this[5] = "Jun";
this[6] = "Jul"; this[7] = "Aug"; this[8] = "Sep"; this[9] = "Okt"; this[10] = "Nov"; this[11] = "Dez";
return (this);
}
function longMonthArray() {
this[0] = "January"; this[1] = "February"; this[2] = "March"; this[3] = "April"; this[4] = "May"; this[5] = "June";
this[6] = "July"; this[7] = "August"; this[8] = "September"; this[9] = "October"; this[10] = "November"; this[11] = "December";
return (this);
}
function DeutschMonthArray() {
this[0] = "Januar"; this[1] = "Februar"; this[2] = "März"; this[3] = "April"; this[4] = "Mai"; this[5] = "Juni";
this[6] = "Juli"; this[7] = "August"; this[8] = "September"; this[9] = "Oktober"; this[10] = "November"; this[11] = "Dezember";
return (this);
}
function NumMonthArray() {
this[0] = "01"; this[1] = "02"; this[2] = "03"; this[3] = "04"; this[4] = "05"; this[5] = "06";
this[6] = "07"; this[7] = "08"; this[8] = "09"; this[9] = "10"; this[10] = "11"; this[11] = "12";
return (this);
}

function getLongYear(year){
year = d.getYear();
if (year < 1000)
year+=1900;
return year;
}

function writeShortDate(){
shortMonths = new shortMonthArray();
d = new Date();
day = d.getDate();
month = d.getMonth();
year = d.getYear();
str = shortMonths[month] +"/" +day+ "/" +getLongYear(year);
document.writeln(str);
}
function writeLongDate(){
longMonths = new longMonthArray();
d = new Date();
day = d.getDate();
month = d.getMonth();
year = d.getYear();
str = longMonths[month] + " " +day+ ", " +getLongYear(year);
document.writeln(str);
}
function deuShortDate(){
deuMonths = new deuMonthArray();
d = new Date();
day = d.getDate();
month = d.getMonth();
year = d.getYear();
str =  day + ". " + deuMonths[month] + ". " +getLongYear(year);
document.writeln(str);
}
function DeutschLongDate(){
DeutschMonths = new DeutschMonthArray();
d = new Date();
day = d.getDate();
month = d.getMonth();
year = d.getYear();
str = day + ". " + DeutschMonths[month] + " " +getLongYear(year);
document.writeln(str);
}
function NumAmerDate(){
NumMonths = new NumMonthArray();
d = new Date();
day = d.getDate();
month = d.getMonth();
year = d.getYear();
str = getLongYear(year) + "-" + NumMonths[month] + "-" +day;
document.writeln(str);
}
function NumDeuDate(){
NumMonths = new NumMonthArray();
d = new Date();
day = d.getDate();
month = d.getMonth();
year = d.getYear();
str = day+ "." +NumMonths[month]+ "." +getLongYear(year);
document.writeln(str);
}
// -->
</SCRIPT>
<SCRIPT LANGUAGE="javascript">

var myDate = window.dialogArguments;
document.title = myDate;


function returnSelected() {
  var idx  = document.all.textPulldown.selectedIndex;
  var text = document.all.textPulldown[idx].text;

  window.returnValue = text;          // set return value
  window.close();                     // close dialog
}

</SCRIPT>
<SCRIPT defer>

function _CloseOnEsc() {
  if (event.keyCode == 27) { window.close(); return; }
}
 document.body.onkeypress = _CloseOnEsc;
 </SCRIPT>
</HEAD>
<BODY BGCOLOR="#ECE9D8" TOPMARGIN=15 LEFTMARGIN=0>

<FORM>
<TABLE WIDTH="100%" BORDER="1" CELLSPACING="0" CELLPADDING="0" ALIGN="center">
<TR VALIGN="middle"><TD>&nbsp;<font face="Arial,Helvetica,sans-serif" size="2" color="#000000"><B><?php echo $dedi_lang['wys_pop_SelDateFormat'] ?></B>&nbsp;&nbsp;</FONT>
<SELECT NAME="textPulldown">
<OPTION><SCRIPT LANGUAGE="javascript">DeutschLongDate();</SCRIPT></OPTION>
<OPTION><SCRIPT LANGUAGE="javascript">deuShortDate();</SCRIPT></OPTION>
<OPTION><SCRIPT LANGUAGE="javascript">NumDeuDate();</SCRIPT></OPTION>
<OPTION><SCRIPT LANGUAGE="javascript">writeLongDate();</SCRIPT></OPTION>
<OPTION><SCRIPT LANGUAGE="javascript">writeShortDate();</SCRIPT></OPTION>
<OPTION><SCRIPT LANGUAGE="javascript">NumAmerDate();</SCRIPT></OPTION>
</SELECT>
</TD></TR>
</TABLE>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="center">
<TR><TD><div align="center"><INPUT TYPE="button" VALUE="<?php echo $dedi_lang['wys_pop_InsDate'] ?>" onClick="returnSelected()" TITLE="<?php echo $dedi_lang['wys_pop_InsDate'] ?>"></div>
</TD></TR>
</TABLE>
</FORM>
</BODY></HTML>