// put cross when clicked //////////////////
var maxkruis = 50;
var curkruis = 1;
function showHit(event) {
	mx = event.clientX - 5;
	my = event.clientY  - 10;
	eval('document.getElementById("kruisje' + curkruis + '").style.left = mx');
	eval('document.getElementById("kruisje' + curkruis + '").style.top = my');
	eval('document.getElementById("kruisje' + curkruis + '").style.visibility = "visible"');
	if (fingers == "") {
		fingers = mx + ',' + my;
	} else {
		fingers = mx + ',' + my + ',' + fingers;
	}
	curkruis ++;
	if (curkruis > maxkruis) curkruis = 1;
	// opslaan coord
	
	
}

// vergroot main window tot maximale maten beeldscherm /////////////////////////////////////////////
function maximizeWin() {
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    window.moveTo(0,0);
    window.resizeTo(aw,ah);
  }
}
// functie die je kan gebruiken om divs mee aan te passen ( word nu nog niet gebruikt 25 april 2003 )/////////////////////////////////////////////
function changeDiv (action, id, use1, use2) {
	switch(action) {
		case "txt":
			// change txt
			document.getElementById(id).innerText = use1;
		break;
		case "html":
			// change html
			document.getElementById(id).innerHTML = use1;
		break;
		case "moveto":
			//moving div to
			document.getElementById(id).style.left = use1;
			document.getElementById(id).style.top = use2;
		break;
		case "scale":
			//scalin div
			document.getElementById(id).style.width = use1;
			document.getElementById(id).style.height = use2;
		break;
		case "bgimage":
			// change bgimage div
			url = 'url(' + use1 + ')';
			document.getElementById(id).style.backgroundImage = url;
		break;
		case "bgcolor":
			// change bgcolor div
			document.getElementById(id).style.backgroundColor =use1;
		break;
		case "bordercolor":
		// change bordercolor div
		document.getElementById(id).style.borderColor = use1;
		break;
		case "visible":
			// change txt
			document.getElementById(id).style.visibility = use1;
		break;	
	}
}
// flash the news /////////////////////////////////////

var seenNews = 0;
function flashNews(colour) {
	if (seenNews == 0) {
		if (colour == 1) {
			document.getElementById("kop18").innerHTML = "<font color=red>news</font>";
			setTimeout("flashNews(0)", 500);
		} else {
			document.getElementById("kop18").innerHTML = "";
			setTimeout("flashNews(1)", 500);
		}
	} else {
		document.getElementById("kop18").innerHTML = "news";
	}
}


//popups////////////////////////////////////
var readypopped = 0;
function closeWin() {
	if (readypopped == 0 || artmiks.closed) {
		//nothing
	} else {
		artmiks.close();
	}
}

function popUm(w,h,url,xtrafeat){
	feat = "left=50,top=50,width=" + w + ",height=" + h + ",innerWidth=" + w + ",innerHeight=" + h + "," + xtrafeat ;
	artmiks = window.open(url,"artmiks",feat);
	artmiks.focus();
	readypopped = 1;
}

function popUm2(w,h,url,xtrafeat){
	feat = "left=50,top=50,width=" + w + ",height=" + h + ",innerWidth=" + w + ",innerHeight=" + h + "," + xtrafeat ;
	artmiks2 = window.open(url,"artmiks2",feat);
	artmiks2.focus();
	//readypopped = 1;
}

// acard popups ////////////////////////
function cardsPopUp(n, url) {
	// popup numero 1 - 8
	for (i=1; i <= 8; i++) {
		xpos = Math.round(Math.random() * (screen.availWidth - 362));
		ypos = Math.round(Math.random() * (screen.availHeight - 190));
		xpos2 = xpos;
		xpos += 127;
		newurl = url + '?&xpos=' + xpos + '&ypos=' + ypos + '&xpos2=' + xpos2 + '&';
		features ="scrollbars=no,width=117,height=170,left=" + xpos2 + ",top=" + ypos;
		eval('card' + i + '=window.open( "", "card' + i + '", features)');
		eval('card' + i + '.moveTo(xpos2, ypos)');
		eval('card' + i + '.document.location.href = newurl');
		eval('card' + i + '.focus()');
	}
	// popup numero 9
	if (n == "all") {
		url="www/cards_yesorno.html";
		xpos = Math.round(Math.random() * (screen.availWidth - 362));
		ypos = Math.round(Math.random() * (screen.availHeight - 190));
		features ="scrollbars=no,width=117,height=170,left=" + xpos + ",top=" + ypos;
		card9=window.open( "", "card9", features);
		card9.moveTo(xpos2, ypos);
		card9.document.location.href = url;
		card9.focus();
		// popup numero 10
		url="www/cards_welcome.html";
		xpos = 0;
		ypos = 0;
		features ="scrollbars=no,width=240,height=170,left=" + xpos + ",top=" + ypos;
		card10=window.open( "", "card10", features);
		card10.moveTo(xpos, ypos);
		card10.document.location.href = url;
		card10.focus();
	}
}

function closeOthers(notname) {
	for (i=1; i <= 8 ; i++) {
		if (eval('notname != "card' + i + '"')) {
			if (eval('card' + i + '.closed')) {
				//nothing
			} else {
				eval('card' + i + '.close()');
			}
		}
	}
	
}

