function loadMain()
{
	var proxy = '/proxy/cb_proxy.php'; // default proxy
	var hostname = window.location.host;
	var hostprotocol = ("https:" == document.location.protocol) ? "https://" : "http://";
	
	// 
	if (document.getElementById('cb_script_roxen'))
		proxy = '/php/cb_proxy.php';
	else if (document.getElementById('cb_script_aspx'))
		proxy = '/proxy/cb_proxy.aspx';
	else if (document.getElementById('cb_script_aspx'))
		proxy = '/proxy/cb_proxy.aspx';
	else if (document.getElementById('cb_script_footsteps'))
		proxy = '/modules/cobrowser/cb_proxy.php';
	else if (document.getElementById('cb_script_syntens'))
		proxy = '/proxy/cb_proxy.aspx';
	else if (document.getElementById('cb_script_trynwalden'))
		proxy = '/public/default/script/cobrowser/cb_proxy.php';
	else if (document.getElementById('cb_script_footsteps'))
		proxy = '/modules/cobrowser/cb_proxy.php';
	else if (document.getElementById('cb_script_roxen'))
		proxy = '/modules/cobrowser/cb_proxy.php';
		
	
	if (window.location.host == "hypodomustestwebsite.fasterforwardelements.nl" || window.location.host == "www.hypodomus.nl" || window.location.host == "hypodomus.nl")
	{
		// Dont use protocol in a-parameter (work around for rewrite)
		var fileref = document.createElement('script');
		fileref.setAttribute("type", 'text/javascript');
		fileref.setAttribute("src", proxy+'?a=client.cobrowser.net/client/cobrowser.php&cb_server_http_host='+window.location.host);
		document.getElementsByTagName("head")[0].appendChild(fileref);
	}
	
	else if (window.location.host == "c01.cb-client.nl")
	{
		// Add script to head
		//normal behaviour
		var fileref = document.createElement('script');
		fileref.setAttribute("type", 'text/javascript');
		fileref.setAttribute("src", hostprotocol+'dev.cobrowser.net/client/cobrowser.php?a=' + hostprotocol+'client.cobrowser.net/client/cobrowser.php&session=init&cb_http_host='+window.location.host);
		document.getElementsByTagName("head")[0].appendChild(fileref);
	}

	else if (window.location.host == "www.jiba.nl" && document.location.protocol == "https:")
	{
		// Add script to head
		//normal behaviour
		if (window.console)
		{
			//console.log('jiba');
		}
		proxy = '/SSL/proxy/cb_proxy.aspx';
		var fileref = document.createElement('script');
		fileref.setAttribute("type", 'text/javascript');
		fileref.setAttribute("src", proxy+'?a='+hostprotocol+'client.cobrowser.net/client/cobrowser.php&cb_server_http_host='+window.location.host);
		document.getElementsByTagName("head")[0].appendChild(fileref);
	}
	else if (window.location.host == "www.tennisdirect.nl" )
	{
		// Add script to head
		//normal behaviour
		var fileref = document.createElement('script');
		fileref.setAttribute("type", 'text/javascript');
		fileref.setAttribute("src", proxy+'?a='+ escape(hostprotocol+'client.cobrowser.net/client/cobrowser.php') + '&cb_server_http_host='+ escape(window.location.host));
		document.getElementsByTagName("head")[0].appendChild(fileref);
	}
	else
	{
		// Add script to head
		//normal behaviour
		var fileref = document.createElement('script');
		fileref.setAttribute("type", 'text/javascript');
		fileref.setAttribute("src", proxy+'?a='+ hostprotocol+'client.cobrowser.net/client/cobrowser.php&cb_server_http_host='+window.location.host);
		document.getElementsByTagName("head")[0].appendChild(fileref);
	}

	
	
	
	
}
loadMain();