function newwindow(URL) 
{ 
window.open(URL,'Pics','width=660,height=500,resizable=yes,menubar=no,titlebar=no,left=50,top=50'); 
} 

//returns year last modified in with year_created-yyyy format if not year_created.
function lastYearMod(year_created) {
var time=new Date();
var year=time.getYear();
var modiDate = new Date(document.lastModified);
Year = takeYear(modiDate);
if (Year != year_created)
  fromto = year_created+"-"+Year;
else 
  fromto = year_created;
return fromto;
}

function DocDate() {
	var x = new Date (document.lastModified);
	Modif = new Date(x.toGMTString());
	Year = takeYear(Modif);
	Month = Modif.getMonth();
	Day = Modif.getDate();
	Mod = (Date.UTC(Year,Month,Day,0,0,0))/86400000;
	x = new Date();
	today = new Date(x.toGMTString());
	Year2 = takeYear(today);
	Month2 = today.getMonth();
	Day2 = today.getDate();
	now = (Date.UTC(Year2,Month2,Day2,0,0,0))/86400000;
	daysago = now - Mod;
	if (daysago < 0) return '';
	unit = 'days';
	if (daysago > 730) 	{
		daysago = Math.floor(daysago/365);
		unit = 'years';
	}
	else if (daysago > 60) {
		daysago = Math.floor(daysago/30);
		unit = 'months';
	}
	else if (daysago > 14) {
		daysago = Math.floor(daysago/7);
		unit = 'weeks'
	}
	var towrite = 'Page last changed ';
	var towrite = '';
	if (daysago == 0) towrite += 'today';
	else if (daysago == 1) towrite += 'yesterday';
	else towrite += daysago + ' ' + unit + ' ago';
	return towrite;
}

function takeYear(theDate) {
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}

function getLongDateString() {	//method defined on class Date.
	//Returns a date string of the form: Day DD Month,YYYY
	//(e.g. Sunday 27 September, 1998)
	monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
    dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	dayOfWeek = this.getDay();
	day = dayNames[dayOfWeek];
	dateOfMonth = this.getDate();
    monthNo = this.getMonth();
	month = monthNames[monthNo];
    minutes= this.getMinutes();
    year = this.getYear();
	if (year < 2000)
    year = year + 1900;
    if (minutes<10) 
        minutes="0"+minutes;
    dateStr = day+" "+month+" "+dateOfMonth+", "+year+" "+this.getHours()+":"+minutes+"hrs EST";
    return dateStr;
}
//register the  method in the class Date
Date.prototype.getLongDateString=getLongDateString;