function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	//alert('document.cookie ' + document.cookie);
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	//alert('document.cookie ' + document.cookie);
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}


function readCookieStr(name, str) {
	var nameEQ = name + "=";
	var ca = str.split('&');
	//alert('document.cookie ' + document.cookie);
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function isBrowserClosed(){
	var browserWindowWidth = 0;
	var browserWindowHeight = 0;

	// gets the width and height of the browser window

	if (parseInt(navigator.appVersion) > 3)	{

		if (navigator.appName == "Netscape"){
			browserWindowWidth = window.innerWidth;
			browserWindowHeight = window.innerHeight;

		}

		if (navigator.appName.indexOf("Microsoft") !=- 1){
			browserWindowWidth = top.window.document.body.offsetWidth;
			browserWindowHeight = top.window.document.body.offsetHeight;

		}

	}
	//var evt = window.event; 
	//alert("Event:"+evt);
	// checks if the X button was closed
	// if event.clientY < 0, then click was on the browser menu area
	// if event.screenX > (browserWindowWidth - 25), the X button was clicked
	// use screenX if working with multiple frames
	return (event.clientY < 0 && event.screenX > (browserWindowWidth - 25)) ? true : false;
	//return (evt.clientY < 0 && evt.screenX > (browserWindowWidth - 25)) ? true : false;
}


var boolFireZoomerangSurvey = true;
function CallZoomerangSurvey()
{
	var boolBrowserClosed = false;
	var boolLatestVersion = false;
	
	var versionNumber = 0;


	if (strVisitorType == "Agent")
		return;

	boolBrowserClosed = isBrowserClosed();
	//if (BrowserDetectforgetkeycode.browser == "Explorer")
	//{
	//	versionNumber = parseInt(BrowserDetectforgetkeycode.version);

	//	if (!isNaN(versionNumber))
	//	{
	//		if(versionNumber > 6)
	//			boolLatestVersion = true;
	//	}
		
	//	if(boolLatestVersion)
	//	{
	//		if (event.clientY < -65)
	//			boolBrowserClosed = true;
	//	}
	//	else
	//	{
	//		if (event.clientX < 0 && event.clientY < 0)
	//			boolBrowserClosed = true;
	//	}
	//}
	//else
	//{
	//	if (event.clientX < 0 && event.clientY < 0)
	//		boolBrowserClosed = true;
	//}
	if(boolBrowserClosed){
		//alert("Browser closed");
	}

	if(boolFireZoomerangSurvey)
	{
		if (boolBrowserClosed)
		{
			if(readCookie('zoomerangsurvey') == null || readCookie('zoomerangsurvey') != '1') 
			{

window.open('http://www.zoomerang.com/Survey/?p=WEB228JXGHARNL','surveywindow','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=630,left=0,top=0');


				createCookie('zoomerangsurvey','1',1000);	//? expire in 1000 days

			}
		}
		else
		{
			//alert("Active element:"+window.document.activeElement);
			//alert("Href:"+window.document.activeElement.href);
			if(window.document.activeElement.href)
			{
				//alert("Active href");
				var strClickedLinkTarget = String(window.document.activeElement.href);
				
				strClickedLinkTarget = strClickedLinkTarget.toLowerCase();
				
				if(strClickedLinkTarget.indexOf('http://') == 0 || strClickedLinkTarget.indexOf('https://') == 0)
				{
					if(strClickedLinkTarget.indexOf('compbenefitsdirect.com') <= 0)
					{
						if(readCookie('zoomerangsurvey') == null || readCookie('zoomerangsurvey') != '1')
						{
window.open('http://www.zoomerang.com/Survey/?p=WEB228JXGHARNL','surveywindow','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=630,left=0,top=0');	
							createCookie('zoomerangsurvey','1',1000);	//? expire 1000 days
						}
					}
				}
			}
		}
	}
}
window.onunload = CallZoomerangSurvey;

//************************function for browser detection ***********
var BrowserDetectforgetkeycode = {
	init: function () {

		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetectforgetkeycode.init();










function standardCM(strThispage)
{
	var	strpageID = '';
	var	strcatID = '';
	var	strThispage;


	searchAgent();
 
	if(strThispage.indexOf('/aboutus/aboutus-overview.aspx') >= 0){
		strpageID = strVisitorType + ': About Us';
		strcatID = '50';
	}
	else if(strThispage.indexOf('/aboutus/aboutus-corevalues.aspx') >= 0){
		strpageID = strVisitorType + ': About Us: Values';
		strcatID = '50';
	}
	else if(strThispage.indexOf('/aboutus/aboutus-ceomessage.aspx') >= 0){
		strpageID = strVisitorType + ': About Us: CEO Message';
		strcatID = '50';
	}
	else if (strThispage.indexOf('/aboutus/aboutus-boardofdirectors.aspx') >= 0){
		strpageID = strVisitorType + ': About Us: Board of Directors';
		strcatID = '50';	
	}
	else if (strThispage.indexOf('/aboutus/aboutus-leadershipteam.aspx') >= 0){
		strpageID = strVisitorType + ': About Us: Leadership Team';
		strcatID = '50';	
	}
	else if (strThispage.indexOf('/aboutus/aboutus-faq.aspx') >= 0){
		strpageID = strVisitorType + ': About Us: FAQ';
		strcatID = '50';	
	}
	else if (strThispage.indexOf('/aboutus/aboutus-history.aspx') >= 0){
		strpageID = strVisitorType + ': About Us: History';
		strcatID = '50';	
	}

	else if (strThispage.indexOf('/footer/footer-HIPAA.aspx') >= 0){
		strpageID = strVisitorType + ': HIPAA';
		strcatID = '100';	
	}
	else if (strThispage.indexOf('/footer/footer-privacystatement.aspx') >= 0){
		strpageID = strVisitorType + ': Privacy Statement';
		strcatID = '100';	
	}
	else if (strThispage.indexOf('/footer/footer-terms.aspx') >= 0){
		strpageID = strVisitorType + ': Terms of Use';
		strcatID = '100';	
	}
	else if (strThispage.indexOf('/Error.aspx') >= 0){
		strpageID = strVisitorType + ': Page Not Found';
		strcatID = '100';	
	}

	else if (strThispage.indexOf('/procedures/sitemap.aspx') >= 0){
		strpageID = strVisitorType + ': Dental and Vision Info';
		strcatID = '150';	
	}
	else if (strThispage.indexOf('/Articles/dentalantibiotics.aspx') >= 0){
		strpageID = strVisitorType + ': Antibiotics';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalcalcium.aspx') >= 0){
		strpageID = strVisitorType + ': Calcium';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalcommondentalemergencies.aspx') >= 0){
		strpageID = strVisitorType + ': Dental Emergencies';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalcosmeticdentistry.aspx') >= 0){
		strpageID = strVisitorType + ': Cosmetic Dentistry';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalcrownsandbridges.aspx') >= 0){
		strpageID = strVisitorType + ': Crowns and Bridges';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentaldeepcleaning.aspx') >= 0){
		strpageID = strVisitorType + ': Deep Cleaning';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentaldentists.aspx') >= 0){
		strpageID = strVisitorType + ': Dentists';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalimplantsanddentures.aspx') >= 0){
		strpageID = strVisitorType + ': Implants and Dentures';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentaloralcancer.aspx') >= 0){
		strpageID = strVisitorType + ': Oral Cancer';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentaloralhealth.aspx') >= 0){
		strpageID = strVisitorType + ': Oral Health';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalorthodontics.aspx') >= 0){
		strpageID = strVisitorType + ': Orthodontics';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalpreventivedentistry.aspx') >= 0){
		strpageID = strVisitorType + ': Preventive Dentistry';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentalsealants.aspx') >= 0){
		strpageID = strVisitorType + ': Sealants';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentaltoothbrushes.aspx') >= 0){
		strpageID = strVisitorType + ': ToothBrushes';
		strcatID = '200';	
	}
	else if (strThispage.indexOf('/Articles/dentaltoothdecay.aspx') >= 0){
		strpageID = strVisitorType + ': Tooth Decay';
		strcatID = '200';	
	}

	else if (strThispage.indexOf('/Articles/visionandnutrition.aspx') >= 0){
		strpageID = strVisitorType + ': Vision and Nutrition';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visioncataract.aspx') >= 0){
		strpageID = strVisitorType + ': Cataract';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visioncolorvisiondeficiency.aspx') >= 0){
		strpageID = strVisitorType + ': Color Vision Deficiency';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visioncomputersandvision.aspx') >= 0){
		strpageID = strVisitorType + ': Computers and Vision';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visionconjunctivitis.aspx') >= 0){
		strpageID = strVisitorType + ': Conjunctivitis';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visioncontactlenses.aspx') >= 0){
		strpageID = strVisitorType + ': Contact Lenses';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visiondoctorsofoptometry.aspx') >= 0){
		strpageID = strVisitorType + ': Doctors of Optometry';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visiondryeye.aspx') >= 0){
		strpageID = strVisitorType + ': Dry Eye';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visioneyeglasses.aspx') >= 0){
		strpageID = strVisitorType + ': Eyeglasses';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visionfarsightedness.aspx') >= 0){
		strpageID = strVisitorType + ': Farsightedness';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visionglaucoma.aspx') >= 0){
		strpageID = strVisitorType + ': Glaucoma';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visioninchildren.aspx') >= 0){
		strpageID = strVisitorType + ': Vision and Children';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visionlasik.aspx') >= 0){
		strpageID = strVisitorType + ': Lasik';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visionmaculardegeneration.aspx') >= 0){
		strpageID = strVisitorType + ': Macular Degeneration';
		strcatID = '225';	
	}
	else if (strThispage.indexOf('/Articles/visionnearsightedness.aspx') >= 0){
		strpageID = strVisitorType + ': Nearsightedness';
		strcatID = '225';	
	}

	else if (strThispage.indexOf('/procedures/search-procedures.aspx') >= 0){
		strpageID = strVisitorType + ': Search Procedures';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5650.aspx') >= 0){
		strpageID = strVisitorType + ': Add Tooth to Existing Partial Denture';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5411.aspx') >= 0){
		strpageID = strVisitorType + ': Adjust Complete Denture Mandibular';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5410.aspx') >= 0){
		strpageID = strVisitorType + ': Adjust Complete Denture Maxillary';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5422.aspx') >= 0){
		strpageID = strVisitorType + ': Adjust Partial Denture Mandibular';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5421.aspx') >= 0){
		strpageID = strVisitorType + ': Adjust Partial Denture Maxillary';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7320.aspx') >= 0){
		strpageID = strVisitorType + ': Alveolopasty not in Conjunction with Extractions';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7310.aspx') >= 0){
		strpageID = strVisitorType + ': Alveolopasty in Conjunction with Extractions';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/RESTORATIVE/2161.aspx') >= 0){
		strpageID = strVisitorType + ': Amalgam Four or More Surfaces';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/RESTORATIVE/2140.aspx') >= 0){
		strpageID = strVisitorType + ': Amalgam One Surface';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/RESTORATIVE/2160.aspx') >= 0){
		strpageID = strVisitorType + ': Amalgam Three Surfaces';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/RESTORATIVE/2150.aspx') >= 0){
		strpageID = strVisitorType + ': Amalgam Two Surfaces';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SERVICES/9230.aspx') >= 0){
		strpageID = strVisitorType + ': Anaglesia Anxiolysis ';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/ENDODONTICS/3310.aspx') >= 0){
		strpageID = strVisitorType + ': Anterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/ENDODONTICS/3410.aspx') >= 0){
		strpageID = strVisitorType + ': Apicoectomy';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/ENDODONTICS/3320.aspx') >= 0){
		strpageID = strVisitorType + ': Bicuspid';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/270.aspx') >= 0){
		strpageID = strVisitorType + ': Bitewing Single Film';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/274.aspx') >= 0){
		strpageID = strVisitorType + ': Bitewing Four Films';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/272.aspx') >= 0){
		strpageID = strVisitorType + ': Bitewing Two Films';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SERVICES/9450.aspx') >= 0){
		strpageID = strVisitorType + ': Case Presentation';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2952.aspx') >= 0){
		strpageID = strVisitorType + ': Cast Post and Core in Addition to Crown';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/150.aspx') >= 0){
		strpageID = strVisitorType + ': Comprehensive Oral Evaluation';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/180.aspx') >= 0){
		strpageID = strVisitorType + ': Comprehensive Periodontal Evaluation';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5120.aspx') >= 0){
		strpageID = strVisitorType + ': Complete Denture Mandibular';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5110.aspx') >= 0){
		strpageID = strVisitorType + ': Complete Denture Maxillary';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/APPOINTMENTS/9310.aspx') >= 0){
		strpageID = strVisitorType + ': Consultation';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2950.aspx') >= 0){
		strpageID = strVisitorType + ': Core Buildup';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2790.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Full Cast High Noble Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6790.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Full Cast High Noble Metal FIXED';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2792.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Full Cast Noble Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6792.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Full Cast Noble Metal FIXED';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2791.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Full Cast Base Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6791.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Full Cast Base Metal FIXED';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2751.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Porcelain Fused Base Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6751.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Porcelain Fused Base Metal FIXED';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2750.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Porcelain Fused High Noble Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6750.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Porcelain Fused High Noble Metal FIXED';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2752.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Porcelain Fused Noble Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6752.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Porcelain Fused Noble Metal FIXED';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2740.aspx') >= 0){
		strpageID = strVisitorType + ': Crown Porcelain Ceramic Substrate';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/470.aspx') >= 0){
		strpageID = strVisitorType + ': Diagnostic Casts';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/160.aspx') >= 0){
		strpageID = strVisitorType + ': Detailed and Extensive Oral Eval';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2953.aspx') >= 0){
		strpageID = strVisitorType + ': Additional Cast Post Same Tooth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7111.aspx') >= 0){
		strpageID = strVisitorType + ': Extraction Coronal Remnants';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7140.aspx') >= 0){
		strpageID = strVisitorType + ': Extraction Erupted Tooth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/4355.aspx') >= 0){
		strpageID = strVisitorType + ': Full Mouth Debridement';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/4211.aspx') >= 0){
		strpageID = strVisitorType + ': Gingivectomy One to Three Teeth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/4210.aspx') >= 0){
		strpageID = strVisitorType + ': Gingivectomy Four or More Teeth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5140.aspx') >= 0){
		strpageID = strVisitorType + ': Immediate Denture Mandibular';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5130.aspx') >= 0){
		strpageID = strVisitorType + ': Immediate Denture Maxillary';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7510.aspx') >= 0){
		strpageID = strVisitorType + ': Incision and Drainage Abscess';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2510.aspx') >= 0){
		strpageID = strVisitorType + ': Inlay Metallic One Surface';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2530.aspx') >= 0){
		strpageID = strVisitorType + ': Inlay Metallic Three or More Surfaces';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2520.aspx') >= 0){
		strpageID = strVisitorType + ': Inlay Metallic Two Surfaces';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/210.aspx') >= 0){
		strpageID = strVisitorType + ': Intraoral Complete';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/230.aspx') >= 0){
		strpageID = strVisitorType + ': Itraoral Periapical Additional Film';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/220.aspx') >= 0){
		strpageID = strVisitorType + ': Itraoral Periapical First Film';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2962.aspx') >= 0){
		strpageID = strVisitorType + ': Labial Vaneer';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/140.aspx') >= 0){
		strpageID = strVisitorType + ': Limited Oral Evaluation';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/4381.aspx') >= 0){
		strpageID = strVisitorType + ': Loc Del Antimicrobl';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SERVICES/9215.aspx') >= 0){
		strpageID = strVisitorType + ': Local Anesthesia';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5214.aspx') >= 0){
		strpageID = strVisitorType + ': Mandibular Partial Denture Cast Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5212.aspx') >= 0){
		strpageID = strVisitorType + ': Mandibular Partial Denture Resin Base';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5213.aspx') >= 0){
		strpageID = strVisitorType + ': Maxillary Partial Denture Cast Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/PROSTHODONTICS/5211.aspx') >= 0){
		strpageID = strVisitorType + ': Maxillary Partial Denture Resin Base';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/ENDODONTICS/3330.aspx') >= 0){
		strpageID = strVisitorType + ': Molar Restoration';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SERVICES/9952.aspx') >= 0){
		strpageID = strVisitorType + ': Occlusal Adjustment Complete';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SERVICES/9951.aspx') >= 0){
		strpageID = strVisitorType + ': Occlusal Adjustment Limited';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/APPOINTMENTS/9430.aspx') >= 0){
		strpageID = strVisitorType + ': Office Visit Observation';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/APPOINTMENTS/9440.aspx') >= 0){
		strpageID = strVisitorType + ': Office Visit After Hours';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1330.aspx') >= 0){
		strpageID = strVisitorType + ': Oral Hygiene Instructions';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/330.aspx') >= 0){
		strpageID = strVisitorType + ': Panoramic Film';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/120.aspx') >= 0){
		strpageID = strVisitorType + ': Periodic Oral Examination';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/4910.aspx') >= 0){
		strpageID = strVisitorType + ': Periodontal Maintenance';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2951.aspx') >= 0){
		strpageID = strVisitorType + ': Pin Retention';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6210.aspx') >= 0){
		strpageID = strVisitorType + ': Pontic Cast High Noble Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6212.aspx') >= 0){
		strpageID = strVisitorType + ': Pontic Cast Nobel Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6211.aspx') >= 0){
		strpageID = strVisitorType + ': Pontic Cast Base Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6240.aspx') >= 0){
		strpageID = strVisitorType + ': Pontic Cast Porcelain Fused to High Noble Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6242.aspx') >= 0){
		strpageID = strVisitorType + ': Pontic Cast Porcelain Fused to Noble Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6241.aspx') >= 0){
		strpageID = strVisitorType + ': Pontic Cast Porcelain Fused to Base Metal';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/4342.aspx') >= 0){
		strpageID = strVisitorType + ': Periodontal Scaling and Root Planning One to Three Teeth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/4341.aspx') >= 0){
		strpageID = strVisitorType + ': Periodontal Scaling and Root Planning Four or More Teeth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2930.aspx') >= 0){
		strpageID = strVisitorType + ': Prefabricated Stainless Crown Primary Tooth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2954.aspx') >= 0){
		strpageID = strVisitorType + ': Prefabricated Stainless Crown Post and Core';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1110.aspx') >= 0){
		strpageID = strVisitorType + ': Prophylaxis Root Canal Adult';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1120.aspx') >= 0){
		strpageID = strVisitorType + ': Prophylaxis Root Canal Child';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/DIAGNOSTIC/460.aspx') >= 0){
		strpageID = strVisitorType + ': Pulp Vitality Test';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/ENDODONTICS/3221.aspx') >= 0){
		strpageID = strVisitorType + ': Pulpal Debridement';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2920.aspx') >= 0){
		strpageID = strVisitorType + ': Recement Crown';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('(FIXED)/6930.aspx') >= 0){
		strpageID = strVisitorType + ': Recement Fixed Partial Denture';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/CROWN-BRIDGE/2910.aspx') >= 0){
		strpageID = strVisitorType + ': Recement Inlay Onlay';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1550.aspx') >= 0){
		strpageID = strVisitorType + ': Recement of Space Maintainer';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5731.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Complete Mandibular Denture Chairside';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5751.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Complete Mandibular Denture Laboratory';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5750.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Complete Maxillary Denture Laboratory';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5730.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Complete Maxillary\ Denture Chairside';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5741.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Partial Mandibular Denture Chairside';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5761.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Partial Mandibular Denture Laboratory';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5740.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Partial Maxillary\ Denture Chairside';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5760.aspx') >= 0){
		strpageID = strVisitorType + ': Reline Partial Maxillary Denture Laboratory';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7240.aspx') >= 0){
		strpageID = strVisitorType + ': Remove Impacted Tooth Completely Boney';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7230.aspx') >= 0){
		strpageID = strVisitorType + ': Remove Impacted Tooth Partially Boney';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7220.aspx') >= 0){
		strpageID = strVisitorType + ': Remove Impacted Tooth Soft Tissue';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5510.aspx') >= 0){
		strpageID = strVisitorType + ': Repair Broken Complete Denture Base';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5630.aspx') >= 0){
		strpageID = strVisitorType + ': Repair or Replace Broken Clasp';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5610.aspx') >= 0){
		strpageID = strVisitorType + ': Repair Resin Denture Base';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5640.aspx') >= 0){
		strpageID = strVisitorType + ': Replace Borken Teeth Per Tooth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5520.aspx') >= 0){
		strpageID = strVisitorType + ': Replace Borken or Missing Teeth Complete Denture';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2394.aspx') >= 0){
		strpageID = strVisitorType + ': Resin Based Composite Four or More Surfaces Posterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2330.aspx') >= 0){
		strpageID = strVisitorType + ': Resin Based Composite One Surface Anterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2391.aspx') >= 0){
		strpageID = strVisitorType + ': Resin Based Composite One Surface Posterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2332.aspx') >= 0){
		strpageID = strVisitorType + ': Resin Based Composite Three Surfaces Anterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2393.aspx') >= 0){
		strpageID = strVisitorType + ': Resin Based Composite Three Surfaces Posterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2331.aspx') >= 0){
		strpageID = strVisitorType + ': Resin Based Composite Two Surfaces Anterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('RESTORATION/2391.aspx') >= 0){
		strpageID = strVisitorType + ': Resin Based Composite Two Surfaces Posterior';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('care/1351.aspx') >= 0){
		strpageID = strVisitorType + ': Sealant Per Tooth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('restoration/2940.aspx') >= 0){
		strpageID = strVisitorType + ': Sedative Filling';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1515.aspx') >= 0){
		strpageID = strVisitorType + ': Space Maintainer Fixed Bilateral';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1510.aspx') >= 0){
		strpageID = strVisitorType + ': Space Maintainer Fixed Unilateral';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1525.aspx') >= 0){
		strpageID = strVisitorType + ': Space Maintainer Remove Bilateral';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1520.aspx') >= 0){
		strpageID = strVisitorType + ': Space Maintainer Remove Unilateral';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7210.aspx') >= 0){
		strpageID = strVisitorType + ': Surgical Removal of Errupted Tooth';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('SURGERY/7250.aspx') >= 0){
		strpageID = strVisitorType + ': Surgical Removal of Residual Tooth Roots';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5851.aspx') >= 0){
		strpageID = strVisitorType + ': Tissue Conditioning Mandibular';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('PROSTHETICS/5850.aspx') >= 0){
		strpageID = strVisitorType + ': Tissue Conditioning Maxillary';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1203.aspx') >= 0){
		strpageID = strVisitorType + ': Topical Application of Flouride Prophylaxix not Included Child';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('CARE/1201.aspx') >= 0){
		strpageID = strVisitorType + ': Topical Application of Flouride Prophylaxix Included Child';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/ENDODONTICS/3220.aspx') >= 0){
		strpageID = strVisitorType + ': Theraputic Pulpotomy';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/APPOINTMENTS/9999.aspx') >= 0){
		strpageID = strVisitorType + ': Unspecified Adjunctive Procedure by Report';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/Procedures/RESTORATIVE/2999.aspx') >= 0){
		strpageID = strVisitorType + ': Unspecified Restorative Procedure by Report';
		strcatID = '250';	
	}
	else if (strThispage.indexOf('/glossaryofterms.aspx') >= 0){
		strpageID = strVisitorType + ': Glossary of Terms';
		strcatID = '250';	
	}

	else if (strThispage.indexOf('/search/askexpert-serach.aspx') >= 0){
		strpageID = strVisitorType + ': Expert Advice';
		strcatID = '350';	
	}

	else if (strThispage.indexOf('/SignupWhenStarts.aspx') >= 0){
		strpageID = strVisitorType + ': Coverage Start Date';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/signup-discount-details.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: Direct Dental Discount Plan';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/SignupComparePlans.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: Compare Plans';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/signup-c550-details.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: C550 Plan';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/signup-vision-details.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: Vison Plan';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/popups/coveragestartdate-cc.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: Coverage Start Date CC';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/popups/coveragestartdate-ach.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: Coverage Start Date ACH';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/popups/Monthlypayments.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: Monthly Payments';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/popups/achdetails.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: ACH Details';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/popups/cvvdetails.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: CVV';
		strcatID = '400';	
	}
	else if (strThispage.indexOf('/popups/careington.aspx') >= 0){
		strpageID = strVisitorType + ': More Details: Careington';
		strcatID = '400';	
	}

	else{
		strpageID = strVisitorType + ': Page Unknown';
		strcatID = '150';
	}

	cmCreatePageviewTag(strpageID, strcatID, null, null);
}








