//WARNING!!!!!//This page is part of the live site.   Any modifications to this page will have an immediate effect on the// database.  This page contains all formatting for the webpages.  Changing this one page will modify the look// of the entire site.// GaltNet code to rectify sloppy Browser detectionvar agt=navigator.userAgent.toLowerCase(); //alert( agt )// *** BROWSER VERSION *** // Note: On IE5, these return 4, so use is_ie5up to detect IE5. var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion);var jsFormName;// Note: Opera and WebTV spoof Navigator.  We do strict client detection. // If you want to allow spoofing, take out the tests for opera and webtv. var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)                 && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)                 && (agt.indexOf('webtv')==-1)); var is_nav2 = (is_nav && (is_major == 2)); var is_nav3 = (is_nav && (is_major == 3)); var is_nav4 = (is_nav && (is_major == 4)); var is_nav5 = (is_nav && (is_major == 5)); var is_nav5up = (is_nav && (is_major >= 5)); var is_webtv = (agt.indexOf('webtv') !=- 1); var is_ie   = (agt.indexOf("msie") != -1); var is_ie3  = (is_ie && (is_major < 4)); var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 4.0") !=-1) ); var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0") !=-1) );var is_ie501  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.01") !=-1) );  var is_ie55  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1) ); var is_ie6  = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1) ); var is_ie7  = (is_ie && (is_major == 4) && (agt.indexOf("msie 7.0") !=-1) ); var is_ie4up  = (is_ie && !is_ie3 );var is_ie5up  = (is_ie && !is_ie3 && !is_ie4 );var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie55);var is_ie7up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie55 && !is_ie6);var is_ieMac  = (is_ie && (is_major == 4) && (agt.indexOf("mac") !=-1) ); var is_opera = (agt.indexOf("opera") != -1);var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1);var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6);var is_konqueror = (agt.indexOf("konqueror") != -1);var is_konqueror1 = (agt.indexOf("konqueror/1") != -1);var is_konqueror2 = (agt.indexOf("konqueror/2") != -1);var is_konqueror3 = (agt.indexOf("konqueror/3") != -1);var is_konqueror3up = (is_konqueror && !is_konqueror1 && !is_konqueror2 );// may not need this var is_safari = (agt.indexOf("mozilla") != -1 && agt.indexOf("safari") != -1);if (is_safari == true) { is_nav5up = false ; }var is_lotusnotes = ( agt.indexOf("lotus") != -1)var is_Mac  = (agt.indexOf("mac")!=-1) ; var is_Windows  = (agt.indexOf("windows")!=-1) ;var is_linux = (agt.indexOf("inux")!=-1);var is_unix  = ((agt.indexOf("x11")!=-1) || is_linux);  editurl = "";//GaltNet BCM 12/13/2004 -- this is even easier, and works best for relative adressingvar AgreeToTerms = "" ;var useraccess = "" ;var tvusername = "" ;var tvmanageID = "" ;var pathView = document.URL;var GNServer = "" ;var GNURLPath = "" ;var GNServerName = "" ;var GNServerPath = "" ;var GNDBName = "" ;var ITMcookieName = "ITMX_AllCookie2";var defaultFrontPage = "";var GNPos ;var Doc1031Type = ""; var Rel1031DocKey = "";var Rel1031State = "";var Rel1031Action = "";var Pur1031DocKey = "";var Pur1031State = "";var Pur1031Action = "";if ( pathView.indexOf( "nsf" ) != -1 ) {	GNPos = pathView.indexOf("nsf");	GNURLPath= pathView.substring(0, GNPos+3);} else {	if ( pathView.indexOf( "servlet" ) != -1 ) {		GNPos = pathView.indexOf("servlet");		GNURLPath = pathView.substring(0, GNPos - 1) + "/tvsite.nsf";	} else {		GNURLPath= pathView ;	}}// Prevents names.nsf from breaking links on bad loginif ( GNURLPath.indexOf( "names.nsf" ) != -1 ) {	GNURLPath = replaceSubstring(GNURLPath, "names.nsf", "tvsite.nsf");}GNServer= GNURLPath;pos = GNURLPath.indexOf( "http://" )//alert ( GNURLPath ) ;if ( pos != -1 ) {	// normal http decode	GNServerName = GNServer.substring(7, GNServer.length) ;	pos2 = GNServerName.indexOf( "/" ) ;	if ( pos2 != -1 ) {		GNServerName = GNServerName.substring(0, pos2) ;		GNDBName = GNServer.substring(GNServerName.length + 8, GNServer.length) ;	} else {		GNDBName = "tvsite.nsf" ;	}	// alert (GNServerName) ;} else {	// https decode	GNServerName = GNServer.substring(8, GNServer.length) ;	pos2 = GNServerName.indexOf( "/" ) ;	if ( pos2 != -1 ) {		GNServerName = GNServerName.substring(0, pos2) ;		GNDBName = GNServer.substring(GNServerName.length + 9, GNServer.length) ;	} else {		GNDBName = "tvsite.nsf" ;	}	// alert (GNServerName) ;}// Server name has been found, now find the database name//alert ( GNDBName )GNServerPath = "http://" + GNServerName ;redirectedtomanage = 1;// Note, this is not a good browser detection method.// IE6 which is NOT DOM compliant, will be detected as such,// but DOM compliancy has a different event model (NS6, Firefox) & IE6 will failvar isDOM = (document.getElementById ? true : false); var isIE4 = ((document.all && !isDOM) ? true : false);var isNS4 = (document.layers ? true : false);if (tvusername != "Anonymous" && useraccess == "-1") {	location.href( GNURLPath + "?logout&RedirectTo=" + GNURLPath + "/Sorry?OpenForm");}function handler(e) {	if (is_nav5up || is_safari || is_konqueror3up ) {		var key = e.keyCode;	} else {		if (is_nav4)			var key = e.which;		else			var key = e.keyCode;	}	if (key == 13) {		//setLoginCookie('login');		signInUser(); //ELV20080624 tkt: 5618E571C2448		document.forms[1].submit();		return false;	} else		return true;}function replaceSubstring(charString, search, replace) {	var tempCharString = charString + '';	var searchChars = search + '';	var replaceChars = replace + '';	p = 0;	while (p < tempCharString.length && (p = tempCharString.indexOf(searchChars, p)) >= 0) {		tempCharString = tempCharString.substring(0, p) + replaceChars + tempCharString.substring(p + searchChars.length, tempCharString.length);		p += replaceChars.length;	}	return tempCharString;}function gotoFront() {	formURL = "/tvsite.nsf/" + defaultFrontPage + "?OpenForm";	location.href = formURL ;}//ELV20091104 Cookie path is / so we can share it between home.nsf and tvsite.nsffunction setLoginCookie(name) {	f = document.forms[1];	var nextyear = new Date();	nextyear.setFullYear(nextyear.getFullYear() + 1);	username = f.Username.value;	password = escape(f.Password.value);	document.cookie = name + "=" + escape(username) + "; expires=" + nextyear.toGMTString() + "; path=/";}function GetLoginCookie(cookiedata) {	f = document.forms[1];	username = unescape(cookiedata.slice( cookiedata.indexOf("=") + 1));		f.Username.value = username;}function retrieveCookieByName(Name) {	var search = Name + "="	if (document.cookie.length > 0) {		offset = document.cookie.indexOf(search);		if (offset != -1) {			offset += search.length ;			end = document.cookie.indexOf(";", offset) ;			if (end == -1) { end = document.cookie.length; }			GetLoginCookie(document.cookie.substring(offset, end));		} 	}}function showTitleOrderPop() {	hideDropDowns();	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		xPos = parseInt(document.body.clientWidth/2 - 123) ;		document.getElementById("titleorderPop").style.left = xPos + "px" ;		document.getElementById("titleorderPop").style.visibility = "visible" ;	}	if ( is_ie4 ) {		xPos = parseInt(document.body.clientWidth/2 - 123) ;		document.all["titleorderPop"].style.left = xPos ;		document.all["titleorderPop"].style.visibility = "visible" ;	}}function hideTitleOrderPop() {	showDropDowns();	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		document.getElementById("titleorderPop").style.visibility = "hidden" ;	}	if ( is_ie4 ) {		document.all["titleorderPop"].style.visibility = "hidden" ;	}}function showAcrisPop() {	hideDropDowns();	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		xPos = parseInt(document.body.clientWidth/2 - 261) ;		document.getElementById("acrisPop").style.left = xPos + "px" ;		document.getElementById("acrisPop").style.visibility = "visible" ;	}	if ( is_ie4 ) {		xPos = parseInt(document.body.clientWidth/2 - 261) ;		document.all["acrisPop"].style.left = xPos ;		document.all["acrisPop"].style.visibility = "visible" ;	}}function showUseraccessPop() {	hideDropDowns();	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		xPos = parseInt(document.body.clientWidth/2 - 123) ;		document.getElementById("useraccessPop").style.left = xPos + "px" ;		document.getElementById("useraccessPop").style.visibility = "visible" ;	}	if ( is_ie4 ) {		xPos = parseInt(document.body.clientWidth/2 - 123) ;		document.all["useraccessPop"].style.left = xPos ;		document.all["useraccessPop"].style.visibility = "visible" ;	}}function hideUseraccessPop() {	showDropDowns();	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		document.getElementById("useraccessPop").style.visibility = "hidden" ;	}	if ( is_ie4 ) {		document.all["useraccessPop"].style.visibility = "hidden" ;	}}function hideDropDowns() {	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		if ( document.getElementById("OrderType")  && is_ie ) {			document.getElementById("OrderType").style.visibility = "hidden" ;		}		if ( document.getElementById("StateCalc")  && is_ie ) {			document.getElementById("StateCalc").style.visibility = "hidden" ;		}		if ( document.getElementById("OrderType_2")  && is_ie ) {			document.getElementById("OrderType_2").style.visibility = "hidden" ;		}		if ( document.getElementById("Calculators")  && is_ie ) {			document.getElementById("Calculators").style.visibility = "hidden" ;		}				}	if ( is_ie4 ) {		if ( document.all["OrderType"] ) {			document.all["OrderType"].style.visibility = "hidden" ;		}		if ( document.all["StateCalc"] ) {			document.all["StateCalc"].style.visibility = "hidden" ;		}		if ( document.all["OrderType_2"] ) {			document.all["OrderType_2"].style.visibility = "hidden" ;		}		if ( document.all["Calculators"] ) {			document.all["Calculators"].style.visibility = "hidden" ;		}				}}function showDropDowns() {	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		if ( document.getElementById("OrderType")  && is_ie ) {			document.getElementById("OrderType").style.visibility = "visible" ;		}		if ( document.getElementById("StateCalc")  && is_ie ) {			document.getElementById("StateCalc").style.visibility = "visible" ;		}		if ( document.getElementById("OrderType_2")  && is_ie ) {			document.getElementById("OrderType_2").style.visibility = "visible" ;		}			}	if ( is_ie4 ) {		if ( document.all["OrderType"] ) {			document.all["OrderType"].style.visibility = "visible" ;		}		if ( document.all["StateCalc"] ) {			document.all["StateCalc"].style.visibility = "visible" ;		}		if ( document.all["OrderType_2"] ) {			document.all["OrderType_2"].style.visibility = "visible" ;		}	}}function GNreadFormCookie() {	cookieValue = GNgetCookie( tvusername + "_acrisPopup");	return cookieValue ;}function GNgetCookie(name) {         var dc = document.cookie;         var prefix = name + "=";         var begin = dc.indexOf("; " + prefix);         if (begin == -1) {           begin = dc.indexOf(prefix);           if (begin != 0) return null;         } else           begin += 2;         var end = document.cookie.indexOf(";", begin);         if (end == -1)           end = dc.length;         return unescape(dc.substring(begin + prefix.length, end));       }// ------------------- End of special code -------------------function w(theLine) {	document.write(theLine);}function go(number) {	if (useraccess == "0" || useraccess == "1"  || useraccess == "2" ) {		formnumber = 0;	} else {		formnumber = 1;	}	if ( useraccess == "-1" ) {		//alert ( "You must be logged in to use this feature") ;		showUseraccessPop();		return;	}	if (number == "1") {		ordertype = document.forms[formnumber].OrderType[document.forms[formnumber].OrderType.selectedIndex].value;		if (ordertype == "0") {			//Title insurance order was selected...			showTitleOrderPop();			return;		} else if (ordertype == "1") {			theurl = "/tvsite.nsf/CoopLienSearch?OpenForm";			location.href = theurl;					} else if (ordertype == "3") {			theurl = "/tvsite.nsf/OtherSearch?OpenForm";			location.href = theurl;					} else if (ordertype == "4") {			theurl = "/tvsite.nsf/1031Exchange?OpenForm";			location.href = theurl;		} else if (ordertype == "11") {			theurl = "/tvsite.nsf/coopDD?OpenForm";			location.href = theurl;		} else if (ordertype == "13") {			theurl = "/tvsite.nsf/offeringplan?OpenForm";			location.href = theurl;		} else if (ordertype == "14") {			theurl = "/tvsite.nsf/TitleOrder?OpenForm&ptype=5";			location.href = theurl;					} else if (ordertype == "9") {			if ( useraccess == 2 ) {				theurl = "/tvsite.nsf/AcrisETaxActSetup?OpenForm&AST=P";				location.href = theurl;				} else {				dontShowPopup = GNreadFormCookie();				if ( dontShowPopup == "Y" ) {					theurl = "/tvsite.nsf/AcrisETaxActSetup?OpenForm&AST=P";					location.href = theurl;					} else {					showAcrisPop() ;					return;				}			}				} else if (ordertype == "2") {			//theurl = "/tvsite.nsf/UCCForm?OpenForm";			theurl = "/tvsite.nsf/UCCSelector?OpenForm";			location.href = theurl;					} else if (ordertype == "5") {			theurl = "/tvsite.nsf/CommLinesApplication?OpenForm";			location.href = theurl;					} else if (ordertype == "6") {			theurl = "/tvsite.nsf/PersonalLinesApplication?OpenForm";			location.href = theurl;					} else if (ordertype == "7") { //document recording			theurl = GNURLPath + (useraccess == "2" ? "/admindr2?OpenForm":"/public/TV_DocRecIntro?opendocument&Fr=TV") ;   			location.href = theurl;					} else if (ordertype == "8") {			location.href = "/tvsite.nsf/foreclosure?OpenForm";		} else if (ordertype == "12"){			window.open("/tvsite.nsf/gfe?openForm");		}	} else if (number == "2") {		if ( useraccess == "0" ) {			alert ( "Your account must be activated to use this feature") ;			return;		} else {			theurl = "/tvsite.nsf/ClosingCalc?OpenForm";				//theurl = "/tvsite.nsf/CCGFELanding?OpenForm";				xaction = document.forms[formnumber].StateCalc[document.forms[formnumber].StateCalc.selectedIndex].value;			if (xaction != "0") {				theurl = theurl + "&Type=" + xaction;			}			location.href = theurl;		}	} else if (number == "3") {		if ( useraccess == "0" ) {			alert ( "Your account must be activated to use this feature") ;			return;		} else {			ordertype = document.forms[formnumber].OrderType_2.selectedIndex ;			if (ordertype == "0") {				 if ( useraccess == "2" ) {					theurl = "/tvsite.nsf/AcrisETaxActSetup?OpenForm&AST=P";					location.href = theurl;					} else {					dontShowPopup = GNreadFormCookie();					if ( dontShowPopup == "Y" ) {						theurl = "/tvsite.nsf/AcrisETaxActSetup?OpenForm&AST=P";						location.href = theurl;						} else {						showAcrisPop() ;						return;					}				}			} else {				// put in logic to select the form				theurl = "/tvsite.nsf/LegalForms?OpenForm&F=" + ordertype ;			}			location.href = theurl;		}	} else if (number == "4") {		if ( useraccess == "0" ) {			alert ( "Your account must be activated to use this feature") ;			return;		} else {			theurl = "/tvsite.nsf/ClosingCalc?OpenForm";			theurl = theurl + "&Type=1";			location.href = theurl;		}	} else if (number == "5") {		theurl = "/tvsite.nsf/CommLinesApplication?OpenForm";		location.href = theurl;				} else if (number == "6") {			theurl = "/tvsite.nsf/PersonalLinesApplication?OpenForm";		location.href = theurl;						} else if (number == "7") {			theurl = "/tvsite.nsf/1031Exchange?OpenForm";		location.href = theurl;						}		}function siteURLLink( action ) {	jsAction = action ;	fullURL = "/tvsite.nsf/" +  jsAction ;	location.href = fullURL ;}function ShowPopup(thescreen, width, height,showtop) {	//for the arg, include the ?OpenForm or ?OpenPage	if (isNaN(width))		width = "545";	if (isNaN(height))		height = "500";	if (isNaN(showtop))		showtop = 0;	var mypage = GNURLPath + "/" + thescreen;	winprops = 'height=' + height + ',width= ' + width + ',top=0,left=50,top=70,toolbar=' + showtop + ',location=0,directories=0,status=0,menubar=' + showtop + ',scrollbars=1,resizable';	win = window.open(mypage, "TitleVest", winprops);	if (parseInt(navigator.appVersion) >= 4) { 		win.window.focus();	 }}function getFormName() {	var strLocation = location.href;	strLocation = (strLocation.split('?'))[0].split('/');	var strform = strLocation[strLocation.length-1];	return strform;}function getURLArg(arg) {	var y = "";	var s=location.href.toUpperCase();	if(s.indexOf(arg.toUpperCase())==-1) return "";	var x=s.split(arg.toUpperCase()+"=");	if(x.length > 1) {		 y=x[1].split('&');		 return y[0];	} else {	 	return y;	}			}function drawNewHeader_Home(frontpage, nh_useraccess, nh_livehelpWrite) {	if ( arguments[2] ) {	} else {		nh_livehelpWrite = "yes" ;	}	jsUserAccess = nh_useraccess;	if ( jsUserAccess == "2" ) {		defaultFrontPage = "Fronta";	} else if ( jsUserAccess == "1" || jsUserAccess == "0" ) {		//elv20091201: frontcDetail		defaultFrontPage = "Frontc";	} else {		defaultFrontPage = "Front";	}		var liveHelpImg = "http://server.iad.liveperson.net/hc/25870545/?cmd=repstate&site=25870545&&ver=1&imageUrl=http://www.titlevest.com/images/livehelp";	var liveHelpURL = "http://server.iad.liveperson.net/hc/25870545/?cmd=file&file=visitorWantsToChat&site=25870545&byhref=1&imageUrl=http://www.titlevest.com/images/livehelp";		var sId = getSiteId();		w("<table width='997px' border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF' align='center'>");	w("<tr><td colspan='9'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='20' border='0'></td></tr>");	w("<tr><td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	w("<td >");	w("<table width='518px' border='0' cellpadding='0' cellspacing='0'>");	w("<tr>");	w("<td style='width:45px;'><div class='elButton_1'><a href='"+ getPageURL(sId,'HOME') +"'></a></div></td>");	w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	w("<td style='width:132px;'><div class='elButton_2'><a href='"+ getPageURL(sId,'ADV') +"'></a></div></td>");	w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	/* elv20091117: tkt:12F58F97EEEE26*/	//w("<td style='width:132px;'><div class='elButton_7'><a href='"+ getPageURL(sId,'CLE') +"'></a></div></td>");	w("<td style='width:98px;'><div class='elButton_7'><a href='"+ getPageURL(sId,'NEWS') +"'></a></div></td>");	w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");		w("<td style='width:44px;'><div class='elButton_3'><a href='"+ getPageURL(sId,'FAQ') +"'></a></div></td>");	w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	w("<td style='width:76px;'><div class='elButton_4'><a href='"+ getPageURL(sId,'ABOUT') +"'></a></div></td>");	//w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	//w("<td style='width:69px;'><div class='elButton_5'><a href='"+ getPageURL(sId,'CAREER') +"'></a></div></td>");	w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	w("<td style='width:92px;'><div class='elButton_6'><a href='"+ getPageURL(sId,'CONTACT') +"'></a></div></td>");	w("</tr>");	w("</table>");	w("</td>  	");	w("<td width='37px'><img src='" + GNURLPath + "/images/spacer.gif' width='37' height='1' border='0'></td>   ");		w("<td width='98px'>");	if ( jsUserAccess == "2"  || jsUserAccess == "deny" ) {		w('&nbsp;</td>');		} else {		if ( nh_livehelpWrite == "yes" ) {			w("<a href='" + liveHelpURL + "' target='chat25870545'  onClick=\"javascript:window.open('"+liveHelpURL+"&referrer='+escape(document.location),'chat25870545','width=472,height=320');return false;\" ><img src='" + liveHelpImg + "' border='0'</a>");		} else {			w("&nbsp;");		}		w('</td>');							//<!-- END LivePerson Button code -->	}		//w("<td width='98px'><a href='" + liveHelpURL + "' target='chat25870545'  onClick=\"javascript:window.open('"+liveHelpURL+"&referrer='+escape(document.location),'chat25870545','width=472,height=320');return false;\" ><img src='" + liveHelpImg + "' border='0'</a></td>");//	w("<td width='98px'><a href='#'><img src='images/live_help.gif' border='0'></a></td>");	w("<td width='6px'><img src='" + GNURLPath + "/images/spacer.gif' width='6' height='1' border='0'></td>");	w("<td width='137px'><a href='" +  "/home.nsf/refFrnd' target='_blank'><img src='" + GNURLPath + "/images/refer.gif' border='0'></a></td>");		w("<td width='6px'><img src='" + GNURLPath + "/images/spacer.gif' width='6' height='1' border='0'></td>");	w("<td width='125px'><a class='addthis_button' href='http://www.addthis.com/bookmark.php?v=250&amp;username=pbaaske'><img src='http://s7.addthis.com/static/btn/v2/lg-share-en.gif' width='125' height='16' alt='Bookmark and Share' style='border:0'></a></td>");		w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	w("</tr>");	w("<tr>");	w("<td colspan='9'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='20' border='0'></td>");	w("</tr>");	w("</table>");}var regRedir = "";function drawLoginHome(nh_useraccess, notusetoken) {	jsUserAccess = nh_useraccess;	if ( jsUserAccess != "deny") {		var bb5613333553= getCookie2('_bb5613333553');		if ( jsUserAccess == "-1") {			if ( !notusetoken && bb5613333553 ){ //elv20080625 tkt: 5618E571C2448				//location =  "/tokenlinks.nsf/bb5613333553?OpenForm&id="+bb5613333553+"&u="+location;				location =  "/tokenlinks.nsf/bb5613333553?OpenForm&id="+bb5613333553+"&u=";				return;			}else{				//elv20080904: tkt:46E4F693D5234 if notusetoken is true means the token previously failed so we destroy the				//cookie to not call it anymore.				resetLoginCookie('_bb5613333553');			}						w('</FORM>');			//elv20091104: tvsite.nsf was added to redirect request from home.nsf			w('<FORM NAME="_CustomLoginForm" METHOD=post ACTION="/tvsite.nsf?login">');			w('<input type="hidden" name="RedirectTo" value="/tvsite.nsf">');	//ELV20080624 tkt: 5618E571C2448				w("<tr>");			w("<td colspan='3' class='grey11'>Username:</td>");			//elv20091104: tvsite.nsf was added to redirect request from home.nsf			w("<td width='222' rowspan='6' valign='top' align='right'><a href='/tvsite.nsf/User_Register?OpenForm"+(regRedir ? "&regRedir="+regRedir : "")+"'><img src='" + GNURLPath + "/images/not_member_back.gif' valign='right' border='0'></a></td>");			w("</tr>");			w("<tr>");			w("<td colspan='3' ><input type='text' class='inputBox' size='25' name='Username'></td>");			w("</tr>");			w("<tr> ");			w("<td colspan='3'><img src='" + GNURLPath + "/images/spacer.gif' width='1' height='3' border='0'></td>");			w("</tr>");			w("<tr>");			w("<td colspan='3' class='grey11' valign='bottom'>Password:</td>");			w("</tr>");			w("<tr>");			w("<td width='163'><input id='nsPswd' type='password' class='inputBox' size='25' name='Password' onKeydown='return handler(event);'></td>");			//w("<td width='100' align='left'><a onClick=setLoginCookie('login');document.forms[1].submit();return false; href='javascript:void(0);'><input type='image' src='" + GNURLPath + "/images/login.gif'></a></td>");			w("<td width='100' align='left'><a onClick='signInUser();document.forms[1].submit()' href='javascript:void(0);'><input type='image' src='" + GNURLPath + "/images/login.gif'></a></td>"); //ELV20080624 tkt: 5618E571C2448			w("<td width='24'>&nbsp;</td>");			w("</tr>");			w("<tr>");			w('<td height="25" class="savePass"><input type="checkbox" name="action" value="1"> Save my password</td>'); //ELV20080624 tkt: 5618E571C2448			//elv20091104: tvsite.nsf was added to redirect request from home.nsf 			w("<td colspan='2' height='25'><a href='/tvsite.nsf/User_ForgotPassword?OpenForm' class='pass'>Forgot your login?</a></td>");			w("</tr>");						retrieveCookieByName( 'login' );						w("<tr>");   			w("<td colspan='4'><img src='" + GNURLPath + "/images/spacer.gif' width='1' height='10' border='0'></td>");			w("</tr>");				} else {				w("<tr>");			w("<td colspan='4' valign='bottom' height='1' class=\"loginborder\"><img src='" + GNURLPath + "/images/spacer.gif' width='479' height='1' border='0'></td>");			w("</tr>");			w("<tr>");			w("<td colspan='4'><img src='" + GNURLPath + "/images/spacer.gif' width='1' height='10' border='0'></td>");			w("</tr> ");			w("<tr>");			w("<td colspan='4' height='40' class='welcome'>&nbsp;Welcome, " + tvusername + "</td>");			w("</tr>  ");			w("<tr>");			//elv20091104: tvsite.nsf was added to redirect request from home.nsf			if ( !bb5613333553 ){ //elv20080625 tkt: 5618E571C2448				w("<td width='224' height='35'>&nbsp;<a href='/tvsite.nsf/?logout&RedirectTo=" + GNURLPath + "/redirector2' class='pass'>If you are not this user, click here.</a></td>");			}else{				w("<td width='224' height='35'>&nbsp;<a href='/tvsite.nsf/signout?ReadForm&RedirectTo=" + GNURLPath + "/redirector2' class='pass'>If you are not this user, click here.</a></td>");			}			if ( jsUserAccess == "2") {				AgreeToTerms = "Agree"; 				w("<td width='155'>&nbsp;</td>");			} else if ( jsUserAccess == "1") {				//elv20091104: tvsite.nsf was added to redirect request from home.nsf				editurl = '/tvsite.nsf/vUSRAllByDocKeyUser/' + tvmanageID + '?EditDocument';				if (AgreeToTerms == "") 					redirectedtomanage = 0;				w("<td width='155'><a href='" + editurl + "'><img src='" + GNURLPath + "/images/manage_my.gif' border='0'></a></td>");			} else if ( jsUserAccess == "0") {				w("<td width='155'>&nbsp;</td>");			}						w("<td width='25'><img src='" + GNURLPath + "/images/spacer.gif' width='5' height='1' border='0'></td>");			//elv20091104: tvsite.nsf was added to redirect request from home.nsf			if ( !bb5613333553 ){ //elv20080625 tkt: 5618E571C2448				w("<td width='75'><a href='/tvsite.nsf/?logout&RedirectTo=" + GNURLPath + "/redirector2'><img src='" + GNURLPath + "/images/logout.gif' border=0></a></td>");			}else{				w("<td width='75'><a href='/tvsite.nsf/signout?ReadForm&RedirectTo=" + GNURLPath + "/redirector2'><img src='" + GNURLPath + "/images/logout.gif' border=0></a></td>");			}			w("</tr>");			w("<tr>");			w("<td colspan='4'><img src='" + GNURLPath + "/images/spacer.gif' width='1' height='10' border='0'></td>");			w("</tr>");			w("<tr>");			w("<td colspan='4' valign='bottom' height='1' class=\"loginborder\"><img src='" + GNURLPath + "/images/spacer.gif' width='479' height='1' border='0'></td>");			w("</tr>");			w("<tr>");   			w("<td colspan='4'><img src='" + GNURLPath + "/images/spacer.gif' width='1' height='21' border='0'></td>");			w("</tr>");		}	}}function drawNewFooter_Home() {	var currYear = new Date();	var sId = getSiteId();	w("<table width='997px' border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF' align='center'>");	w("<tr><td colspan='3'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='5' border='0'></td></tr>");	w("<tr>");	w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	w("<td width='977px' height='28' class='footerLine'>&nbsp;</td>");	w("<td width='10px'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='1' border='0'></td>");	w("</tr>");	w("<tr><td colspan='3' height='44' align='center'>");	w("<a href='"+ getPageURL(sId,'HOME') +"' class='footerNav'>HOME</a>&nbsp;");	w("<a href='"+ getPageURL(sId,'ADV') +"' class='footerNav'>THE ADVANTAGE</a>&nbsp;");	//elv20091117: tkt: 12F58F97EEEE26		w("<a href='"+ getPageURL(sId,'NEWS') +"' class='footerNav'>IN THE NEWS</a>&nbsp;");	w("<a href='"+ getPageURL(sId,'CLE') +"' class='footerNav'>CLE/CE</a>&nbsp;");			w("<a href='"+ getPageURL(sId,'FAQ') +"' class='footerNav'>FAQ's</a>&nbsp;");	w("<a href='"+ getPageURL(sId,'ABOUT') +"' class='footerNav'>ABOUT US</a>&nbsp;");	//w("<a href='"+ getPageURL(sId,'CAREER') +"' class='footerNav'>CAREERS</a>&nbsp;");	w("<a href='"+ getPageURL(sId,'CONTACT') +"' class='footerNav'>CONTACT US</a>&nbsp;");	w(getJSLinkTextForFooter(sId,"TERMS","TERMS OF AGREEMENT") +"&nbsp;");	w(getJSLinkTextForFooter(sId,"PRIVACY","PRIVACY STATEMENT") +"&nbsp;");//	w("<a href='"+ getPageURL(sId,'PRIVACY') +"' class='footerNav'>PRIVACY STATEMENT</a>");	w("</td></tr>");	w("<tr><td colspan='3' align='center' class='grey11'>&copy; " + currYear.getFullYear() + " TITLEVEST &bull; 1031VEST &bull; INSUREVEST. ALL RIGHTS RESERVED</td></tr>");	w("<tr><td colspan='3'><img src='" + GNURLPath + "/images/spacer.gif' width='10' height='20' border='0'></td></tr>");	w("</table>");}//ELV20091104: path is / so we can share it between tvsite.nsf and home.nsffunction setNewCookie(name, value, expires, path, domain, secure) {	var curCookie = name + "=" + escape(value) +      ((expires) ? "; expires=" + expires.toGMTString() : "") +      "; path=/" +      ((domain) ? "; domain=" + domain : "") +      ((secure) ? "; secure" : "");	document.cookie = curCookie + ";";}function setSiteCookie(id) {	setNewCookie("siteid",id,null,null,"");}function getSiteId() {	var s = getURLArg("Fr");	s = s.split("#")[0];	//If site id is not available from url then get it from cookie	if (s == null || s =="") 		s = retrieveCookie("siteid");	if (s == null || s =="") 		return "TV"	else		return s;}function retrieveCookie(Name) {	var search = Name + "="	var cookieValue = "";	if (document.cookie.length > 0) {		offset = document.cookie.indexOf(search);		if (offset != -1) {			offset += search.length ;			end = document.cookie.indexOf(";", offset) ;			if (end == -1) { end = document.cookie.length; }			cookiedata = document.cookie.substring(offset, end);			cookieValue = unescape(cookiedata.slice( cookiedata.indexOf("=") + 1));			} 	}	return cookieValue;}function getPageURL(sId,pId) { sId = (sId == ""?"TV":sId); if (pId == "HOME") 	return GNURLPath + "/redirector2?openform&Fr=" + sId;  if (pId == "TERMS" ) { 		return "popup_Terms_" + sId + "?OpenPage&Fr=" + sId; } if (pId == "PRIVACY" ) { 		return "popup_Privacy_"+ sId+"?OpenPage&Fr=" + sId; }  //elv20091104: insterted tvsite.nsf to redirect request from home.nsf if (pId == "CLE" ){	return "/tvsite.nsf/cle"; }  //elv20091117: tkt:12F58F97EEEE26 if (pId == "NEWS" ){	return "/home.nsf/News_Summary?OpenForm"; }  if(sId != "" && pId != "")	 return GNURLPath + "/public/"+sId + "_" + pId + "?opendocument&Fr="+sId; else	return GNURLPath + "/front?openform&Fr=" + sId;	}function getJSLinkTextForFooter(sId,pId,txt) {	//if ( sId == "1031" && (pId == "TERMS" || pId == "PRIVACY" )) 	//	return '<a href="'+ getPageURL(sId,pId) + '" class="footerNav">' + txt + '</a>';	//else		return '<a class="footerNav" href="javascript:void(0);" onclick="ShowPopup(\''+ getPageURL(sId,pId) + '\');return false;">' + txt + '</a>';}//ELV20080624 tkt: 5618E571C2448//elv20091104: inserted tvsite.nsf to redirect request from home.nsffunction signInUser(){ var form = document.forms[1]; if ( form.action.checked ){	 	form.RedirectTo.value = "/tvsite.nsf/bb5613333553?ReadForm&a=1"; } setLoginCookie('login'); }//elv20080624 tkt: 5618E571C2448function getCookie2(name) {	var offset = document.cookie.indexOf(name);	var res = '';	if (offset != -1) {			offset += name.length+1 ;			end = document.cookie.indexOf(";", offset) ;			if (end == -1) { end = document.cookie.length; }			res = document.cookie.substring(offset, end);	} 	return res;	}//elv20080624 tkt: 5618E571C2448//elv20091104: path is / to share it between home.nsf and tvsite.nsffunction resetLoginCookie(name) {	document.cookie = name + "=; expires=Tue, 01-Jan-1980 00:00:00 GMT; path=/";}//elv20080624 tkt: 5618E571C2448function confirmAutoLogin(){ var form = document.forms[1]; if ( form.action.checked ){	if ( !confirm("Please make sure you select this option from a secure computer\n( one that is not shared ) since may have security implications.\nDo you want to continue?") ){		form.action.checked = false;		} }}//elv20081202 tkt: 189A4EDA0DD950function trim2( s ) {	return s.replace(/^\s+|\s+$/g,"");}function hideAcrisPop() {	showDropDowns();	if (is_ie5up || is_nav5up || is_safari || is_konqueror3up || is_opera7up ) {		document.getElementById("acrisPop").style.visibility = "hidden" ;	}	if ( is_ie4 ) {		document.all["acrisPop"].style.visibility = "hidden" ;	}}function gotoAcris() {	if ( jsAcrisUser == "Y" ) {		siteURLLink("AcrisETaxActSetup?OpenForm&AST=P");	} else {		siteURLLink("AcrisETaxActSetup?OpenForm&AST=T");	}}function switchView(viewname) {	val = viewname;	setCookie(val);	formURL =  "/tvsite.nsf/" + defaultFrontPage + "?OpenForm" ;	location.href = formURL ;}//elv20091201: FrontcDetailfunction switchViewDetail(viewname) {	val = viewname;	setCookie(val);	formURL =  "/tvsite.nsf/FrontcDetail?OpenForm" ;	location.href = formURL ;}function switchUserView(viewname) {	val = viewname;	setCookie(val);	formURL = "/tvsite.nsf/" + defaultFrontPage + "?OpenForm" ;	location.href = formURL ;}function switchAdminView(viewname) {	val = viewname;	location.href = "/tvsite.nsf/Admin_DisplayOrders?OpenForm&" + viewname + "&Start=1&Cat1=";}//elv20091104: home.nsf: update cookie path to / to share it between home.nsf and tvsite.nsffunction setCookie(pValue) {	document.cookie = ITMcookieName + "="+pValue+"; path=/";}function handler(e) {	if (is_nav5up || is_safari || is_konqueror3up ) {		var key = e.keyCode;	} else {		if (is_nav4)			var key = e.which;		else			var key = e.keyCode;	}	if (key == 13) {		//setLoginCookie('login');		signInUser(); //ELV20080624 tkt: 5618E571C2448		document.forms[1].submit();		return false;	} else		return true;}function handlers(e) {	if ( useraccess == "0" ) {		alert ( "Your account must be activated to use this feature") ;		return false;	}	if (isNS4) {		var key = e.which;	} else {		var key = e.keyCode;	}	if (key == 13) 	{		qstr = document.forms[0].Query_1.value;		if (qstr == "SEARCH" || qstr == "") {			alert("Please enter the search criteria.");		} else {//			hi= GNURLPath + "/vOrders_SearchResults?SearchView&SearchMax=20&SearchOrder=4&query=" + qstr;//			location.href = hi;			goSearch();		}		return false;	} else {		return true;	}}
