Lets say you have some information, that you want to be available to the public for only a short time, and you dont want to delete it all the time. Then you can use this script.

<script language="JavaScript" for="window" event="onload()">

<!--

window.open("script212842_0_2.html", "vb", "scrollbars,resizable,height=300,width=450")

//-->

</script>

This automaticly calls a new window.

In the new window you should place this script.

<script language="javascript">

function openOrClose() {

var beginDateAndTime="199802010000"

var endDateAndTime="199802140000"

var aTime = new Date()

var thisYear = aTime.getYear() +1900

var thisMonth = aTime.getMonth() + 1

var thisDate = aTime.getDate()

var thisHour = aTime.getHours()

var thisMinute = aTime.getMinutes()

var thisDateAndTime = (thisYear*100000000)+(thisMonth*1000000)+(thisDate*10000)+(thisHour*100)+thisMinute

if (thisDateAndTime <= beginDateAndTime || thisDateAndTime >= endDateAndTime) {

self.close()

}

}

</script>

This script automaticly shuts down the window if the visit is outside the time limit.