Changing the format in javascript
<p>I would like help.I want to change to code this format from dropdown list and I do not know how.</p>

<pre><code>&lt;option value="a"&gt;28th March 2010&lt;/option&gt;
&lt;option value="b"&gt;28 March 2010&lt;/option&gt;
&lt;option value="c"&gt;28th Mar 2010&lt;/option&gt;
&lt;option value="d"&gt;28 Mar 2010&lt;/option&gt;
&lt;option value="e"&gt;28/03/2010&lt;/option&gt;
&lt;option value="f"&gt;28th March 10&lt;/option&gt;
&lt;option value="g"&gt;28 March 10&lt;/option&gt;
&lt;option value="h"&gt;28th Mar 10&lt;/option&gt;
&lt;option value="i"&gt;28 Mar 10&lt;/option&gt;
&lt;option value="j"&gt;28/03/10&lt;/option&gt;
&lt;option value="k"&gt;28th March&lt;/option&gt;
&lt;option value="l"&gt;28 March&lt;/option&gt;
&lt;option value="m"&gt;28th Mar&lt;/option&gt;
&lt;option value="o"&gt;28 Mar&lt;/option&gt;
&lt;option value="p"&gt;28/03&lt;/option&gt;

&lt;select name="day"&gt;
&lt;option value="f"&gt;Sunday&lt;/option&gt;
&lt;option value="s"&gt;Sun&lt;/option&gt;
&lt;/select&gt;

&lt;select name="time"&gt;
&lt;option value="a"&gt;5:28:12 am&lt;/option&gt;
&lt;option value="b"&gt;5:28 am&lt;/option&gt;
&lt;option value="c"&gt;5:28:12&lt;/option&gt;
&lt;option value="d"&gt;17:28:12&lt;/option&gt;
&lt;option value="e"&gt;17:28&lt;/option&gt;
&lt;option value="f"&gt;5:28&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>to this code</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;title&gt;&lt;/title&gt;
&lt;script type="text/JavaScript"&gt;

var wd=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
var D=[
['Bucharest',120],
['Madrid',60],
['New York',-300],
['Nairobi',180],
['London',0],
['Buenes Aires',-180] 
]
function calc(){
var spans=document.getElementById('zonediv').getElementsByTagName('span')
for(var i=0;i&lt;D.length;i++){
var t=new Date();
t.setTime(t.getTime()+(t.getTimezoneOffset()*60000)+((D[i][1])*60000));//the zone's time
var Dy=t.getFullYear();
var Dd=t.getDate()&lt;10?'0'+t.getDate():t.getDate();
var Dm=t.getMonth()&lt;10?'0'+(t.getMonth()+1):t.getMonth()+1;
var Dh=t.getHours()&lt;10?'0'+t.getHours():t.getHours(); 
var Di=t.getMinutes()&lt;10?'0'+t.getMinutes():t.getMinutes();
var Ds=t.getSeconds()&lt;10?'0'+t.getSeconds():t.getSeconds();
var Dz=wd[t.getDay()];
spans[i].firstChild.data=Dh+':'+Di+':'+Ds+' - '+Dz+' '+Dd+'/'+Dm+'/'+Dy;
}
setTimeout('calc()',1000)
}
onload=function(){
var root = document.getElementById('zonediv');
for(var i=0;i&lt;D.length;i++){
root.appendChild(document.createTextNode(D[i][0]+' '))
var sp= document.createElement('span');
sp.appendChild(document.createTextNode(' '));
root.appendChild(sp);root.appendChild(document.createElement('br'))
}
calc();
}
&lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;
&lt;div id="zonediv"&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
