function popUp(URL) {
	day = new Date();
	id = day.getTime();
	b_width = (screen.width / 2)-380;
	b_height = (screen.height / 2)-275;
	if(screen.width == 800)
	{
		b_width = 0;
		b_height = 0;
	}
	if (parent.frames.length > 0){
		ouder = "parent.frames[0]";
	} else {
		ouder = "window"; 
	}
		eval("page" + id + " = " + ouder + ".open(URL, '" + id + "', 'channelmode=yes,resizable=yes,status=yes,titlebar=yes,toolbar=0,location=no,menubar=no');");
}

function popUp2(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=390,left = 272,top = 118.5');");
}

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function writeTrackerCode(siteId) {
	d = document;
	//d.write("<P STYLE=\"color:blue; background-color: white; font-size: 16px;\">" + siteId.toUpperCase() + "<\/P>");
	d.write("<img src=\"http://193.79.173.88/clients/Redc257/adanalyse.asp?PID=" + siteId.toUpperCase() + "&REFID=");
	d.write(escape(top.document.referrer));
	d.write("&RND=");
	now = new Date();
	random = now.getTime();
	d.write(random);
	d.write("\" width=1 height=1 style=\"position: absolute; left: 0px; top: 0px; \">");
}

function laadPagina(topnav, url, popup, submenu) {
	parent.topNav.location.href="topNav.php?nav=" + topnav;
	parent.leftNav.location.href="leftNav.php?submenu=" + submenu;
	if (popup) {
		popUp(url);
	} 
	else {
		parent.content.location.href = url;
	}	 
 }
 
if (!on_color) { var on_color = "#FFFFFF"; }
if (!off_color) { var off_color = "#FBDC81"; }
if (!blink_onoff) { var blink_onoff = 1; }
if (!blinkspeed) { var blinkspeed = 800; }

function blink(blinkarray) {
	if( blink_onoff == 1) {
		for (i in blinkarray) {
			document.getElementById(blinkarray[i]).style.color = on_color;
		}
	   blink_onoff = 0;
	}
	else {
	   for (i in blinkarray) {
			document.getElementById(blinkarray[i]).style.color = off_color;
	   }
	   blink_onoff = 1;
	}
}
