
function getCookie(name) 
{
	var search = name + "=";
	if (document.cookie.length > 0) 
	{
		offset = document.cookie.indexOf(search);
		if (offset != -1)
		{
			offset += search.length;
			end = document.cookie.indexOf(";", offset);
			if (end == -1)
			end = document.cookie.length;
			return unescape(document.cookie.substring(offset, end));
		} 
	}
	return "";
}


function deleteCookie(name, path, domain)
{
	if (getCookie(name))
		document.cookie = name + '=' +
			((path) ? ';path=' + path : '') +
			((domain) ? ';domain=' + domain : '' ) +
			';expires=Thu, 01-Jan-1970 00:00:01 GMT';
}


function setBandwidth( value ) 
{
	var expDate = new Date();
	expDate.setTime(expDate.getTime() + 1000*60*60*24);
	setLowbCookie("bandwidth" ,value, expDate);
	//location.reload();
} 

function setLowbCookie(name, value, expire) {
			  
	document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; path=/; expires=" + expire.toGMTString()));
}




try{
	if (get_site_code() != getCookie('prof_country')) {
	    deleteCookie('prof_id', '/', '*.*');
	    deleteCookie('prof_country', '/', '*.*');
	}
} catch (e) {}