var strStatefromZip5 = '';
function StatefromZip5(zip5)
{
  var	zip = zip5;

 //alert ( 'zip5:\n' + zip5 );
      if ((zip >=    99501) &&  (zip <= 99950)){ strStatefromZip5='Alaska'; return(strStatefromZip5); }
 else if ((zip >=    35004) &&  (zip <= 36925)){ strStatefromZip5='Alabama'; return(strStatefromZip5); }
 else if ((zip >=    71601) &&  (zip <=  72959)){ strStatefromZip5=  'Arkansas' ; return(strStatefromZip5); }
 else if ((zip >=    75502) &&  (zip <=  75502)){ strStatefromZip5=  'Arkansas'; return(strStatefromZip5); }
 else if ((zip >=    85001) &&  (zip <=  86556)){ strStatefromZip5=  'Arizona' ; return(strStatefromZip5); }
 else if ((zip >=    90001) &&  (zip <=  96162)){ strStatefromZip5=  'California'; return(strStatefromZip5); } 
 else if ((zip >=    80001) &&  (zip <=  81658)){ strStatefromZip5=  'Colorado'; return(strStatefromZip5); } 
 else if ((zip >=    06001) &&  (zip <=  06389)){ strStatefromZip5=  'Connecticut'; return(strStatefromZip5); } 
 else if ((zip >=    06401) &&  (zip <=  06928)){ strStatefromZip5=  'Connecticut'; return(strStatefromZip5); } 
 else if ((zip >=    20001) &&  (zip <=  20039)){ strStatefromZip5=  'Dist of Columbia'; return(strStatefromZip5); } 
 else if ((zip >=    20042) &&  (zip <=  20599)){ strStatefromZip5=   'Dist of Columbia'; return(strStatefromZip5); } 
 else if ((zip >=    20799) &&  (zip <=  20799)){ strStatefromZip5=  'Dist of Columbia'; return(strStatefromZip5); } 
 else if ((zip >=   19701) &&  (zip <=  19980)){ strStatefromZip5=  'Delaware' ; return(strStatefromZip5); }
 else if ((zip >=   32004 ) &&  (zip <= 34997)){ strStatefromZip5= 'Florida' ; return(strStatefromZip5); }
 else if ((zip >=   30001) &&  (zip <=  31999)){ strStatefromZip5=  'Georgia' ; return(strStatefromZip5); }
 else if ((zip >=   39901) &&  (zip <=  39901)){ strStatefromZip5=   'Georga'; return(strStatefromZip5); } 
 else if ((zip >=   96701) &&  (zip <=  96898)){ strStatefromZip5=  'Hawaii'; return(strStatefromZip5); } 
 else if ((zip >=   50001) &&  (zip <=  52809)){ strStatefromZip5=  'Iowa' ; return(strStatefromZip5); }
 else if ((zip >=   68119) &&  (zip <=  68120)){ strStatefromZip5=  'Iowa' ; return(strStatefromZip5); }
 else if ((zip >=   83201 ) &&  (zip <= 83876)){ strStatefromZip5=  'Idaho' ; return(strStatefromZip5); }
 else if ((zip >=   60001) &&  (zip <=  62999)){ strStatefromZip5=  'Illinois'; return(strStatefromZip5); } 
 else if ((zip >=   46001) &&  (zip <=  47997)){ strStatefromZip5=  'Indiana' ; return(strStatefromZip5); }
 else if ((zip >=    66002) &&  (zip <=  67954)){ strStatefromZip5=  'Kansas'; return(strStatefromZip5); } 
 else if ((zip >=    40003) &&  (zip <=  42788)){ strStatefromZip5=  'Kentucky' ; return(strStatefromZip5); }
 else if ((zip >=    70001) &&  (zip <=  71232)){ strStatefromZip5=  'Louisiana'; return(strStatefromZip5); } 
 else if ((zip >=    71234) &&  (zip <=  71497)){ strStatefromZip5=  'Louisiana' ; return(strStatefromZip5); }
 else if ((zip >=    01001) &&  (zip <=  02791)){ strStatefromZip5=  'Massachusetts'; return(strStatefromZip5); } 
 else if ((zip >=    05501) &&  (zip <=  05544)){ strStatefromZip5=  'Massachusetts'; return(strStatefromZip5); } 
 else if ((zip >=    20331) &&  (zip <=  20331)){ strStatefromZip5=  'Maryland' ; return(strStatefromZip5); }
 else if ((zip >=    20335) &&  (zip <=  20797)){ strStatefromZip5=  'Maryland' ; return(strStatefromZip5); }
 else if ((zip >=    20812) &&  (zip <=  21930)){ strStatefromZip5=  'Maryland'; return(strStatefromZip5); } 
 else if ((zip >=    03901) &&  (zip <=  04992)){ strStatefromZip5=  'Maine' ; return(strStatefromZip5); }
 else if ((zip >=    48001) &&  (zip <=  49971)){ strStatefromZip5=  'Michigan' ; return(strStatefromZip5); }
 else if ((zip >=    55001) &&  (zip <=  56763)){ strStatefromZip5=  'Minnesota' ; return(strStatefromZip5); }
 else if ((zip >=    63001) &&  (zip <=  65899)){ strStatefromZip5=  'Missouri'; return(strStatefromZip5); }
 else if ((zip >=    38601) &&  (zip <=  39776)){ strStatefromZip5=  'Mississippi'; return(strStatefromZip5); } 
 else if ((zip >=    71233) &&  (zip <=  71233)){ strStatefromZip5=  'Mississippi'; return(strStatefromZip5); } 
 else if ((zip >=    59001) &&  (zip <=  59937)){ strStatefromZip5=  'Montana' ; return(strStatefromZip5); }
 else if ((zip >=    27006) &&  (zip <=  28909)){ strStatefromZip5=  'North Carolina'; return(strStatefromZip5); } 
 else if ((zip >=    58001) &&  (zip <=  58856)){ strStatefromZip5=  'North Dakota'; return(strStatefromZip5); } 
 else if ((zip >=    68001) &&  (zip <=  68118)){ strStatefromZip5=  'Nebraska'; return(strStatefromZip5); } 
 else if ((zip >=    68122) &&  (zip <=  69367)){ strStatefromZip5=   'Nebraska'; return(strStatefromZip5); }
 else if ((zip >=   03031) &&  (zip <=  03897)){ strStatefromZip5=  'New Hampshire'; return(strStatefromZip5); } 
 else if ((zip >=   07001) &&  (zip <=  08989)){ strStatefromZip5=  'New Jersey' ; return(strStatefromZip5); }
 else if ((zip >=    87001) &&  (zip <=  88441)){ strStatefromZip5=  'New Mexico' ; return(strStatefromZip5); }
 else if ((zip >=    88901) &&  (zip <=  89883)){ strStatefromZip5=  'Nevada' ; return(strStatefromZip5); }
 else if ((zip >=    06390) &&  (zip <=  06390)){ strStatefromZip5=  'New York' ; return(strStatefromZip5); }
 else if ((zip >=    10001) &&  (zip <=  14975)){ strStatefromZip5=  'New York' ; return(strStatefromZip5); }
 else if ((zip >=    43001) &&  (zip <=  45999)){ strStatefromZip5=  'Ohio' ; return(strStatefromZip5); }
 else if ((zip >=    73001) &&  (zip <=  73199)){ strStatefromZip5=  'Oklahoma' ; return(strStatefromZip5); }
 else if ((zip >=    73401) &&  (zip <=  74966)){ strStatefromZip5=  'Oklahoma'; return(strStatefromZip5); } 
 else if ((zip >=   97001) &&  (zip <=  97920)){ strStatefromZip5=  'Oregon'; return(strStatefromZip5); } 
 else if ((zip >=   15001) &&  (zip <=  19640)){ strStatefromZip5=  'Pennsylvania'; return(strStatefromZip5); } 
 else if ((zip >=   02801) &&  (zip <=  02940)){ strStatefromZip5=  'Rhode Island' ; return(strStatefromZip5); }
 else if ((zip >=   29001) &&  (zip <=  29948)){ strStatefromZip5=   'South Carolina'; return(strStatefromZip5); } 
 else if ((zip >=    57001) &&  (zip <=  57799)){ strStatefromZip5=  'South Dakota'; return(strStatefromZip5); } 
 else if ((zip >=   37010) &&  (zip <=  38589)){ strStatefromZip5=  'Tennessee'; return(strStatefromZip5); } 
 else if ((zip >=   73301) &&  (zip <=  73301)){ strStatefromZip5=  'Texas'; return(strStatefromZip5); }
 else if ((zip >=   75001) &&  (zip <=  75501)){ strStatefromZip5=  'Texas' ; return(strStatefromZip5); }
 else if ((zip >=   75503) &&  (zip <=  79999)){ strStatefromZip5=  'Texas' ; return(strStatefromZip5); }
 else if ((zip >=   88510) &&  (zip <=  88589)){ strStatefromZip5=  'Texas'; return(strStatefromZip5); }
 else if ((zip >=   84001) &&  (zip <=  84784)){ strStatefromZip5=  'Utah' ; return(strStatefromZip5); }
 else if ((zip >=   20040) &&  (zip <=  20041)){ strStatefromZip5=  'Virginia' ; return(strStatefromZip5); }
 else if ((zip >=   20040) &&  (zip <=  20167)){ strStatefromZip5=  'Virginia' ; return(strStatefromZip5); }
 else if ((zip >=   20042) &&  (zip <=  20042)){ strStatefromZip5=  'Virginia' ; return(strStatefromZip5); }
 else if ((zip >=   22001) &&  (zip <=  24658)){ strStatefromZip5=  'Virginia' ; return(strStatefromZip5); }
 else if ((zip >=   05001) &&  (zip <=  05495)){ strStatefromZip5=  'Vermont' ; return(strStatefromZip5); }
 else if ((zip >=   05601) &&  (zip <=  05907)){ strStatefromZip5=  'Vermont' ; return(strStatefromZip5); }
 else if ((zip >=   98001) &&  (zip <=  99403)){ strStatefromZip5=  'Washington' ; return(strStatefromZip5); }
 else if ((zip >=   53001) &&  (zip <=  54990)){ strStatefromZip5=  'Wisconsin'; return(strStatefromZip5); } 
 else if ((zip >=   24701) &&  (zip <=  26886)){ strStatefromZip5= 'West Virginia'; return(strStatefromZip5); }
 else if ((zip >=   82001) &&  (zip <=  83128)){ strStatefromZip5=  'Wyoming'; return(strStatefromZip5); } 

}


