/*	=======================================================================	*/
/// <remarks>
/// Version:
///		- number:	5.5.24
///		- build:	20061104
///		- status:	live
/// </remarks>
/*	=======================================================================	*/
/// <remarks>
/// Global Variables
/// </remarks>
	var nm_debug = false;
	try {
		var nm_pge = new ClassNM_Page(nm_debug);
		var nm_dat = new ClassNM_Data(nm_debug);
		var nm_PopUm = nm_pge.PopUm;
		var nm_PopPhone = nm_pge.PopPhone;
		nm_pge.AttachEvents();		
	} catch(e) {
		alert("loading error(nm_page): " + e.description);	
	}
/*	=======================================================================	*/
/// <remarks>
/// Class: ClassNM_Page
/// The ClassNM_Page object class has the following purpose/function:
///	  - Defines a single object class for the html page to contain all methods
///		and properties referenced by html in the page
/// </remarks>
/*	-----------------------------------------------------------------------	*/
/// <summary>
/// The ClassNM_Page object class is constructed as follows:
///		var thisobj = new ClassNM_Page(dbg);
/// - where:
///		- dbg:	debugging switch
/// </summary>
function ClassNM_Page(dbg) {
	/*	-------------------------------------------	*/
	/// <remarks>Properties: Public</remarks>
	/*	-------------------------------------------	*/
	this.Href = document.location.href;
	this.Host = document.location.hostname;
	this.Path = document.location.pathname;
	this.Srch = document.location.search;
	this.Port = document.location.port;
	this.Dref = document.referrer;
	this.Root = (document.all)? document.all : document;
	
	/*	-------------------------------------------	*/
	/// <remarks>Properties: Private</remarks>
	/*	-------------------------------------------	*/
	
	/* **************  INTERVIGIL ************** */
	var thisurl = "https://sec001.intervigil.com/"
	var nm_ClickStream_SiteID =  "nashuamobile_main";
	var imgs=new Array();
    var imdex = 0;
	var av = "0";
	var fv = "0";
	var request_string;
	/* **************************************** */
	
	var _self = this;	// self allows for a method/property to be called internally
	var _debug = (dbg)? dbg : false;
	var _id = "ClassNM_Page";
	var _doc = document;
	var _win = window;
	var _pop, _pop_name = "nmPP";
	var _shown;
	var _cntobj, _lftobj, _rhtobj, _homobj, _navobj, _ftrobj;	// primary elements on page
	var _init = false;
	var _killTimeOutId = false;
	var _killTO = 20 * 60000; // default kill timeout - 20 mins in milisecs
	var _reloadTimeOutId = false;
	// browser properties
	var _dom, _ie, _ie4, _ie5x, _saf, _konq, _moz, _mac, _win, _lin, _old, _ie5mac, _ie5xwin, _op;
	/*	-------------------------------------------	*/
	/// <remarks>Region: Accessor methods</remarks>
	/*	-------------------------------------------	*/
	this.GetID = function() { return(_id); }
	this.Shown = function() { return(_shown); }
	/*	-------------------------------------------	*/
	/// <remarks>Region: Public methods</remarks>
	/*	-------------------------------------------	*/
	this.PopDemo =	function(ul) { _Pop(ul,true,false,500,700); }
	this.PopDown =	function(ul) { _Pop(ul,false); }
	this.PopExt =	function(ul) { _pop_name = "nmPE"; _Pop(ul,false); }
	this.PopUp =	function(ul) { _Pop(ul,true,true,610,400); }
	this.PopUpUnq =	function(ul) { _pop_name = "nmP_ALT"; _Pop(ul,true,true,625,555); }
	this.PopFaq =	function(ul) { _Pop(ul,true,true,510,400); }
	this.PopImg =	function(ul,wd,ht) { _Pop(ul,true,false,wd+20,ht+20); }
	this.PopPgeAdd = function(ul) { _self.PopPgeEdt(ul, 485);}
	this.PopPgeEdt = function(ul, hgt) { 
		var currDate = new Date();
		var flushcache = Date.parse(currDate.toGMTString());
		_Pop(ul + "&flushcache=" + flushcache,true,false,480, (hgt) ? hgt : 455,false,true); 
	}
	this.PopDrop = function(ul) { _Pop(ul,true,true,640,600,false,false,0); }
	this.PopReport = function(ul,wd,ht) { _Pop(ul,true,true,wd,ht,true,true,false,true,true); }
	this.KeyPress = _KeyPress;
	this.AttachEvents = _AttachEvents;
	this.Load = _Load;
	this.Resize = _Resize;
	this.SetHover = _SetHover;
	this.PopOut = _PopOut;
	this.PopUm = _PopUm;
	this.PopPhone = _PopPhone;
	this.Pop = _Pop;
	this.SetTab = _SetTab;
	this.SetGroup = _SetGroup;
	this.Logout = _Logout;
	this.Kill = _Kill;
	this.Render = _Render;
	this.GoUrl = _GoUrl;
	this.SetFooter = _SetFooter;
	
	/* **************  INTERVIGIL ************** */
	this.linkClick  = _LinkClick;
	this.trackLinks = _TrackLinks;
	/* ***************************************** */
	
	this.Clickstream = _Clickstream;
	this.ClickstreamVer2 = _ClickstreamVer2;
	this.OpenClose = _OpenClose;
	this.ToggleDisplay = _ToggleDisplay;
	this.ToggleOne = _ToggleOne;
	this.ToggleAll = _showHideAll;
	this.KeepSession = _KeepSession;
	this.ReloadPage = _ReloadPage;
	this.FlashDetect = _FlashDetect;
	this.Refresh = function() { window.location.reload(true); }	// JavaScript 1.2 false=JavaScript in the document re-evaluated
	this.Replace = function() { window.location.replace(_self.Href+"&prxid="+Math.random()); }
	this.Refetch = function() { window.location.href = _self.Href; }
	this.ChangeSegmentMenu = _ChangeSegmentMenu;
	this.CheckDrop = _CheckDrop;
	this.DropShowHide = _DropShowHide;
	this.ShowFAQ = _ShowFAQ;
	this.HideFAQ = _HideFAQ;
	this.GetPDF = _GetPDF;
	this.SetPDFRegion = _SetPDFRegion;
	this.FilterDDown = _FilterDDown;
	this.ShowDialog = _ShowDialog;
	/// <summary>Method:_FilterDDown</summary>
	function _FilterDDown(slv_fld_name, fl, by_label, slv2_fld_name){
		if(slv2_fld_name)
			_FilterDDown(slv2_fld_name, fl, (by_label) ? true : false);
		var _filterDDownArr = eval("_filterDDownArr" + slv_fld_name);
		var elSel = document.getElementsByName(slv_fld_name).item(0);
		fl = (typeof(fl)==="string") ? document.getElementsByName(fl).item(0) : fl;
		var i, srch_str = (by_label) ? fl.options[fl.selectedIndex].text + " : " : fl.value +  " : " ;
		if(!_filterDDownArr){
			eval("_filterDDownArr" + slv_fld_name  + " = new Array();");
			_filterDDownArr = eval("_filterDDownArr" + slv_fld_name);
			for (i = elSel.length - 1; i>=0; i--) {
				if(!elSel.options[i].selected || elSel.options[i].value=="0")
					_filterDDownArr.push(_option(elSel.options[i].value, elSel.options[i].text));
			}
		}
		for (i = elSel.length - 1; i>=0; i--) {
			if(!elSel.options[i].selected || elSel.options[i].value=="0")
				elSel.remove(i);
		}
		for (i = _filterDDownArr.length - 1; i>=0; i--) {
			var opt = _option(_filterDDownArr[i].value, _filterDDownArr[i].text);
			try {
			    elSel.add(opt, null); // standards compliant; doesn't work in IE
			 }catch(ex) {
			    elSel.add(opt); // IE only
			 }
		}
		for (i = elSel.length - 1; i>=0; i--) {
			//alert(elSel.options[i].text.indexOf(srch_str) + ' : ' +srch_str.length);
			if (((!by_label && elSel.options[i].value.indexOf(srch_str)!==0) || (by_label && elSel.options[i].text.indexOf(srch_str)!==0)) && elSel.options[i].value !== "0")
				elSel.remove(i);
			else if (by_label && elSel.options[i].text.indexOf(srch_str)>=0)
				elSel.options[i].text = elSel.options[i].text.replace(srch_str, "");
		}
	}
	/// <summary>Method:_KeyPress</summary>
	function _KeyPress(e) {
		var keycode;
		if (window.event) 
			keycode = window.event.keyCode;
		else if (e) 
			keycode = e.which;
		else 
			return true;
			
		if (keycode == 13) {
			if (this.name == "nm_logon_form")
				nm_frm.Check(this, "login");
			}
		return true 
	}
	
	/// <summary>Method:_Initialise</summary>
	function _Initialise() {
		var n = navigator;
		var na = n.appVersion;
		var nua = n.userAgent;
		_win = ( na.indexOf( 'Win' ) != -1 );
		_mac = ( na.indexOf( 'Mac' ) != -1 );
		_lin = ( nua.indexOf( 'Linux' ) != -1 );
		
		if ( !_doc.layers ){
			_dom = ( _doc.getElementById );
			_op = ( nua.indexOf( 'Opera' ) != -1 );
			_konq = ( nua.indexOf( 'Konqueror' ) != -1 );
			_saf = ( nua.indexOf( 'Safari' ) != -1 );
			_moz = ( nua.indexOf( 'Gecko' ) != -1 && !_saf && !_konq);
			_ie = ( _doc.all && !_op );
			_ie4 = ( _ie && !_dom );
			_ie5x = ( _doc.all && _dom );
			_ie5mac = ( _mac && _ie5x );
			_ie5xwin = ( _win && _ie5x );
		}
		if (_dom) {
			_cntobj = _getEl('mn-cnt');
			_lftobj = _getEl('lft');
			_rhtobj = _getEl('rght');
			_navobj = _getEl('hd-nav');
			_ftrobj = _getEl('ft');
			_homobj = _getEl('hm-hd');
			if (!_lftobj)	// could be no menu
				_lftobj = _getEl('lft-hm');
			_init = true;
		}
	}
	/// <summary>Method:_AttachEvents</summary>
	function _AttachEvents() {
		_Debug("_AttachEvents", "attachEvent:", (_win.attachEvent)? true : false, "addEventListener:",(_win.addEventListener) ? true : false);
		if (_win.attachEvent) {
			_win.attachEvent("onload", _self.Load);
			_win.attachEvent("onresize", _self.Resize);
		} else if (_win.addEventListener) {
			_Debug("_AttachEvents", "addEventListener", (_win.addEventListener)? true : false)
			_win.addEventListener("load",_self.Load, false);
			_win.addEventListener("resize",_self.Resize, false);
		}else if (document.getElementById){
			_win.onload=_self.Load;
			_win.onresize=_self.Resize;
		}
	}
	/// <summary>Method:_Load</summary>
	function _Load() {
		_LoadFlashElements();
		_Debug("Load")
		_Initialise();
		if (_ie5xwin)
			_SetHover();
		_SetFooter();
		if (typeof(nm_quote) != "undefined") {
			nm_quote.CalculateCost("combination1");
			nm_quote.CalculateCost("combination2");
			nm_quote.CalculateCost("combination3");
		}
	}
	/// <summary>Method:_Resize</summary>
	function _Resize() {
		_Debug("_Resize")
		_SetFooter();
	}
	/// <summary>Method:_SetHover</summary>
	function _SetHover() {
		var mnu = _getEl("hd-mnu");
		if (mnu) {
			var sfEls = mnu.getElementsByTagName("li");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover=function() {
					this.className+=" sfhover";
				}
				sfEls[i].onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				}
			}
		}
	}
	/// <summary>Method:_PopOut</summary>
	function _PopOut(dv, aul, rdm) {
		var re = /siteid=\w*/gi;
		var ul = (aul) ? aul.replace(re, "siteid=" + dv) : _self.Href.replace(re, "siteid=" + dv);		
		if (rdm)
			ul = ul.concat("&outid=",(new Date()).getTime()%Math.random());
		var mn = (dv=="ver5_print" || dv=="ver5_data");
		ul = (dv=="ver5_data") ? ul + "&device=data" : ul;
		var wd = (dv=="ver5_print")? 610 : 610;	//?
		_Pop(ul,true,true,wd,400,mn);
	}
	/// <summary>Method:_PopUm</summary>
	function _PopUm(ul, pm) {
		ul = ul + "&" + eval(pm);
		_Pop(ul,true,false,395,296);
	}
	/// <summary>Method:_PopPhone</summary>
	/// was nm_PopPhone
	function _PopPhone() {
		var ul = um_baseurl + "nmpab/default.asp?link=manage_entries&service=Entry&process=GetEntries";
		_PopUm(ul, "ob_es");
	}
	/// <summary>Method:_Pop</summary>
	function _Pop(url, set, scr, wid, hgt, mnu, stt, dlg, tlb, loc) {
		_Debug("_Pop", "dlg", dlg);
		var set;
		if (!dlg) {
			set = _popset(set, scr, wid, hgt, mnu, stt, tlb, loc);
			_pop = window.open(url,_pop_name,set);
		} else {
			if (dlg>0) {
				set = _popsetdlg(set, scr, wid, hgt, mnu, stt);
				_pop = window.showModalDialog(url,_pop_name,set);
			} else {
				set = _popset(set, scr, wid, hgt, mnu, stt);
				_pop = window.dialog(url,_pop_name,set);
			}
		}
		try { _pop.focus(); }
		catch (e) { _pop.focus(); }
	}
	/// <summary>Method:_popsetdlg</summary>
	function _popsetdlg(set, scr, wid, hgt, siz, stt) {
		var ret = "";
		if (set) {
			ret = "center:yes;edge:raised;help:no;status:";
			var st = (stt)? stt : "no";
			var sz = (siz)? "yes" : "no";
			var sc = (scr)? "yes" : "no";
			var wd = (wid)? wid : "463";
			var ht = (hgt)? hgt : "400";
			ret = ret.concat(st,";resizable",sz,";scroll:",sc,";dialogWidth:",wd,"px;dialogHeight:",ht,"px");
		}
		return ret;
	}
	/// <summary>Method:_popset</summary>
	function _popset(set, scr, wid, hgt, mnu, stt, tlb, loc) {
		var ret = "";
		if (set) {
			ret = "status=";
			var tl = (tlb)? "yes" : "no";
			var lc = (loc)? "yes" : "no";
			var mn = (mnu)? "yes" : "no";
			var sc = (scr)? "yes" : "no";
			var wd = (wid)? wid : "463";
			var ht = (hgt)? hgt : "400";
			var st = (stt)? "yes" : "no";
			ret = ret.concat(st,",toolbar=",tl,",location=",lc,",menubar=",mn,",scrollbars=",sc,",width=",wd,",height=",ht, (tlb)? ",resizable" : ",noresize");
		}
		return ret;
	}
	/// <summary>Method:_SetTab</summary>
	function _SetTab(on, off1, off2) {
		_getEl(off1).className="off";
		if (off2)
			_getEl(off2).className="off";
		_getEl(on).className="on";
	}
	/// <summary>Method:_SetGroup</summary>
	function _SetGroup(whch, on, tot) {
		var cl1, cl2;
		for(var i=1; i<=tot; i++) {
			cl1 = (i==on) ? "on" : "off";
			cl2 = (i==1) ? "-lt" : ((i==tot) ? "-rt" : "");
			setClass(_getEl("tab_" + whch + i), "grc-" + cl1 + cl2);
			setClass(_getEl(whch + i), ((i==on) ? "grc-cnt-show" : "grc-cnt-hide"));
		}
		_SetFooter();
		function setClass(cl, nm) {
			if (cl)
				cl.className = nm;
		}
	}
	/// <summary>Method:_Logout</summary>
	function _Logout(logfrm) {
		_Debug("_Logout");
		history.go(-1 * history.length); 
		logfrm.submit();
	}
	/// <summary>Method:_Kill</summary>
	function _Kill(time) {
		_killTO = time;
		var re = /siteid=\w*/gi;
		var n = _self.Href.search(re);
		var id = (n<0)? "ver5" : _self.Href.substr(n);
		var ul = "history.go(-1 * history.length);document.location.href='nm_logout.asp?timeout=yes&";
		ul = ul.concat(id,"'");
		_killTimeOutId = setTimeout(ul, time);
	}
	/// <summary>Method:_Render</summary>
	function _Render(id, vr) {
		_Debug("_Render");
		if (typeof(decodeURI) != "undefined")
			_doc.getElementById(id).innerHTML = decodeURI(vr); 
		else
			_doc.getElementById(id).innerHTML = unescape(vr); 
	}
	/// <summary>Method:_GoUrl</summary>
	function _GoUrl(it) {
		if (it == "top")
			it = "#topofpage";
		if (it != "") 
			document.location.href = it;
	}
	/// <summary>Method:_KeepSession</summary>
	function _KeepSession(imgSrc, id, sec, token, is_run){
		if(_killTimeOutId){
			//reset kill timeout - on every keepsession
			//alert(_killTimeOutId + ' ' + _killTO);
			_Debug("_KeepSession", "_killTimeOutId", _killTimeOutId, "_killTO", _killTO);
			clearTimeout(_killTimeOutId);
			_Kill(_killTO);
		}
		_Debug("_KeepSession");
		sec = (sec) ? sec : 10;
		var timeout = sec * 1000;
		var img = document.getElementById(id);
		if(is_run){
			var imgPath = imgSrc + '?proxy=' + Math.random();
			if(token)
				imgPath = imgPath + "&token=" +token;
			img.src = imgPath;
		}
		var tmOutFuncCall = "nm_pge.KeepSession('" + imgSrc + "', '" + id + "', " + sec;
		tmOutFuncCall = (token) ? tmOutFuncCall + ", '" + token + "', true)" : tmOutFuncCall + ", false, true)";
		setTimeout(tmOutFuncCall, timeout);
	}
	/// <summary>Method:_ReloadPage</summary>
	function _ReloadPage(sec, is_run, url){
		if(_killTimeOutId){
			//reset kill timeout - on every _ReloadPage
			_Debug("_ReloadPage", "_killTimeOutId", _killTimeOutId, "_killTO", _killTO);
			clearTimeout(_killTimeOutId);
			_Kill(_killTO);
		}
		_Debug("_ReloadPage");
		secs = (sec) ? sec : 150;
		var timeout = secs * 1000;
		if(url){
			var tmOutFuncCall = "nm_pge.ReloadPage(" + secs + ", true, '"+url+"')";
			//alert(url.replace(/amp;/gi, ""));
			var href = url.replace(/amp;/gi, "") + '&proxy=' + Math.random();
		}else {
			var tmOutFuncCall = "nm_pge.ReloadPage(" + secs + ", true)";
			var href = window.location.href + '&proxy=' + Math.random();
		}
		if(is_run)
			window.location.href = href;
		if(_reloadTimeOutId)
			clearTimeout(_reloadTimeOutId);
		else
			_reloadTimeOutId = setTimeout(tmOutFuncCall, timeout);
	}
	/// <summary>Method:_FlashDetect</summary>
	function _FlashDetect(){
		_Debug("_FlashDetect ");
		var MM_contentVersion = 6;
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if ( plugin ) {
				var words = navigator.plugins["Shockwave Flash"].description.split(" ");
			    for (var i = 0; i < words.length; ++i){
					if (isNaN(parseInt(words[i])))
						continue;
					var MM_PluginVersion = words[i]; 
			    }
			var MM_FlashCanPlay = (MM_PluginVersion >= MM_contentVersion) ? true : false;
		}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
			try{
				var swfObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + MM_contentVersion);
			}catch(e){
				var swfObj = -1;
			}
			var MM_FlashCanPlay = (typeof(swfObj) == 'object') ? true : false;
		}
		return (MM_FlashCanPlay);
	}
	
	/// <summary>Method:_ChangeSegmentMenu</summary>
	function _ChangeSegmentMenu(segment, menulink) {
		var urlStr = window.location.href;
		//alert(urlStr);
		if(urlStr.indexOf("#")!=-1){
			urlStr = urlStr.substring(0, urlStr.indexOf("#"));//
		}
		if(urlStr.indexOf("&segment=")!=-1){
			urlStr = _removeUrlQStr("segment", urlStr);
		}
		if(urlStr.indexOf("&sid=")!=-1){
			urlStr = _removeUrlQStr("sid", urlStr);
		}
		//alert(urlStr);
		if(urlStr.indexOf("&menulink=")!=-1){
			urlStr = _removeUrlQStr("menulink", urlStr);
		}
		urlStr = urlStr + '&segment=' + segment;
		urlStr = urlStr + '&sid=' + segment;
		urlStr = urlStr + '&menulink=' + menulink;
		window.location.href = urlStr;
	}
	/// <summary>Method:_CheckDrop</summary>
	function _CheckDrop(show, obj) {
		// createEventObject method is not supported by IE5.0 and below
		if(_ie5x){
			var eobj = document.createEventObject();
			var pobj = new Object();
			pobj.show = (show) ? "show" : "hide";
			if (pobj.show == "hide") 
				pobj.bounds = _getBounds(obj.getElementsByTagName("UL")[0]);
		    eobj.expando = pobj;
			var dl = document.getElementsByTagName("SELECT");
			for (var i=0; i<dl.length; i++) {
				var de = dl.item(i);
				de.fireEvent("onmouseover", eobj);
			}
		}
	}
	/// <summary>Method:_DropShowHide</summary>
	function _DropShowHide(el) {
		if(_ie5x){
			if(event.expando) {
				if (event.expando.show == "hide") {
					var sel = _getBounds(el);
					if (sel.x+sel.w>event.expando.bounds.x && sel.x<event.expando.bounds.x+event.expando.bounds.w && sel.y+sel.h>event.expando.bounds.y && sel.y<event.expando.bounds.y+event.expando.bounds.h)
						el.style.visibility  = "hidden";
				} else
					el.style.visibility  = "visible";
			}
		}
	}
	/*	-------------------------------------------	*/
	/// <remarks>Region: Private methods</remarks>
	/*	-------------------------------------------	*/
	/// <summary>Method:_getBounds</summary>
	function _getBounds(el) {
		var obj = new Object();
		obj.x = 0;
		obj.y = 0;
		obj.w = 2048;
		obj.h = 1024;
		if (el.style.visibility == "visible" || el.style.visibility == "") {
			var x = 0, y = 0, o;
			if(el.offsetParent) {
				o = el; 
				while(o.offsetParent) {
					o = o.offsetParent;
					x+=o.offsetLeft;
					y+=o.offsetTop;
				}
			}
			x+=el.offsetLeft;
			y+=el.offsetTop;
			obj.w = el.offsetWidth;
			obj.h = el.offsetHeight;
			obj.x = x;
			obj.y = y;
		}
		return(obj);
	}
	/// <remarks>
	/// Method:_LoadFlashElements
	/// The Method _LoadFlashElements has the following purpose/function:
	///	- To un-comment the flash related object tags after all other elements have loaded and before the page height is defined:thereby loading the flash elements last
	/// </remarks>
	/*	-----------------------------------------------------------------------	*/
	/// <summary>Method:_removeUrlQStr
	function _removeUrlQStr(srch, initStr){
		var urlStr = initStr;
		var sffx = urlStr.substring(urlStr.indexOf("&" + srch + "=") + 1, urlStr.length);
		var lstAmp = (sffx.indexOf("&")!=-1) ? sffx.indexOf("&") : sffx.length;
		var sffxPos = urlStr.indexOf("&" + srch + "=") + 1 + lstAmp;
		urlStr = urlStr.substring(0, urlStr.indexOf("&" + srch + "=")) + urlStr.substring(sffxPos, urlStr.length);
		return(urlStr);
	}
	/// <summary>Method:_LoadFlashElements - 1.retrieve the contents of the <div class="ad-box-left-flash"> and <div class="ad-sec-cnt-flash"> 2.remove the strings "<!--nmf" and nmf--> 3.write the contents into the tag</summary>
	function _LoadFlashElements(){
		var flashElements = _getElementsByClassName('ad-box-left-flash', 'div', document);
		flashElements=flashElements.concat(_getElementsByClassName('ads-spc', 'div', document));
		flashElements = flashElements.concat(_getElementsByClassName('swf_obj', 'div', document));
		for(var i=0; i< flashElements.length;i++){
			var flashStr = flashElements[i].innerHTML.replace('<!--nmf',' ');
			flashStr = flashStr.replace('nmf-->',' ');
			flashElements[i].innerHTML=flashStr;
			//_Debug("LoadFlashElements:","flashStr", flashStr);
		}
		if(!_FlashDetect()){
			_showHideAll('flash_obj', 'swf-obj-plugin');// set to block
			_showHideAll('flash_obj', 'swf-obj-plugin');//set to none
			_showHideAll('noflash_obj', 'swf-obj-plugin');//set to block
			_SetFooter();
		}
	}
	/// <summary>Method:_getEl</summary>
	function _getEl(el) {
		return(document.getElementById(el)? document.getElementById(el) : false);
	}
	/// <summary>Method:_RaiseError</summary>
	function _RaiseError(thiserr) {
		_Debug("RaiseError:", "thiserr", thiserr);
		throw (thiserr);
	}
	/// <summary>Method:_Debug - write debugging message. First param is the method label, followed by name, value pairs</summary>
	function _Debug(arg) {
		if (_debug) {
			s = "<!-- ClassNM_Page::"
			s = s.concat(arguments[0], ":");
			var argn = arguments.length;
			for(var i=1; i<argn; i=i+2)
				s = s.concat(arguments[i], ":", arguments[i+1], " ");
			alert(s.concat("-->\n"));
		}
	}
	/// <summary>Method:_SetFooter</summary>
	function _SetFooter() {
		if (_init) {
			var cntHt = (_cntobj)? _cntobj.offsetHeight : 0;
			var rhtHt = (_rhtobj)? _rhtobj.offsetHeight : 0;
			var homHt = (_homobj)? _homobj.offsetHeight : 0;
			rhtHt += 50;
			var lftHt = (_lftobj)? _lftobj.offsetHeight : 0;
			var navHt = (_navobj)? _navobj.offsetTop + _navobj.offsetHeight : 100;
			if (homHt > 0) lftHt -= 219; 
			if (_ftrobj) {
				_ftrobj.style.display = "none";
				_ftrobj.style.position = "absolute";
				var hgt = Math.max(cntHt, lftHt, rhtHt);
				//_Debug("_SetFooter", "cntHt", cntHt, "lftHt", lftHt, "rhtHt", rhtHt);
				//if (lftHt < cntHt) // 2005 10 10 : sets the height of lh col. and never resets it back : taken out for intranet - cs script resizing
					//_lftobj.style.height = cntHt;
				//_Debug("_SetFooter", "navHt", navHt, "hgt", hgt, "homHt", homHt);
				_ftrobj.style.top = (50 + navHt + hgt + homHt) + "px";
				_ftrobj.style.left = 0;
				_ftrobj.style.display = "block";
				var brsHt = _getHeight();
				var ftrBt = parseInt(_ftrobj.style.top) + _ftrobj.clientHeight;
				if (ftrBt < brsHt)  {
					// note - 34 = padding 30 + border 3 + (1?)
					// how does one retrieve border + padding dynamically?
					var newHt = ((brsHt - ftrBt) + _ftrobj.clientHeight - 34) + "px";
					_ftrobj.style.height = newHt;
				}
			}
		}
	}
	/// <summary>Method:_getHeight</summary>
	function _getHeight() {
		var hgt = 0;
		if (typeof(_win.innerHeight) == 'number') {
			hgt = _win.innerHeight;
		} else {
			if (_doc.documentElement && _doc.documentElement.clientHeight) {
				hgt = _doc.documentElement.clientHeight;
			} else {
				if (_doc.body && _doc.body.clientHeight) {
					hgt = _doc.body.clientHeight;
				}
			}
		}
		return hgt;
	}
	/// <summary>Method:_Clickstream</summary>
	function _Clickstream(url) {
		var clkurl = "<img width='1' height='1' src='";
		clkurl = clkurl.concat(url, ",", Math.random(), ",", _self.Host);
		for(var i=1; i<arguments.length; i++)
			clkurl = clkurl.concat(",", arguments[i]);
		clkurl = clkurl.concat(",", _self.Dref, "'/>");
		var clkobj = _getEl('clickstream');
		if (clkobj)
			clkobj.innerHTML = clkurl;
	}
	/// <summary>Method:_ClickstreamVer2</summary>
	
	/* ********************************************************************* */
	/* ******************* MODIFIED CODE FOR INTERVIGIL ******************** */
	/* ********************************************************************* */		
	
	function _ClickstreamVer2(req) {	
		req += "&ck=" + escape(navigator.cookieEnabled ? "1": "0");
		req += "&lg=" + escape(navigator.appName=="Netscape" ? navigator.language : navigator.userLanguage);
		req += "&jv=" + escape(navigator.javaEnabled()?"1":"0");
		//req += "&rnd=" + escape((new Date()).getTime()%Math.random());
		if(typeof(screen)=="object") {
			req += "&sw=" + escape(screen.width);
			req += "&sh=" + escape(screen.height);
			req += "&bpp=" + escape(screen.colorDepth);		
		} else {
			req += "&sw=0";
			req += "&sh=0";
			req += "&bpp=0";
		}
		
		av = "0";
		fv = "0";
		
		getFlash();	
		req += "&fv=" + escape(fv);			
		getAdobe();
		req += "&av=" + escape(av);	
		
		if( req.length>2048 && navigator.userAgent.indexOf('MSIE')>=0)
			req = req.substring( 0, 2044);
		document.write('<IMG BORDER="0" WIDTH="1" HEIGHT="1" STYLE="display:none;" SRC="' + req + '" />');		
	}
	
	/* ********************************************************************* */
	/* ******************* MODIFIED CODE FOR INTERVIGIL ******************** */
	/* ********************************************************************* */		
	
	/// <summary>Method:_OpenClose</summary>
	function _OpenClose(classname, idname){
		var OnClass = _getElementsByClassName("ph-feat-cnt-on");
		var OnClassLen = OnClass.length-1;
		var OpenEl = _getElementsByClassName("ph-feat-cnt-off");
		var OpenElLen = OpenEl.length-1;
		var links = _getElementsByClassName("feat-hd-note-link");
		var lnklen = links.length-1;
		
		for (var i=0; i<=lnklen; i++) {
				var a = links[i].innerText;
				var s = links[i].outerHTML.indexOf(idname);
				links[i].innerText = (s > -1 &&  a == "Show")? "Hide" : "Show";
		}
		for (var i=0; i<=OnClassLen; i++) {
			OnClass[i].className = "ph-feat-cnt-off";
		}
		for (var i=0; i<= OpenElLen; i++) {
			if (idname == OpenEl[i].id)
				OpenEl[i].className="ph-feat-cnt-on";
		}
		_SetFooter();	
	}
	/// <summary>Method: _ToggleDisplay</summary>
	function _ToggleDisplay(id){
		_showHide(_getEl(id));
		_SetFooter();
	}
	/// <summary>Method: _ToggleDisplay</summary>
	function _ToggleOne(id, cls, typ){
		_showOne(id, cls, typ);
		_SetFooter();
	}
	/// <summary>Method: _showHide</summary>
	function _showHide(el) {
		var stl = el.style;
		if (stl.display=='none' || !(stl.display))
			stl.display = 'block';
		else
			stl.display = 'none';
	}
	/// <summary>Method: _showOne</summary>
	function _showOne(id, cl, typ){
		var els = _getElementsByClassName(cl, (typ)? typ : "div");
		for(var i=0, len = els.length; i<len; i++) {
			if (els[i].id == id)
				_showHide(els[i]);
			else
				els[i].style.display = 'none';
		}
	}
	/// <summary>Method: _showHideAll</summary>
	function _showHideAll(id, cl){
		var els = _getElementsByClassName(cl, "div");
		for(var i=0, len = els.length; i<len; i++) {
			if(els[i].id == id)
				_showHide(els[i]);
		}
	}
	/// <summary>Method:_getElementsByClassName</summary>
	function _getElementsByClassName(ClassName, tagName, parentElement){
		var elements = new Array();
		var d = parentElement ? parentElement : document;
		var allElements;
		if (tagName)
			allElements = d.all && d.all.tags(tagName) || d.getElementsByTagName && d.getElementsByTagName(tagName);
		else
			allElements = d.all || d.getElementsByTagName("*");
		
		for(var i=0, len = allElements.length; i<len; i++) {
			if(allElements[i].className == ClassName)
				elements[elements.length] = allElements[i];
		}
		return elements;
	}
	/// <summary>Method:_ShowFAQ</summary>
	function _ShowFAQ(qid, aid, tid) {
		var anss = _doc.getElementsByTagName("tr");
		_Debug("_ShowFAQ", "_cntobj.offsetHeight", _cntobj.offsetHeight);
		for (var i=0; i<anss.length; i++) {
			var ans = anss.item(i);
			var pre = ans.id.substr(0,3);
			//_Debug("_ShowFAQ1", "_cntobj.offsetHeight", _cntobj.offsetHeight);
			if (pre == "ans"){
				ans.style.display = "none";
			}else if (pre == "que"){
				ans.style.display = "block";}
		}
		
		var fqq = _getEl(qid);
		var fqa = _getEl(aid);
		var fqt = _getEl(tid);
		if (fqq && fqa && fqt) {
			fqq.style.display = "none";
			fqa.style.display = "block";
			fqt.style.display = "block";
		}
		_Debug("_ShowFAQ2", "_cntobj.offsetHeight", _cntobj.offsetHeight);
		_SetFooter();
	}
	/// <summary>Method:_HideFAQ</summary>
	function _HideFAQ(qid, aid, tid) {
		var fqq = _getEl(qid);
		var fqa = _getEl(aid);
		var fqt = _getEl(tid);
		if (fqq && fqa && fqt) {
			fqq.style.display = "block";
			fqa.style.display = "none";
			fqt.style.display = "none";
		}
		_SetFooter();
	}
	/// <summary>Method:_GetPDF</summary>
	function _GetPDF(gen, fm) {
		var valid = false;
		var act = (gen)? "nm_html2pdf.asp" : "nm_portal.asp"
		var dev = (gen)? "&device=pdfout" : "&device=pdf"	// needs to be &device=pdfout for gen = true
		act = act.concat(_self.Srch, dev);
		if (gen) {
			act = act.replace("&device=pdf", "");
			// processes options to querystring - needs to be generalised
			var elm,frm = _getFormByName(fm);
		    for (var i=0; i<frm.length; i++) {
				elm = frm.elements[i];
				if (elm.type == "checkbox") {
					act = act.concat("&", elm.name, "=", (elm.checked)? "yes" : "no");
					if (elm.checked)
						valid = true;
				}
			}
			frm.action = act;
			if (valid)
				document.location.href = act;	// frm.submit(); - but does not work??
			else
				alert("Please check at least one option");
		} else 
			document.location.href = act;
	}
	/// <summary>Method: _getFormByName - dupl from nm_ver5_from
	function _getFormByName(nm) {
		var frm = _getEl(nm);
		if (!frm)
			frm = document.forms[nm];
		return frm;
	}
	/// <summary>Method:_SetPDFRegion</summary>
	function _SetPDFRegion(chk) {
		var rgn = _getEl(chk.name.concat("-rgn"));
		if (rgn)
			rgn.style.display = (chk.checked)? "block" : "none";
	}
	
	/// <summary>Method:_option</summary>
	function _option(val, txt) {
		var opt = document.createElement("option");
		opt.value = val;
		opt.text = txt;
		return opt;
	}
	
	function _ShowDialog(pth, args, wd, ht, fd) {
		var ret = showModalDialog(pth, args, "dialogWidth:" + wd + "px;dialogHeight:" + ht + "px;help:no;scroll:no;status:no");
		//alert("showModalDialog.ret:"+ret);
		var fld = _getEl(fd);
		//fld.value = fld.value.concat((fld.value == "")? "":"|", (ret)? ret:"");
		fld.value = (ret)? ret: "nothing";
	}
	
	/* ********************************************************************* */
	/* ********************** NEW CODE FOR INTERVIGIL ********************** */
	/* ********************************************************************* */
			
		function _LinkClick(e)	{
			var ev,q,oEVT,txt,type;
					
			ev = e || window.event;
			if(ev){
				oEVT = getTagObject(ev,"A");
				
				if(oEVT.tagName != "A")
					oEVT = getTagObject(ev,"AREA");
					
				if(oEVT && (oEVT.tagName == "A" || oEVT.tagName == "AREA")){
					if((oEVT.hostname && oEVT.protocol && oEVT.href)){
						txt= ( (oEVT.tagName=="A") ?(oEVT.text||encodeURIComponent(oEVT.innerHTML)||oEVT.innerText||"") : encodeURIComponent(oEVT.outerHTML));	
						
						//if (page_name == "") { //Session Variables not included on this script.
							var page_name = location.pathname + location.search;
						//}
						
						//if(page_title == "") { //Session Variables not included on this script.
							var page_title = document.title;
						//}
						
						q = 'site='+escape(nm_ClickStream_SiteID)+'&lref='+escape(oEVT.href)+'&pth='+escape(page_name)+'&ptitle='+escape(page_title)+'&lnk='+txt+'&lId='+escape(oEVT.id)+'&ord=';
						doImage(q);
					}
				}		
			}
		}

	function getTagObject(oEVT,t){
		var o=oEVT.target||oEVT.srcElement;
		
		while (o.tagName&&(o.tagName!=t))
			o=o.parentElement||o.parentNode;
		return o;
	}

	function doImage(qs){			
		var iSrc = thisurl + 'linkreceive.aspx?' + qs;
				
		if (document.images){
			imgs[imdex]=new Image();
			imgs[imdex].src= iSrc;
			imdex++;
		}
		else{
			document.write('<IMG BORDER="0" WIDTH="1" HEIGHT="1" SRC="' + thisurl + 'linkreceive.aspx?' + qs + '" >');
		}
	}

	function evtHDL(event,fn){	 					
		if ((typeof(eval(fn))=="function")){ // window[fn] was replaced with eval(fn)
			if (document.body.addEventListener){
				document.body.addEventListener(event,eval(fn),true); // window[fn] was replaced with eval(fn)
			}
			else if(document.body.attachEvent){
				document.body.attachEvent("on"+event,eval(fn)); // window[fn] was replaced with eval(fn)
			}
		}
	}	

	function _TrackLinks() {			
		evtHDL("click","_LinkClick");
	}			
		
		
	function getAdobe()
	{
		if (window.ActiveXObject){
			
			try{var obj = eval(new ActiveXObject("AcroPDF.PDF.1"))
				if(obj){av="7.00";return;}
			}catch(e){}
			
			try{var obj = eval(new ActiveXObject("PDF.PdfCtrl.1"))
				if(obj){av="4.00";return;}
			}catch(e){}
			
			for(var k=2;k<10;k++){
				try{var obj = new ActiveXObject("PDF.PdfCtrl."+k);av=k+".00";//Other!{4,7}
					break;
				}catch(e){}
			}
		}
		else if (navigator.plugins&&navigator.plugins.length){
			for (var k=0;k<navigator.plugins.length;k++){
				if (navigator.plugins[k].name.indexOf('Adobe Acrobat')!=-1){
					try{av=navigator.plugins[k].description.split('Version ')[1].split(' ')[0];
						av=av==''?'No version':av;}catch(e){av='No version'}
					break;
				}
			}
		}
	}
		

	function getFlash()
	{
		if (window.ActiveXObject){
			for(var k=12;k>0;k--){
				try{var obj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+k);fv=k+".0";
					break;
				}catch(e){}
			}
		}
		else if (navigator.plugins&&navigator.plugins.length){
			for (var k=0;k<navigator.plugins.length;k++){
				if (navigator.plugins[k].name.indexOf('Shockwave Flash')!=-1){
					try{fv=navigator.plugins[k].description.split(' ')[2];
						fv=fv==''?'No version':fv;}catch(e){fv='No version'}
					break;
				}
			}
		}
	}
		
	/* ********************************************************************* */
	/* ********************** NEW CODE FOR INTERVIGIL ********************** */
	/* ********************************************************************* */
	
}
/*	=======================================================================	*/
/// <remarks>
/// Class: ClassNM_Data
/// The ClassNM_Data object class has the following purpose/function:
///	- The Data class contains the properties and methods for handling of the 
///		data pages (ie phones, contracts, specials)
/// </remarks>
/*	-----------------------------------------------------------------------	*/
/// <summary>
/// The ClassNM_Data object class is constructed as follows:
///		var thisobj = new ClassNM_Data(dbg);
/// - where:
///		- dbg:	debugging switch
/// </summary>
function ClassNM_Data(dbg) {
	/*	-------------------------------------------	*/
	/// <remarks>Properties: Public</remarks>
	/*	-------------------------------------------	*/
	this.parameter = "";
	/*	-------------------------------------------	*/
	/// <remarks>Properties: Private</remarks>
	/*	-------------------------------------------	*/
	var _self = this;	// self allows for a method/property to be called internally
	var _debug = (dbg)? dbg : false;
	var _id = "ClassNM_Data";
	/*	-------------------------------------------	*/
	/// <remarks>Region: Accessor methods</remarks>
	/*	-------------------------------------------	*/
	this.GetID = function() { return(_id); }
	/*	-------------------------------------------	*/
	/// <remarks>Region: Public methods</remarks>
	/*	-------------------------------------------	*/
	this.Sort = _Sort;
	/// <summary>Method:_Sort</summary>
	function _Sort(st, fm) {
		fm.Sort_Col.value = st;
		fm.submit();
	}
	/*	-------------------------------------------	*/
	/// <remarks>Region: Private methods</remarks>
	/*	-------------------------------------------	*/
	/// <summary>Method:_RaiseError</summary>
	function _RaiseError(thiserr) {
		_Debug("RaiseError:", "thiserr", thiserr);
		throw (thiserr);
	}
	/// <summary>Method:_Debug - write debugging message. First param is the method label, followed by name, value pairs</summary>
	function _Debug(arg) {
		if (_debug) {
			s = "<!-- ClassNM_Data::"
			s = s.concat(arguments[0], ":");
			var argn = arguments.length;
			for(var i=1; i<argn; i=i+2)
				s = s.concat(arguments[i], ":", arguments[i+1], " ");
			alert(s.concat("-->\n"));
		}
	}
	
}





