/*
 * Script for website www.modulo-architects.be
 * 
 * This script deals with all collaborator aspects.
 *
 * @ author: Lieven Van Landschoot.
 */

var position = 0; // value containing current position
var number = 0; // value containing number of collaborators
var tekstkleur = '#666666'; //vulue containing textcolor

/* This loads the given information into the arrays */
function addcollaborator(){	
	number++;
}

/*******************************************************************
/* Images
 *******************************************************************/
 
/* This will show all div's, except the given one */
function highlight(klasse,d) {
	if((klasse != 'divpa') && (d > number)){	
		return;
	} else {
		givenid = klasse + d;	
		giventextid = 'text' + klasse + d;
		for (var i=1; i<4; i++){
			id = 'divpa' + i;
			if(id != givenid){
		 		ShowContent(id);
			}
		}
		for (var i=1; i< number; i++){
			if((i+position) < (number + 1)){			
				id = 'div' + i;				
				if(id != givenid){
		 			ShowContent(id);
				}
			}
		}
		HideContent(givenid);
	}
}

/* This will hide all div's, except the given one */
function exithighlight(d) {	
	for (var i=1; i<4; i++){
		id = 'divpa' + i;
		if(id != d){
		 HideContent(id);
		}
	}
	for (var i=1; i< number; i++){
		id = 'div' + i;
		if(id != d){
		 HideContent(id);
		}
	}
}


/* This will hide all div's */
function exithighlight() {
	
		for (var i=1; i<4; i++){
			id = 'divpa' + i;
			HideContent(id);
		}
		for (var i=1; i<number; i++){
			if((i+position) < (number + 1)){
				id = 'div' + i;
				HideContent(id);
			}
		}	
}

/* This will show the div */
function HideContent(d) {
	document.getElementById(d).style.display = "none";
}

/* This will hide the div */
function ShowContent(d) {	
	//document.getElementById(d).style.display = "block";
}

/*******************************************************************
/* Text.
 *******************************************************************/
 
 /* This will show all div's, except the given one */
function highlighttext(klasse,d) {
		givenid = klasse + d;		
		document.getElementById(givenid).style.color = '#000000';
}

/* This will hide all div's */
function exithighlighttext(klasse,d) {
		givenid = klasse + d;
		document.getElementById(givenid).style.color = tekstkleur;
}

/*******************************************************************
/* Events
 *******************************************************************/

function stopEvent(event){
 if (typeof event.stopPropagation != "undefined"){
   event.stopPropagation();
 }
 else {
   event.cancelBubble = true;
 }
}