var foundStr = null;
function findStr(findThis)
{
	if( ( document.body && document.body.createTextRange ) || window.find ) {
		foundStr = searchForit( findThis, window );
		return(foundStr);
	}
}

function searchForit( toFind, frameToSearch ) {
	if( frameToSearch.focus ) { 
		frameToSearch.focus(); 
	}
	if( window.find ) {
		//Netscape compatible browsers provide the window.find method
		if( document.layers ) {
			//Against the JS spec, Netscape 4 will produce errors if too many arguments are given
			var ifFound = frameToSearch.find( toFind, false, false );
		} else {
			var ifFound = frameToSearch.find( toFind, false, false, true, false, true, false );
		}
	} else if( frameToSearch.document.body && frameToSearch.document.body.createTextRange ) {
		//IE or compatible use various TextRange features
		if( frameToSearch.document.selection && frameToSearch.document.selection.type != 'None' ) {
			var theRange = frameToSearch.document.selection.createRange();
			theRange.collapse( false );
		} else {
			var theRange = frameToSearch.document.body.createTextRange();
		}
		var ifFound = theRange.findText( toFind );
		if( ifFound ) 
		{ 
			return(toFind);
		}
	} 

	if( !ifFound ) { 
		return(' ');
	}
}



var strVisitorType = ' ';
function searchAgent()
{
	var strAgentID = '';

	strAgentID = readCookie("AgentID");
	if((strAgentID != '') && (strAgentID != null)){
		strVisitorType = 'Agent';
	}else{
		strVisitorType = 'Consumer';
	}
}





