function openWin (url,windowW,windowH) {
	var window_top = 100;
	var window_left = screen.width-windowW-40;
	var newWindow = window.open(url,'helpWindow','height=' + windowH +',width=' + windowW + ',top=' + window_top + ',left=' + window_left + ', scrollbars');
	return newWindow;
}

function eventWin (urlstr ,windowH ,windowW) {
	var screenwidth = readCookie('screenwidth');
	if (typeof windowH != 'number') windowH = 700;
	if (typeof windowW != 'number') windowW = 700;
	var window_top = 100;
	var window_left = (screenwidth-2*windowW)/2;
	var newWindow = window.open(urlstr,'eventWindow','height=' + windowH +',width=' + windowW + ',top=' + window_top + ',left=' + window_left + ', scrollbars=0');
	return newWindow;
}

function jumpMenu(myList) {
	var gotoUrl = myList.options[myList.selectedIndex].value;
	if (gotoUrl == '#'){ return false; }
	else { window.location.href = gotoUrl; }
}

function show(elem) { //display/hide element
	var overlay = document.getElementById(elem);
	overlay.style.display = (overlay.style.display == "inline") ? "none" : "inline";
}

function printNice(clname) {
	var re = new RegExp(clname);
	var els = document.getElementsByTagName("*");
	for (var i=(els.length-1);i >= 0;i--) {
		if (els[i].className!='point') { els[i].style.backgroundColor = "#FFFFFF"; }
		if (re.test(els[i].className)) { els[i].style.display = "none"; }
	}
	window.print();
	alert("Print ready"); //wait until printed
	window.location.reload()
}
function CallPrint(clname,titel) {
var stijle  = '<style type="text/css">';
stijle += 'table th {';
stijle += '	border-width: 1px;';
stijle += '	padding: 2px;';
stijle += '	border-style: inset;';
stijle += '	border-color: black;';
stijle += '	background-color: white;';
stijle += '}';
stijle += 'table td {';
stijle += '	border-width: 1px;';
stijle += '	padding: 2px;';
stijle += '	border-style: inset;';
stijle += '	border-color: black;';
stijle += '	background-color: white;';
stijle += '}';
stijle += '</style>';

	var prtContent = "<table>";
	var els = document.getElementsByTagName("*");
	for (var i=(els.length-1);i >= 0;i--) {
		if (els[i].className == 'point') {
			prtContent += "<tr>" + els[i].innerHTML + "</tr>";
		}
	}        

	var els = document.getElementsByTagName("*");
	for (var i=(els.length-1);i >= 0;i--) {
		if (els[i].className == 'point') {
			prtContent += "<tr>" + els[i].innerHTML + "</tr>";
		}
	}        

	prtContent += "</table>";

  var winPrint = window.open('', '', 'left=0,top=0,width=800,height=600,toolbar=0,scrollbars=0,status=0');
  winPrint.document.write(stijle + "<h3>" + titel + "</h3>" + prtContent);
  winPrint.document.close();
  winPrint.focus();
  winPrint.print();
  winPrint.close();
}

//dragme

var xdif, ydif, obj=null, objParent;

function mouseMove(e) {
	if (!e) e = window.event; //if ie
  if (obj) { //object is not null
    objParent.style.left = e.clientX - xdif + "px";
    objParent.style.top  = e.clientY - ydif + "px";
    return false;
  }
}

function mouseSelect(e) {
	if (!e) e = window.event; //if ie
  	obj = (!e.target) ? e.srcElement : e.target; //ie || nn6
	if (obj.className == "dragme") {
		objParent = obj.parentNode;
		xdif = e.clientX - objParent.offsetLeft; //mouse-X - parent-L
		ydif = e.clientY - objParent.offsetTop;
		document.onmousemove=mouseMove;
		return false;
	}
}
document.onmousedown=mouseSelect;
document.onmouseup=new Function("obj=null");
