// timer in teaser
var now = new Date();
var eventcvhj = new Date("Mar 26 2010 23:59:59");
var days = hours / 24;
var seconds = (eventcvhj - now) / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
function updateCvhjTeaser() {
now = new Date();
seconds = (eventcvhj - now) / 1000;
seconds = Math.round(seconds);
minutes = seconds / 60;
minutes = Math.round(minutes);
hours = minutes / 60;
hours = Math.round(hours);
days = hours / 24;
days = Math.round(days);
tmpHTML = ""
tmpHTMLtext = ""
tmpHTMLnewtext = ""
if (days > 0 ) {
if(days == 1 ){
tmpHTMLtext += '';
} else {
tmpHTMLtext += '';
}
} else {
if(seconds > (60 * 60) ){
tmpHTMLtext += '';
} else {
tmpHTMLtext += '';
}
}
if(minutes > 0){
document.getElementById("cvhjTeaserTxt").innerHTML = tmpHTMLtext
}
}
// wel of niet tonen van teaser
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);
function showTeaser(){
document.getElementById("cvhjTeaserHolder").style.visibility = "visible";
}
function hideTeaser(){
document.getElementById("cvhjTeaserHolder").style.visibility = "hidden";
}
// automatisch sluiten schermpje na 15 seconden 
function removeTeaser() {
setTimeout(hideTeaser,300000);
}
// schrijven teaserschermpje 
function cvhjCookie(){
expiratiedatum = new Date();
if(eventcvhj > expiratiedatum ){
expiratiedatum.setTime(expiratiedatum.getTime() + (1000*60*60*24));
if (!(CvhJDVHNEEEE=getCvhjCookie("CvhJDVHNEEEE"))){ 
setCvhjCookie("CvhJDVHNEEEE","True", expiratiedatum, "/", null, false);
showTeaser()
removeTeaser()
}
}
}
//cookie afhandeling 
function getCvhjVal (begin) {
es = document.cookie.indexOf (";", begin);
if (es == -1) es = document.cookie.length;
return unescape(document.cookie.substring(begin, es)); 
}
function setCvhjCookie (name, value) {
av = setCvhjCookie.arguments;
ac = setCvhjCookie.arguments.length;
expires = (2 < ac) ? av[2] : null;
path = (3 < ac) ? av[3] : null;
domain = (4 < ac) ? av[4] : null;
secure = (5 < ac) ? av[5] : false;
document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
}
function getCvhjCookie (name) {
arg = name + "=";
alen = arg.length;
clen = document.cookie.length;
i = 1;
while (i < clen) {
j = i + alen;
if (document.cookie.substring(i, j) == arg) return getCvhjVal(j)
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
cvhjCookie()
updateCvhjTeaser()