function searchAgent1()
{
	if( ( document.body && document.body.createTextRange ) || window.find ) {
		searchForText( searchStr, window );
	}else{
		alert("alert at 1");
	}
}




var searchStr = 'Agent Name:';

function searchForText( toFind, frameToSearch ) {
	if( frameToSearch.focus ) { 
		frameToSearch.focus(); 
	}
	if( window.find ) {
		//Netscape compatible browsers provide the window.find method
		if( document.layers ) {
			//Against the JS spec, Netscape 4 will produce errors if too many arguments are given
			var ifFound = frameToSearch.find( toFind, false, false );
		} else {
			var ifFound = frameToSearch.find( toFind, false, false, true, false, true, false );
		}
	} else if( frameToSearch.document.body && frameToSearch.document.body.createTextRange ) {
		if( frameToSearch.document.selection && frameToSearch.document.selection.type != 'None' ) {
			var theRange = frameToSearch.document.selection.createRange();
			theRange.collapse( false );
		} else {
			var theRange = frameToSearch.document.body.createTextRange();
		}
		var ifFound = theRange.findText( toFind );
		if( ifFound ) 
		{ 
			strVisitorType = 'Agent';
		}
	} 

	if( ifFound ) 
	{ 
		strVisitorType = 'Agent';
	}
	else if( !ifFound ) 
	{ 
		strVisitorType = 'Consumer';
	}
}










function	cmPageViewStateOnSelect()
{
	cmCreatePageviewTag(strExtraPageview, "650", null, null);
}

