function checkupdated(date) {
posted = new Date(date);
curdate = new Date();
expdate = new Date(posted.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
document.write('<span class="no_line"> </span><span class="updated">Updated&nbsp;' + date + '</span>');
}

function checkupdatedbr(date) {
posted = new Date(date);
curdate = new Date();
expdate = new Date(posted.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
document.write('<br><span class="updated">Updated&nbsp;' + date + '</span>');
}

function checknew(date) {
posted = new Date(date);
curdate = new Date();
expdate = new Date(posted.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
document.write('<span class="no_line"> </span><span class="new">New!&nbsp;' + date + '</span>');
}

function checknewbr(date) {
posted = new Date(date);
curdate = new Date();
expdate = new Date(posted.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
document.write('<br><span class="new">New!&nbsp;' + date + '</span>');
}

function checkadded(date) {
posted = new Date(date);
curdate = new Date();
expdate = new Date(posted.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
document.write('<span class="no_line"> </span><span class="new">Added&nbsp;' + date + '</span>');
}

function checkaddedbr(date) {
posted = new Date(date);
curdate = new Date();
expdate = new Date(posted.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
document.write('<br><span class="new">Added&nbsp;' + date + '</span>');
}

function checkrevised(date) {
posted = new Date(date);
curdate = new Date();
expdate = new Date(posted.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
document.write('<span class="no_line"> </span><span class="internal">Revised&nbsp;' + date + '</span>');
}

function expire(start,days,content) {
begin = new Date(start);
curdate = new Date();
expdate = new Date(begin.getTime() + days*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
	{document.write(content);
	}
}

function expire_new(start,days,part1,part2) {
begin = new Date(start);
curdate = new Date();
expdate = new Date(begin.getTime() + days*24*60*60*1000);
tagdisappear = new Date(begin.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
	{document.write(part1);
	if (tagdisappear.getTime() > curdate.getTime()) {
		document.write('<span class="no_line"> </span><span class="new">New!&nbsp;' + start + '</span>');
	}
	if (part2) document.write(part2);
	}
}

function expire_updated(start,days,part1,part2) {
begin = new Date(start);
curdate = new Date();
expdate = new Date(begin.getTime() + days*24*60*60*1000);
tagdisappear = new Date(begin.getTime() + 14*24*60*60*1000);
if (expdate.getTime() > curdate.getTime())
	{document.write(part1);
	if (tagdisappear.getTime() > curdate.getTime()) {
		document.write('<span class="no_line"> </span><span class="updated">Updated&nbsp;' + start + '</span>');
	}
	if (part2) document.write(part2);
	}
}

function poplist(url) {
	listopen="yes";
	listwindow=window.open(url,'listwindow','width=700,height=500,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes');
	if (window.focus) {listwindow.focus();}
}

function popbox(url) {
	listopen="yes";
	listwindow=window.open(url,'listwindow','width=450,height=350,resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no');
	if (window.focus) {listwindow.focus();}
}

function popjobrequestbox(url) {
	listopen="yes";
	listwindow=window.open(url,'listwindow','width=475,height=400,resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no');
	if (window.focus) {listwindow.focus();}
}

function popsearchbox(url) {
	listopen="yes";
	listwindow=window.open(url,'listwindow','width=600,height=600,resizable=yes,scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes');
	if (window.focus) {listwindow.focus();}
}

function closelist() {
	if (listopen=="yes") {listwindow.close();}
}

function showEvent(begindate,enddate,content) {
curdate = new Date();
eventbegin = new Date(begindate);
eventend = new Date(enddate);
start = new Date(eventbegin.getTime() -31*24*60*60*1000);
expire = new Date(eventend.getTime() + 1*24*60*60*1000);
if (start.getTime() < curdate.getTime()) {
	if (curdate.getTime() < expire.getTime()) {
		document.write(content);
	}
}
}

function showMainEvent(daystoshow,listType,begindate,enddate,content) {
curdate = new Date();
eventbegin = new Date(begindate);
eventend = new Date(enddate);
start = new Date(eventbegin.getTime() -daystoshow*24*60*60*1000);
expire = new Date(eventend.getTime() + 1*24*60*60*1000);
if (listType=="Current") {
	if (start.getTime() < curdate.getTime()) {
		if (curdate.getTime() < expire.getTime()) {
			document.write(content);
		}
	}
}
if (listType=="Archive") {
	if (curdate.getTime() > expire.getTime()) {
		document.write(content);
	}
}
}

function contentWindow(start,end,content) {
windowbegin = new Date(start);
windowend = new Date(end);
expire = new Date(windowend.getTime() + 1*24*60*60*1000);
curdate = new Date();
if (windowbegin.getTime() < curdate.getTime()) {
	if (curdate.getTime() < expire.getTime()) {
		document.write(content);
	}
}
}


