<!-- 
var cookiebcode = getCookie('PDUK');

if (cookiebcode) {
	// update all <span class="brokerCode"></span> with current broker code
	var arr = document.getElementsByTagName("span");
	for (i = 0; i < arr.length; i++) {
		if (arr[i].className == "brokerCode") {
			arr[i].innerHTML = cookiebcode[0]; 
		}
	}
	
	if (cookiebcode[0] =='CLSP1'){
		if (document.getElementById('affiliatelink') || document.getElementById('affiliatelink2')){
			document.getElementById('affiliatelink').style.display = 'none';
			if (document.getElementById('affiliatelink2')){
			document.getElementById('affiliatelink2').style.display = 'none';
			}
		}
	}
}
	
if (cookiebcode !=''){
	var d = document;
	var p = cookiebcode[0];
	var i = 0;
	var n = d.links.length;
	for (i=0;i<n; i++) {
		if (d.links[i].href.indexOf("accountmanagement/login.aspx") > 0){
			d.links[i].href = '/ecl-processing.php?p='+p+'&type=ECL';
		}
	}
} else {
	var d = document; 
	var p = 'pduk';
	var i = 0;
	var n = d.links.length;
	for (i=0;i<n; i++){
		if (d.links[i].href.indexOf("accountmanagement/login.aspx") > 0){
			d.links[i].href = '/ecl-processing.php?p='+p+'&type=ECL';
		}
	}
}

function getCookie(c_name){
	if (document.cookie.length>0){
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1){
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end)).split(",");
		}
	}
	return "";
}

//-->
