function openReserkoClient(countryCode, selectedAccomType, selectedCalendarDates, selectPeriods) {
	var newWindow;
	var url;
	
	url = "http://apparthotelkooiker.reserko.nl/client/wrapper.php?";
	
	if (countryCode != undefined){
		url += "countryCode="+countryCode+"&";
	}
	if (selectedAccomType != undefined){
		url += "selectedAccomType="+selectedAccomType+"&";
	}
	if (selectedCalendarDates != undefined){
		url += "selectedCalendarDates="+selectedCalendarDates+"&";
	}	
	if (selectPeriods != undefined){
		url += "selectPeriods="+selectPeriods+"&";
	}
	else{
		url += "selectPeriods=true&";
	}
	
	if (url.substr(url.length-1, url.length) == "?" || url.substr(url.length-1, url.length) == "&"){
		url = url.substr(0, url.length-1);
	}
	
	newWindow = window.open(url,"Reserveringscentrale", addProperties(730,600)+",status=0,scrollbars=0,resizable=0,address=0");
	
	if (newWindow==null) {
		alert('De reserveringscentrale kon niet worden geopend, zet a.u.b. uw popupblocker uit.');
	}
}



function addProperties(_width, _height) {
	var posX = ((screen.width/2) - _width / 2);
	var posY = ((screen.height/2) - _height / 2);
	return "left="+ posX + ",top=" + posY + ",width=" + _width + ",height=" + _height;
}

/**
**/
function openFromFlash(url) {
	openExtUrl(url);
}

function openExtUrl(url) {
	var myWindow = window.open(url,"Reserko",'width=800,height=700,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes');
	if (myWindow==null) {
		alert('De pagina kon niet worden geopend, zet a.u.b. uw popupblocker uit.\n'+url);
	}
}


