// BreadCrumb detection 
// If the page calling the links is from lender, vendor, realtor, or broker
// then add "?tab=lender" ect... to the link.  This allows the called page to show which tab
// you are coming from.
var url = window.location.href;
if (url.indexOf('broker')>-1) {var tab='broker';}
else if (url.indexOf('realtor')>-1) {var tab='realtor';}
else if (url.indexOf('lender')>-1) {var tab='lender';}
else if (url.indexOf('vendor')>-1) {var tab='vendor';}

//if a link is pressed on any page other than the landsafe pages, 
//it will place that tab name in the breadcrumb for the linked page		
if ("A" == event.srcElement.tagName & window.location.href.indexOf('/landsafe/')==-1) {
	if (event.srcElement.href.indexOf('/landsafe/') > -1 & event.srcElement.href.indexOf('javascript:')==-1) {
		event.srcElement.href = event.srcElement.href + '?tab=' + tab;
		return true;
	}	
}	
// End BreadCrumb detection
