function checkBrowser(){
	var brows = "";
	var agt=navigator.userAgent.toLowerCase();
	var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);
	
	var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
	var is_nav6 = (is_nav && (is_major == 5));
	
	var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
	
	if(is_ie5up | is_ie5_5up){
		brows = "IE";
	}
	else if (is_nav6){
		brows = "NS";
	}
return brows;
}
function switchDom(loc,objName){
	if (checkBrowser() == "NS"){
		return eval(loc).document.getElementById(objName);
	}
	else if (checkBrowser() == "IE"){
		return eval(loc).document.all(objName);
	}
}

//Alert message for Login on Client Lounge page - AL added 7/14/05 This will eventually be changed
// to work as a funtioning Login page. This is only temporary. - BEGINS HERE
function showLoginMessage()
{
	alert('You have entered an incorrect username and password.');
}
// Alert message ENDS HERE

function showAppMessage()
{
	alert('This form is currently under development.');
}
// Alert message ENDS HERE

function openWin(url,w,h,params,winName){
	strAtrLeft = "left=110"
	strAtrTop = "top=90"
	strAttributes = "titlebar=yes, menubar=no, toolbar=no, location=no, status=no, " + strAtrLeft + ", " + strAtrTop + ", width=" + w + ", height=" + h
	window.open(url + "?" + params,"AgentDetails",strAttributes)
}

function showTeamDetails(divObj){
	if (top.lastDivObj == "" | top.lastDivObj == undefined){
		switchDom(this,"intro").style.display = "none";
	}
	else{
		switchDom(this,top.lastDivObj).style.display = "none";
	}
	switchDom(this,divObj).style.display = "inline";
	top.lastDivObj = divObj;
}

//Alert message for Login on Client Lounge page - AL added 7/12/05 This will eventually be changed
// to work as a funtioning Login page. This is only temporary. - BEGINS HERE
function showLoginMessage()
{
	alert('You have entered an incorrect username and password.');
}
// Alert message ENDS HERE

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
