
var BART = {};

BART.Vlissingen = function(){

	var main_config = {};
    
    return {
		/**
	 	 *
	 	 */
		init: function(config){
			
		},
		/**
		 * 
		 */
		findOrg : function(obj) {
			var search_fld 		= document.getElementById('searchstring');
			var gidssearch 		= document.getElementById('gidssearch');
			
			if (search_fld.value != '') {		
				//var frame1 			= document.forms['frm'].target;
		
				try {
					var test2 		= parent.frames.iframeinclude;

					if (test2 == undefined) {
						  throw "ThrowError";
					}
					document.forms['frm'].target = "iframeinclude";
					document.forms['frm'].submit();
					
				} catch (err) {
					
					gidssearch.value = 7;	
					
					document.forms['frm'].submit();
				}
			} else {
				alert('G!DS 2\n2004-2009 - Bibliotheek.nl\n\nU heeft één of meerdere velden niet juist ingevuld.\nHieronder volgt een specificatie:\n\n - het zoekveld moet minimaal 3 tekens bevatten!');
			}
		}
	}
}();

BART.Vlissingen.init();

function open_window(url,name,width,height,scrollbars)
{	
	if(width == null) width=600;
	if(height == null) height=500;
	if(scrollbars == null) scrollbars=true;	
	
	var win = window.open(url,name,get_window_prop(width,height,scrollbars));
}

function get_window_prop(width, height,scrollbars)
{
	x = (screen.width	- width ) / 2 ;
	y = (screen.height	- height) / 2 ;

	prop =  'location=no' ;	
	prop += ',status=no' ;
	prop += ',directories=no' ;
	prop += ',toolbar=no' ;
	prop += ',resizable=no' ;
	if(scrollbars)
		prop += ',scrollbars=yes' ;
	else
		prop += ',scrollbars=no' ;
	prop += ',width='+width ;
	prop += ',height='+height ;
	prop += ',screenX='+x ;
	prop += ',screenY='+y ;
	prop += ',left='+x ;
	prop += ',top='+y ;	
	
	return prop ;
}

function selectAllHeading(obj) {
	var checks 		= document.forms['frm'].elements['adv_event_genre[]'];

	for (i=0; i<checks.length; i++) {
		checks[i].checked = (obj.checked ? true : false);
	}
}
function deSelectAllHeading(obj) {	
	var checks 		= document.forms['frm'].elements['adv_event_genre[]'];
	var all_check 	= document.getElementById('adv_event_genre_all');				
	var all_select 	= true;
	
	for (var i=0; i<checks.length; i++) {
		if (checks[i].checked == false && checks[i].id != 'adv_event_genre_all') {
			all_select = false;
		}
	}
	if (all_select == false) {
		all_check.checked = false;
	} else {
		all_check.checked = true;
	}
}
function getDetail(url)
{
	try {
		var test2 		= parent.frames.iframeinclude;
		
		if (test2 == undefined) {
			  throw "ThrowError";
		}
		parent.frames.iframeinclude.location.href = url;
		
	} catch (err) {
		window.location = url+"&special_detail=1";
	}
}
function find(obj) 
{
	var search_fld 		= document.getElementById('searchstring');
	var gidssearch 		= document.getElementById('gidssearch');
	
	if (search_fld.value != '') {		
		//var frame1 			= document.forms['frm'].target;

		try {
			var test2 		= parent.frames.iframeinclude;

			if (test2 == undefined) {
				  throw "ThrowError";
			}
			document.forms['frm'].target = "iframeinclude";
			document.forms['frm'].submit();
			
		} catch (err) {
			
			gidssearch.value = 5;	
			
			document.forms['frm'].submit();
		}
	} else {
		alert('U heeft niet aangegeven waarop u wilt zoeken');
	}
}