function WriteAccountLinks(name) {
	var namePattern = name + "=";
	var cookies = document.cookie.split(';')
	for(var i = 0, n = cookies.length; i < n; i++) {
		var c = cookies[i];
		while (c.charAt(0) == ' ') {
			c = c.substring(1, c.length);
			if (c.indexOf(namePattern) == 0) {
				var CookieValue = c.split("=")[1];
				if (CookieValue.length > 0) {
				document.getElementById("LoginLink").innerHTML = "<a href='https://www.buscainc.com/accounts/welcome.cfm?Action=0' title='For complete privacy, you should close your browser after clicking this link.'>Log Out</a>";
				document.getElementById("OpenAccLink").innerHTML = "<a href='https://www.buscainc.com/accounts/welcome.cfm'>My Account</a> | ";
				document.getElementById("SearchOrderLink").innerHTML = "<a href=\"https://www.buscainc.com/accounts/welcome.cfm?Action=Search\">Search and Order</a> | ";

				document.getElementById("SearchOrderLinkLeft").innerHTML = "<a href=\"https://www.buscainc.com/accounts/welcome.cfm?Action=Search\">Search and Order</a>";
				document.getElementById("OpenAccLinkLeft").innerHTML = "<a href='https://www.buscainc.com/accounts/welcome.cfm'>My Account</a>";
				document.getElementById("LoginLinkLeft").innerHTML = "<a href='https://www.buscainc.com/accounts/welcome.cfm?Action=0'>Logout</a>";
				return null;
				}
			}
		}
	}
	document.getElementById("LoginLink").innerHTML = "<a href='https://www.buscainc.com/accounts/login.cfm'>Login</a>";
	document.getElementById("OpenAccLink").innerHTML = "<a href='https://www.buscainc.com/accounts/open_acc.cfm'> Open An Account</a> | ";
	document.getElementById("SearchOrderLink").innerHTML = "<a href='/search_and_order.html'>Search and Order</a> | ";

	document.getElementById("SearchOrderLinkLeft").innerHTML = "<a href='/search_and_order.html'>Search and Order</a>";
	document.getElementById("OpenAccLinkLeft").innerHTML = "<a href='https://www.buscainc.com/accounts/open_acc.cfm'> Open An Account</a>";
	document.getElementById("LoginLinkLeft").innerHTML = "<a href='https://www.buscainc.com/accounts/login.cfm'>Login</a>";
	return null;
}

