﻿var date1 = new Date()
var day = date1.getDate()   // day 1 - 31 representing day of a month
var month = date1.getMonth() + 1   // month 0 - 11 representing month of a year, so add 1 and return to 1 - 12
var weekday=new Array(7)
weekday[0]="日"
weekday[1]="一"
weekday[2]="二"
weekday[3]="三"
weekday[4]="四"
weekday[5]="五"
weekday[6]="六"

// for new layout
var layout;
var wt001_degree;
var wt001_humidity;

if (layout == "new") {
document.write('            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="topweather">');
document.write('              <tr> ');
	//if (layout2 == "new2") {
		//document.write('                <td width="6">&nbsp;</td><td width="35"><a href="/index.php"><img src="http://property.singtao.com/images/home.gif" border="0" valign="bottom"></a></td><td align="left" >');
	//}else{
		document.write('                <td align="left"> ');
	//}
document.write('&nbsp;&nbsp;'+ date1.getFullYear() + ' 年' + month + '月' + day + '日 星期' + weekday[date1.getDay()] + ' ' + wt001_degree + '&#186;C ' + wt001_humidity + '%</td>');
document.write('              </tr>');
document.write('            </table>');
}
else {
document.write('            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="topweather">');
document.write('              <tr> ');
document.write('                <td> ');
document.write('                  <div align="center">&nbsp;&nbsp;' + year + '年' + month + '月' + day + '日 星期' + weekday[date1.getDay()] + '</div>');
document.write('                </td>');
document.write('              </tr>');
document.write('              <tr> ');
document.write('                <td> ');
document.write('                  <div align="center">氣溫 ：32<sup>o</sup>C&nbsp;&nbsp;&nbsp;&nbsp;濕度：67%</div>');
document.write('                </td>');
document.write('              </tr>');
document.write('            </table>');
}
