code: function getCSRFToken() {
  		if (typeof document === "undefined") return null;
  		var cookies = document.cookie.split(";");//$NON-NLS-0$
  
  		var i,n,v;
  		for(i = 0; i<cookies.length; i++) {
  			n = cookies[i].substr(0, cookies[i].indexOf("=")).trim();//$NON-NLS-0$
  			v = cookies[i].substr(cookies[i].indexOf("=") + 1).trim();//$NON-NLS-0$
  
  			if(n.endsWith(XSRF_TOKEN)) {
  				return v;
  			}
  		}
  	}
docs: $NON-NLS-0$ 
  extracts value of xsrf cookie if available