/*
This license text has to stay intact at all times:
Script by Qreative Design for use with 
Cross Browser Custom Scroll Bar Script by Hesido.
Public version - Free for non-commercial uses.

This script cannot be used in any commercially built
web sites, or in sites that relates to commercial
activities. This script is not for re-distribution.

For licensing options:
Contact Qreative Design @ www.qreative-design.com

Derivative works are only allowed for personal uses,
and they cannot be redistributed.
*/

function open_url(page, target){
	$(target).innerHTML = '';
	new Ajax.Request(page, {
	method:'get',
		onSuccess: function(transport){
			var json = transport.responseText.evalJSON();
			
			$(target).innerHTML = json.content;
			CSBfleXcroll('contentscroll');
	 		Shadowbox.setup();
	   	},
		onFailure: function(transport) {    
			// Wordt uitgevoerd wanneer er een 404/500 e.d. op komt
			alert('error opening page');
		}
	});
}
function open_doubleurl(page, target1, target2){
	new Ajax.Request(page, {
	method:'get',
		onSuccess: function(transport){
			var json = transport.responseText.evalJSON();
			$(target1).innerHTML = '';
			$(target2).innerHTML = '';
			$(target1).innerHTML = json.left;
			$(target2).innerHTML = json.right;
			CSBfleXcroll('contentscroll');
	 		Shadowbox.setup();
	   	},
		onFailure: function(transport) {    
			// Wordt uitgevoerd wanneer er een 404/500 e.d. op komt
			alert('error opening page');
		}
	});
}