var e_DbAds=false,e_DbCookies=false,e_Debug=false,e_Key="",e_QueryString=location.search.substr(1),e_ContentGroup="";e_InitializeGlobalVariables();function e_InitializeGlobalVariables(){var a=e_QueryString,b=a.indexOf("&");if(b>0)a=a.substr(0,b);var c=a.indexOf("=");if(c==-1)e_Key=a}function e_AnyRequiredInputMissing(e){for(var d,b,c,a=0;a+1<e_RequiredInput.length;a+=2){b=e_RequiredInput[a];d=e_RequiredInput[a+1];c=eval(e.name+"."+b);if(e_NoInput(c,d))return true}return false}function e_AnyRequiredSelectionsMissing(e){for(var d,b,c,a=0;a+1<e_RequiredSelections.length;a+=2){b=e_RequiredSelections[a];d=e_RequiredSelections[a+1];c=eval(e.name+"."+b);if(e_NoSelection(c,d))return true}return false}function e_BadDate(a,c){var q="The day component of ",p="', cannot be larger than 2 digits.",g=", '",o="The month component of ",n="The year component of ",f="-";if(typeof c=="undefined")c="the date";if(a.value.length==8){expand="y";for(xx=0;xx<a.value.length;xx++){var r=a.value.substr(xx,1);if(r<"0"||r>"9")expand="n"}if(expand=="y")a.value=a.value.substr(0,4)+f+a.value.substr(4,2)+f+a.value.substr(6,2)}var b=new String(""),i=a.value.indexOf(f,0),m=a.value.indexOf(f,i+1),h=a.value.substr(0,i),e=a.value.substr(i+1,m-(i+1)),d=a.value.substr(m+1),j=Math.floor(h),l=Math.floor(e),k=Math.floor(d);if(a.value==""||m==-1)b="Please enter "+c+" in YYYYMMDD or YYYY-MM-DD format. (In the latter case, month and day values need not be zero-filled when less than 10.)";else if(h.length!=4)b=n+c+"', "+h+"', must be 4 digits.";else if(e.length>2)b=o+c+g+e+p;else if(d.length>2)b=q+c+g+d+p;else if(isNaN(j)||j<1991||j>2010)b=n+c+g+j+"', must lie within 1991 and 2010.";else if(isNaN(l)||l<1||l>12)b=o+c+g+l+"', must lie within 1 and 12.";else if(isNaN(k)||k<1||k>31)b=q+c+g+k+"', must lie within 1 and 31.";if(b!=""){a.focus();a.select();alert(b);return true}if(e.length<2)e="0"+e;if(d.length<2)d="0"+d;a.value=h+f+e+f+d;return false}function e_EmailAddressIsValid(a){return!e_BadEmailAddress(a)}function e_BadEmailAddress(a,d){var b=true;if(a.value==""){a.focus();a.select();if(typeof d=="undefined")alert("Please enter your email address.");else alert("Please enter "+d+".");return b}if(a.value.indexOf("@")==-1){a.focus();a.select();alert("A valid email address would have an at-sign ('@') in it.");return b}if(a.value.indexOf(".")==-1){a.focus();a.select();alert("A valid email address would have a period ('.') in it.");return b}if(a.value.indexOf("*")!=-1){a.focus();a.select();alert("A valid email address would not have an asterisk ('*') in it.");return b}if(a.value.indexOf("?")!=-1){a.focus();a.select();alert("A valid email address would not have a question mark ('?') in it.");return b}var e=/[^A-Za-z0-9@._-]/,c=a.value.search(e);if(c>-1){var f=a.value.substr(c,1);a.focus();a.select();return confirm("Do you want to use this email address even though there's a '"+f+"' in position "+(c+1)+"?")?false:b}return false}function e_BadRange(a,b,d,c){if(e_NoInput(a,b))return true;value=parseFloat(a.value);if(isNaN(a.value)||value<d||value>c){a.focus();a.select();alert("Please enter "+b+" between "+d+" and "+c+".");return true}return false}function e_HighlightAll(a){for(xx=0;xx<a.options.length-1;xx++)a.options[xx].selected=true}function e_NoChoice(a,b){for(xx=0;xx<a.length;xx++)if(a[xx].checked)return false;a[0].focus();a[0].select();alert("Please choose "+b+".");return true}function e_NoInput(a,b){if(a.value==""){a.focus();a.select();alert("Please enter "+b+".");return true}return false}function e_NoSelection(a,b){if(a.selectedIndex==-1||a.options[a.selectedIndex].value==""||a.options[a.selectedIndex].value=="[not set]"){a.focus();alert("Please select "+b+".");return true}return false}function e_JumpToBrowsePage(c){var b="/SearchBrowse.aspx?pathID=",a=e_GetArgs(c),d="";if(a.xsrc!=null&&a.xsrc!="")var d=String(b+a.f_path_id+"&xsrc="+a.xsrc);else var d=String(b+a.f_path_id);window.location=d}function e_LeftPad(d,c,b){var a=new String(""+d);while(a.length<c)a=b+a;return a}function e_Tab(){return"&nbsp;&nbsp;&nbsp;"}function e_Translate(a,c,d){for(var b=0;b<a.length;b++){this_char=a.charAt(b);if(this_char==c)a=a.substr(0,b)+d+a.substr(b+1)}return a}function e_Write(c){if(e_Debug==false){document.write(""+c);return}var a=new String("");if(e_FirstTime){e_FirstTime=false;document.writeln("<P>JS_EMARKETER: ");document.writeln("'"+JS_EMARKETER+"'.<BR>")}for(t=0;t<c.length;t++){var b=c.charAt(t);if(b=="<")a=a+"&lt;";else if(b==">")a=a+"&gt;";else if(b=="&")a=a+"&amp;";else a=a+b}a+="<BR>";document.write(""+a)}function e_GetCookie(f){var b=f+"=",d=b.length,e=document.cookie.length,a=0;while(a<e){var c=a+d;if(document.cookie.substring(a,c)==b)return e_GetCookieVal(c);a=document.cookie.indexOf(" ",a)+1;if(a==0)break}return null}function e_SetCookie(i,h){var a=null,c=e_SetCookie.arguments,b=e_SetCookie.arguments.length,d=b>2?c[2]:a,f=b>3?c[3]:a,e=b>4?c[4]:a,g=b>5?c[5]:false;document.cookie=i+"="+escape(h)+(d==a?"":"; expires="+d.toGMTString())+(f==a?"":"; path="+f)+(e==a?"":"; domain="+e)+(g==true?"; secure":"")}function e_DeleteCookie(b){var a=new Date;a.setTime(a.getTime()-1);var c=e_GetCookie(b);document.cookie=b+"="+c+"; expires="+a.toGMTString()}function e_GetCookieVal(b){var a=document.cookie.indexOf(";",b);if(a==-1)a=document.cookie.length;return unescape(document.cookie.substring(b,a))}function e_GetArgs(e){for(var d={},g=e,b=g.split("&"),a=0;a<b.length;a++){var c=b[a].indexOf("=");if(c==-1)continue;var f=b[a].substring(0,c),h=b[a].substring(c+1);d[f]=unescape(h)}return d}function e_ChartSubdir(c){var d="000000",a=Math.floor((c-1)/1e3)*1e3+1;a=a+"";a=d.substr(0,6-a.length)+a;var b=Math.ceil(c/1e3)*1e3;b=b+"";b=d.substr(0,6-b.length)+b;return a+"-"+b}function e_ChartImgSrc(a){if(a.length==5)a="0"+a;var b="/images/chart_gifs/"+e_ChartSubdir(a)+"/"+a+".gif";return b}function e_PopupWindow(a){open_url=a;open_window_name=new String("");width=800;height=600;open_window_features=new String("scrollbars=yes,menubar=yes,addressbar=1,resizable=yes,toolbar=yes,left=25, top=25, width="+width+", height="+height);window.open(open_url,open_window_name,open_window_features)}function e_PopupWindow2(c,b,a){newwin=window.open(c,b,a)}function e_OpenWindow(b,a){window.open(b,"",a)}function e_InsightExpressPopup(b){var a="";a&&alert("BEGIN e_PopupWindowPromo().");a&&alert("a_content_group: "+b);if(b=="Extranet"){a&&alert("Not showing popup window if page is in extranet format. EXITING e_InsightExpressPopup().");return}randomSurvey()}function e_PopupWindowPromo(h,f){var c="doNotShow",b="c_survey_popup",a="";a&&alert("BEGIN e_PopupWindowPromo().");a&&alert("a_state: "+h);a&&alert("a_content_group: "+f);var i=1,j=2*356,d=new Date,e=new Date;d.setTime(d.getTime()+i*24*60*60*1e3);e.setTime(e.getTime()+j*24*60*60*1e3);if(h=="just_clicked"){a&&alert("Popup window link was clicked!  Setting cookie so user doesn't get popup again. EXITING e_PopupWindowPromo().");e_SetCookie(b,c,e);return}if(location.search.indexOf("popup=y")!=-1)a&&alert("popup=y detected in URL.  Forcing popup window");else{if(f=="Extranet"){a&&alert("Not showing popup window if page is in extranet format. EXITING e_PopupWindowPromo().");return}var g=e_GetCookie(b);a&&alert("survey_cookie: "+g);if(g==c){a&&alert("Popup window already viewed. EXITING e_PopupWindowPromo().");return}}a&&alert("Opening popup window...");var l="/Popup.aspx",k="width=321,height=288,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no";TheNewWin=window.open(l,"TheNewPop",k);e_SetCookie(b,c,d);a&&alert("EXITING e_PopupWindowPromo().")}function setCookie(c,b){var a=c+"="+encodeURIComponent(b);document.cookie=a}function getCookie(a){var c="(?:;)?"+a+"=([^;]*);?",b=new RegExp(c);return b.test(document.cookie)?decodeURIComponent(RegExp.$1):null}function Querystring(a){this.params={};if(a==null)a=location.search.substring(1,location.search.length);if(a.length==0)return;a=a.replace(/\+/g," ");for(var d=a.split("&"),c=0;c<d.length;c++){var b=d[c].split("="),e=decodeURIComponent(b[0]),f=b.length==2?decodeURIComponent(b[1]):e;this.params[e]=f}}function GetGuid(){var a=new Querystring;return a.get("guid")}Querystring.prototype.get=function(c,b){var a=this.params[c];return a!=null?a:b};Querystring.prototype.contains=function(b){var a=this.params[b];return a!=null};function FindPosX(a){var b=0;if(a.offsetParent)while(1){b+=a.offsetLeft;if(!a.offsetParent)break;a=a.offsetParent}else if(a.x)b+=a.x;return b}function FindPosY(a){var b=0;if(a.offsetParent)while(1){b+=a.offsetTop;if(!a.offsetParent)break;a=a.offsetParent}else if(a.y)b+=a.y;return b}function FindPos(a){var b=curtop=0;if(a.offsetParent)do{if(a.id!="mainContent")b+=a.offsetLeft;curtop+=a.offsetTop}while(a=a.offsetParent);return[b,curtop]}function MoveToPos(a,c,d,e){var b=FindPos(c);a.style.left=b[0]+d+"px";a.style.top=b[1]+e+"px"}function AddNewListItem(b,c){if(b!=null&&c!=null){var a=new Option;a.text=c;a.value=c;b.options[b.length]=a}}function DoClickByPressEnterKey(e,d){var c=$get(e),a,b;if(window.event)a=window.event.keyCode;else{a=d.which;b="firefox"}if(a==13)if(c!=null){c.click();b=="firefox"&&d.preventDefault()}}function MM_showHideLayers_2(b){MM_hideAllLayers("leftNavTopics|leftNavGeography|leftNavDemographics|leftNavConcepts|leftNavSources|leftNavTagCloud|leftNavTypes|topicList");var a=document.getElementById(b);if(a!=null){a.style.visibility="visible";a.style.display="block"}}function MM_showHideLayers_3(d){MM_hideAllLayers("leftNavTopics|leftNavGeography|leftNavDemographics|leftNavConcepts|leftNavSources|leftNavTagCloud|leftNavTypes|topicList|browseToggleUp|topicsToggleUp");for(var c=d.split("|"),b=0;b<c.length;b++){var a=document.getElementById(c[b]);if(a!=null){a.style.visibility="visible";a.style.display="block"}}}function MM_showHideLayers_4(d){MM_hideAllLayers("popup1|popup2|popup3|popup4|popup5");for(var c=d.split("|"),b=0;b<c.length;b++){var a=document.getElementById(c[b]);if(a!=null){a.style.visibility="visible";a.style.display="block"}}}function MM_hideAllLayers(d){for(var c=d.split("|"),b=0;b<c.length;b++){var a=document.getElementById(c[b]);if(a!=null){a.style.visibility="hidden";a.style.display="none"}}}function AddCheckedToFavorites(f){for(var b="/MyAccount/EditFavorite.aspx?mode=1&type=1",e=0,c=document.getElementsByTagName("input"),a=0;a<c.length;a++){var d=c[a].name;if(d.indexOf(f)==0){var g=d.substring(14,d.length);if(c[a].checked){e++;b+="&id="+g}}}b+="&backto="+escape(window.location);if(e>0)window.location=b;else alert("You must check at least one item.")}function CheckAllForFavorites(c,d){for(var b=document.getElementsByTagName("input"),a=0;a<b.length;a++)if(b[a].name.indexOf(c)==0)b[a].checked=d}function MM_findObj(b,a){var e,d,c;if(!a)a=document;if((e=b.indexOf("?"))>0&&parent.frames.length){a=parent.frames[b.substring(e+1)].document;b=b.substring(0,e)}if(!(c=a[b])&&a.all)c=a.all[b];for(d=0;!c&&d<a.forms.length;d++)c=a.forms[d][b];for(d=0;!c&&a.layers&&d<a.layers.length;d++)c=MM_findObj(b,a.layers[d].document);if(!c&&a.getElementById)c=a.getElementById(b);return c}function MM_swapImage(){var b,d=0,a,c=MM_swapImage.arguments;document.MM_sr=[];for(b=0;b<c.length-2;b+=3)if((a=MM_findObj(c[b]))!=null){document.MM_sr[d++]=a;if(!a.oSrc)a.oSrc=a.src;a.src=c[b+2]}}function MM_swapImgRestore(){for(var a,b=document.MM_sr,c=0;b&&c<b.length&&(a=b[c])&&a.oSrc;c++)a.src=a.oSrc}function MM_preloadImages(){var a=document;if(a.images){if(!a.MM_p)a.MM_p=[];for(var d=a.MM_p.length,c=MM_preloadImages.arguments,b=0;b<c.length;b++)if(c[b].indexOf("#")!=0){a.MM_p[d]=new Image;a.MM_p[d++].src=c[b]}}}function MM_jumpMenu(c,a,b){eval(c+".location='"+a.options[a.selectedIndex].value+"'");if(b)a.selectedIndex=0}function OnError(a,j,i){var f="Current Version: ",e="Current Browser Name: ",d="Current URL: ",b="\r\n";if(a!=null)if(a._message=="Authentication failed.")window.location.href="/Login.aspx";else if(i!="OnServerSendErrorEmail"){var h=window.location.href,c=navigator.appName,g=navigator.appVersion;if(a._message.substring(19,-4)=="The server method '"&&a._message.slice(-9)=="' failed."&&a._timedOut==false&&a._stackTrace==""&&a._exceptionType==""){a._message=a._message+b+"Page Load Error!"+b+d+h+b+e+c+b+f+g;PageMethods.OnServerSendErrorEmail(a,OnServerSendErrorEmailComplete,OnError)}else{a._message=a._message+b+d+h+b+e+c+b+f+g;PageMethods.OnServerSendErrorEmail(a,OnServerSendErrorEmailComplete,OnError);alert("Unknown Error. Please Try Again.")}}}var LEFT_ACTIVE_STATUS=0,RIGHT_ACTIVE_STATUS=0,_previousActiveNode=0;function ToggleActiveStatus(b,a){if(b==1&&a==1)return;LEFT_ACTIVE_STATUS=b;RIGHT_ACTIVE_STATUS=a;OnLoadSetBentEnds()}function ToggleCurvedLeftEnd(){var a=document.getElementById("nav_LinkRow_LeftFlair");if(LEFT_ACTIVE_STATUS==1){a.style.backgroundImage="url(/images/v6/top_nav_lh_corner_beige.gif)";a.style.backgroundColor="#338DC3"}else{a.style.backgroundImage="url(/images/v6/top_nav_lh_corner_blue.gif)";a.style.backgroundColor="#F0F0DF"}}function ToggleCurvedRightEnd(){var a=document.getElementById("nav_LinkRow_RightFlair");if(RIGHT_ACTIVE_STATUS==1){a.style.backgroundImage="url(/images/v6/top_nav_rh_corner_beige.gif)";a.style.backgroundColor="#338DC3"}else{a.style.backgroundImage="url(/images/v6/top_nav_rh_corner_blue.gif)";a.style.backgroundColor="#F0F0DF"}}function OnLoadSetBentEnds(){ToggleCurvedLeftEnd();ToggleCurvedRightEnd()}