function getLoginCookieValue (cookieName) {
  var exp = new RegExp (escape(cookieName) + "=([^;]+)");
  if (exp.test (document.cookie + ";")) {
    exp.exec (document.cookie + ";");
    return unescape(RegExp.$1);
  }
  else return false;
}

function check_login_authentication() {
	if (getLoginCookieValue ("adv_user_level")&&getLoginCookieValue ("adv_user_level")) {
   		 document.getElementById("introductionHolder").innerHTML = "<div id=\"introductionHolderInside\" style=\"background:#654171 url(images/login2a.jpg) bottom no-repeat; padding:0px 10px 0px 10px; height:42px;\"><div id=\"wrapper\"><div id=\"outer\"><a href=\"advate/advate.html\"><img src=\"images/spacer.gif\" width=\"200\" height=\"35\" alt=\"Return to Advate\" /></a></div></div></div>"
	}
	else if (getLoginCookieValue ("adv_user_level")){
	    document.getElementById("introductionHolder").innerHTML = "<div id=\"introductionHolderInside\" style=\"background:#654171 url(images/login2a.jpg) bottom no-repeat; padding:0px 10px 0px 10px; height:42px;\"><div id=\"wrapper\"><div id=\"outer\"><a href=\"advate/advate.html\"><img src=\"images/spacer.gif\" width=\"200\" height=\"35\" alt=\"Return to Advate\" /></a></div></div></div>"
	}
	else if (getLoginCookieValue ("feiba_user_level")){
		document.getElementById("introductionHolder").innerHTML = "<div id=\"introductionHolderInside\" style=\"background:#654171 url(images/login2b.jpg) bottom no-repeat; padding:0px 10px 0px 10px; height:42px;\"><div id=\"wrapper\"><div id=\"outer\"><a href=\"feiba/feiba.html\"><img src=\"images/spacer.gif\" width=\"200\" height=\"35\" alt=\"Return to FEIBA\" /></a></div></div></div>"	
	}
}