//These are scripts for dates, popup windows, etc
/* start date function */
//DEFINE VARIABLES
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var day = now.getDay() + 1;
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

if(day == 1) Day = "Sunday";
if(day == 2) Day = "Monday";
if(day == 3) Day = "Tuesday";
if(day == 4) Day = "Wednesday";
if(day == 5) Day = "Thursday";
if(day == 6) Day = "Friday";
if(day == 7) Day = "Saturday";

if(month == 1)  Month="January";
if(month == 2)  Month="February";
if(month == 3)  Month="March";
if(month == 4)  Month="April";
if(month == 5)  Month="May";
if(month == 6)  Month="June";
if(month == 7)  Month="July";
if(month == 8)  Month="August";
if(month == 9)  Month="September";
if(month == 10) Month="October";
if(month == 11) Month="November";
if(month == 12) Month="December";

// String to display current date.
var todaysDate =(Day + " " + date + " " + Month + " ");
/* end date */

/*fix netscape navigation bugs*/
function NSbug(area){
  if (browser=="Netscape" && version<"5") {
    if (area=="br"){
      document.write('<br>')
    }
    if (area=="table"){
      document.write('<table width="1" border="0" cellspacing="0" cellpadding="0" height="450" align="left"><tr><td></td></tr></table>')
    }
  }
}

/* Function for worldclock popup */
function ShowClock() {
 wndCurr = window.open("","wndCurrWin","scrollbars=no,width=530,height=270");
 wndCurr.location.href = "/inc/clock.html";
}

/*Creates a popup window for an image*/
function showImage(wndWidth, wndHeight, wndImage) {
 var wndSpec = ""
 wndSpec = "scrollbars=yes,width="+(wndWidth+20)+",height="+(wndHeight+50)
 remote = window.open("","remotewin2",wndSpec);
 remote.close()
 remote = window.open("","remotewin2",wndSpec);
 remote.location.href = "picturepopup.html?width="+wndWidth+"&height="+wndHeight+"&img="+wndImage;
 if (remote.opener == null) remote.opener = window; 
  remote.opener.name = "opener";
}

/*Creates a popup window for an page*/
function showPage(wndWidth, wndHeight, wndPage) {
 var wndSpec = ""
 wndSpec = "scrollbars=yes,width="+(wndWidth)+",height="+(wndHeight)
 remote = window.open("","remotewin3",wndSpec);
 remote.close()
 remote = window.open("","remotewin3",wndSpec);
 remote.location.href = wndPage;
 if (remote.opener == null) remote.opener = window; 
  remote.opener.name = "opener";
}

function ShowCurr() {
 wndCurr = window.open("","wndCurrWin","scrollbars=no,resizable=yes,width=200,height=300");
 wndCurr.location.href = "http://www.ozforex.com.au/cal/generic/ozforexcal.asp?amount=1000";
}