
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Site Library  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Site Library:	functies die door de voorkant van deze site worden gebruikt. /////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//highlight van images
function ImgRoll(wsName, wsImage) {
	document.images[wsName].src = 'img/' + wsImage;
}

//highlight van images
function showPicture(wsName, wsFolder, wsPicture, wsFolderLarge, wsPictureLarge) {
	document.images[wsName].src = '../cms/data/attachments/' + wsFolder + '/' + wsPicture;
	fillLocation(wsFolderLarge, wsPictureLarge);	
}

function fillLocation(wsFolderLarge, wsPictureLarge){
	if (wsPictureLarge != '') {
		picturelargelocation = '../cms/data/attachments/' + wsFolderLarge + '/' + wsPictureLarge;
	} else {
		picturelargelocation = '';
	}
}

function showLargePicture(){
	if (picturelargelocation == '') {
		showWindow('img/largepicture_holder.gif', 'Picture', 340, 280)
	} else {
		showWindow(picturelargelocation, 'Picture', 680, 510)
	}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// zoek functionaliteit
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function fillSelect(wsSoort, wsSelectedValue) {
	var lArray;
	var object = document.frmSearch;
	//kijk welke array je nodig hebt
	if (wsSoort == 'artist') {
		lArray = arrArtiest;
		object.criteria.selectedIndex = 0;
	}
	if (wsSoort == 'price') {
		lArray = arrPrijs;
		object.criteria.selectedIndex = 1;
	}
	if (wsSoort == 'material'){
		lArray = arrMateriaal;
		object.criteria.selectedIndex = 2;
	}
	if (wsSoort == 'size'){
		lArray = arrFormaat;
		object.criteria.selectedIndex = 3;
	}
	if (wsSoort == 'weight'){
		lArray = arrGewicht;
		object.criteria.selectedIndex = 4;
	}
	
	if (wsSoort == 'event'){
		lArray = arrEvenement;
		object.criteria.selectedIndex = 5;
	}
	
	if (wsSoort == 'catalogue'){
		lArray = arrCatalogue;
		object.criteria.selectedIndex = 6;
	}

	//reset de selectbox eerst
	object.searchitem.length = 0;

	//nu vul de selectbox met de juiste waarden
	for (i=0;i<lArray.length;i++){
	    object.searchitem.options[i] = new Option(lArray[i][1], lArray[i][0]);
		//als deze geslecteerd is check het dan
		if (lArray[i][0] == wsSelectedValue) object.searchitem.selectedIndex = i;
	}
}

function submitSearch() {
	object = document.frmSearch
	object.submit();
}