function imageView(myImage,popupWinName,w,h,x,y){
	preview = window.open("", popupWinName,"resizable=no, toolbar=no, scrollbars=no, menubar=no, status=no, directories=no, width="+w*1.1+", height="+h*1.05+", left="+x+", top="+y+"");
	preview.document.write('<html><head><title>Dave Reede Photography - click on image to close<\/title><style type="text/css">@import "popup.css";<\/style><\/head>'+'<body onblur="self.focus();">'+'<center><a href="javascript:self.close()"><img border="0" alt="'+caption+'" src="'+myImage+'" width="'+w+'" height="'+h+'" \/><\/a><\/center><\/body><\/html>');
preview.document.close();
return false;
}

function newImageView(myImage,popupWinName,caption,w,h,x,y){
	preview = window.open("", popupWinName,"resizable=no, toolbar=no, scrollbars=no, menubar=no, status=no, directories=no, width="+w+", height="+h*1.15+", left="+x+", top="+y+"");
	preview.document.write('<html><head><title>Dave Reede Photography - click on image to close<\/title><style type="text/css">@import "popup.css";<\/style><\/head>'+'<body onblur="self.focus();">'+'<center><a href="javascript:self.close()"><img border="0" alt="'+caption+'" src="'+myImage+'" width="'+w+'" height="'+h+'" \/><\/a><br /><br /><em>'+caption+'</em><\/center><br /><\/body><\/html>');
preview.document.close();
return false;
}

function date_ddmmmyy(date)
{
  var d = date.getDate();
  var m = date.getMonth() + 1;
  var y = date.getYear();
  var day = date.getDay();
  var day1 = 'Monday';
	if (day==1)
		day1 = 'Monday';
	else if (day==2)
		day1 = 'Tuesday';
	else if (day==3)
 		day1 = 'Wednesday';
	else if (day==4)
		day1 = 'Thursday';
	else if (day==5)
 		day1 = 'Friday';
	else if (day==6)
		day1 = 'Saturday';
	else 
 		day1 = 'Sunday';

  // handle different year values 
  // returned by IE and NS in 
  // the year 2000.

  if(y >= 2000)
  {
    y -= 2000;
  }
  if(y >= 100)
  {
    y -= 100;
  }

  var mmm = 
    ( 1==m)?'January':( 2==m)?'February':(3==m)?'March':
    ( 4==m)?'April':( 5==m)?'May':(6==m)?'June':
    ( 7==m)?'July':( 8==m)?'August':(9==m)?'September':
    (10==m)?'October':(11==m)?'November':'December';

  return "" + day1 + ", " + mmm + " " + (d<10?"0"+d:d) + ", " + (y<10?"200"+y:y);
}
// get last modified date of the 
// current document.
//

function date_lastmodified()
{
  var lmd = document.lastModified;
  var s   = "Unknown";
  var d1;

  // check if we have a valid date
  // before proceeding
  if(0 != (d1=Date.parse(lmd)))
  {
    s = "" + date_ddmmmyy(new Date(d1));
  }
  return s;
}

