if (self != top) top.location.href = location.href;

	var dag;
	var dagnr;
	var maand;
	var jaarnr;
	var jaar;
	var datum;

	day = new Date();
	dagnr=day.getDate();
	jaar=day.getYear();

	     if (day.getDay() == 0) { dag = "Zo."; }
	else if (day.getDay() == 1) { dag = "Ma."; }
	else if (day.getDay() == 2) { dag = "Di."; }
	else if (day.getDay() == 3) { dag = "Wo."; }
	else if (day.getDay() == 4) { dag = "Do."; }
	else if (day.getDay() == 5) { dag = "Vr."; }
	else if (day.getDay() == 6) { dag = "Za."; }

	     if (day.getMonth() == 0)  { maand = "Jan."; }
	else if (day.getMonth() == 1)  { maand = "Feb."; }
	else if (day.getMonth() == 2)  { maand = "Mar."; }
	else if (day.getMonth() == 3)  { maand = "Apr."; }
	else if (day.getMonth() == 4)  { maand = "Mei"; }
	else if (day.getMonth() == 5)  { maand = "Jun."; }
	else if (day.getMonth() == 6)  { maand = "Jul."; }
	else if (day.getMonth() == 7)  { maand = "Aug."; }
	else if (day.getMonth() == 8)  { maand = "Sept."; }
	else if (day.getMonth() == 9)  { maand = "Okt."; }
	else if (day.getMonth() == 10) { maand = "Nov."; }
	else if (day.getMonth() == 11) { maand = "Dec."; }

	datum=dag+" "+dagnr+" "+maand+" "+jaar;

function popup() {
	if(document.all)
		showModalDialog('signup.html',window,'dialogWidth: 383px; dialogHeight: 552px; dialogTop: 50px; dialogLeft: 150px; edge: Raised; center: Yes; help: No; resizable: No; status: No;');
	else	window.open('signup.html','SignUp','scrollbars=yes,resizable=yes');
}

function copyright() {
	document.write("<font size=-3>Copyright &copy;"+jaar+" FiSt Netherlands</font>");
}

var message="©"+jaar+" FiStNetherlands.com\nAll rights reserved.";

function noContextMenu() {
 event.cancelBubble = true;
 event.returnValue = false;
 return false;
}

function NoRightClick(b) {
   if(((navigator.appName=="Microsoft Internet Explorer")&&(event.button > 1))
   ||((navigator.appName=="Netscape")&&(b.which > 1))){
   alert(message);
   return false;
   }
}
// document.oncontextmenu = noContextMenu;
// document.onmousedown = NoRightClick;
// document.onselectstart= noContextMenu;

function runClock() {
 theTime = window.setTimeout("runClock()", 1000);
 var display = today.toLocaleString();
 window.status = display;

}
// runClock();

function clock() {
//	document.write("<a href='#' onMouseover='day=new Date();hours=day.getHours()+10;minutes=day.getMinutes();au=\"Sydney time: \"+hours+\":\"+minutes+\" hours\";alert(au);'>");
	document.write("<OBJECT id=clock codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 height=90 width=90 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>");
	document.write("<PARAM NAME=\"_cx\" VALUE=\"1984\">");
	document.write("<PARAM NAME=\"_cy\" VALUE=\"1984\">");
	document.write("<PARAM NAME=\"FlashVars\" VALUE=\"1984\">");
	document.write("<PARAM NAME=\"Movie\" VALUE=\"clock.swf\">");
	document.write("<PARAM NAME=\"Src\" VALUE=\"clock.swf\">");
	document.write("<PARAM NAME=\"WMode\" VALUE=\"Transparent\">");
	document.write("<PARAM NAME=\"Play\" VALUE=\"0\">");
	document.write("<PARAM NAME=\"Loop\" VALUE=\"-1\">");
	document.write("<PARAM NAME=\"Quality\" VALUE=\"High\">");
	document.write("<PARAM NAME=\"SAlign\" VALUE=\"\">");
	document.write("<PARAM NAME=\"Menu\" VALUE=\"0\">");
	document.write("<PARAM NAME=\"Base\" VALUE=\"\">");
	document.write("<PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\">");
	document.write("<PARAM NAME=\"Scale\" VALUE=\"ShowAll\">");
	document.write("<PARAM NAME=\"DeviceFont\" VALUE=\"0\">");
	document.write("<PARAM NAME=\"EmbedMovie\" VALUE=\"0\">");
	document.write("<PARAM NAME=\"BGColor\" VALUE=\"FFFFFF\">");
	document.write("<PARAM NAME=\"SWRemote\" VALUE=\"\">");
	document.write("<embed src=\"clock.swf\" quality=\"high\" bgcolor=\"#FFFFFF\" WIDTH=\"90\" HEIGHT=\"90\" wmode=\"transparent\" ALIGN TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\" menu=\"false\"></embed>");
	document.write("</OBJECT></a>&nbsp;&nbsp;&nbsp;&nbsp;");
	document.write("<div style=\"font: normal 7pt arial; color: #2B445A\">&nbsp;&nbsp;");
	document.write("Wk." + getWeek(y2k(day.getYear()),day.getMonth(),day.getDate())+" - "+datum);
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;</div>");
}

function exitpop() {
	var filename='signup.html';
	var popup;
	var width=392;
	var height=522;
	var top=100;
	var left=160;

	var check = getCookie ("popup");
	if (check == null) {
	if(document.all)
		showModalDialog('signup.html',window,'dialogWidth: 389px; dialogHeight: 550px; dialogTop: 50px; dialogLeft: 150px; edge: Raised; center: Yes; help: No; resizable: Yes; status: No;');
//	else	window.open('signup.html','SignUp','scrollbars=yes,resizable=yes');

//		popup = window.open(filename, "","height="+height+",width="+width+",top="+top+",left="+left+",resizable=yes");
		setCookie("popup","yes");
//		setCookie("popup","");
	}
}

//var bikky = document.cookie;

function getCookie(name) {
    var bikky = document.cookie;
    var index = bikky.indexOf(name + "=");
    if (index == -1) return null;
    index = bikky.indexOf("=", index) + 1;
    var endstr = bikky.indexOf(";", index);
    if (endstr == -1) endstr = bikky.length;
    return unescape(bikky.substring(index, endstr));
}

var today = new Date();
var expiry = new Date(today.getTime() + 2 * 24 * 60 * 60 * 1000); // plus 2 days

function setCookie(name, value) {
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
    bikky= document.cookie;
}

//document.onunload=exitpop;
//window.onunload=exitpop;

function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function getWeek(year,month,day) {
    var when = new Date(year,month,day);
    var newYear = new Date(year,0,1);
    var modDay = newYear.getDay();
    if (modDay == 0) modDay=6; else modDay--;

    var daynum = ((Date.UTC(y2k(year),when.getMonth(),when.getDate(),0,0,0) -
                 Date.UTC(y2k(year),0,1,0,0,0)) /1000/60/60/24) + 1;

    if (modDay < 4 ) {
        var weeknum = Math.floor((daynum+modDay-1)/7)+1;
    }
    else {
        var weeknum = Math.floor((daynum+modDay-1)/7);
        if (weeknum == 0) {
            year--;
            var prevNewYear = new Date(year,0,1);
            var prevmodDay = prevNewYear.getDay();
            if (prevmodDay == 0) prevmodDay = 6; else prevmodDay--;
            if (prevmodDay < 4) weeknum = 53; else weeknum = 52;
        }
    }

    if (weeknum>52) weeknum=1;
	return + weeknum;
}

