/*
******************************************************************************
       File: GCIONSettings.js
  Copyright: Copyright (c) 2008, Gannett Inc. All rights reserved.
******************************************************************************
*/

/* ==================================================================== */
/* Defines common global settings                                       */
/* ==================================================================== */

var gdn_language = "eng";
var gdn_timeout  = 20;
var gdn_coppaage = 13;

/* ==================================================================== */
/* Defines global settings for user authentication                      */
/* ==================================================================== */

var gdn_enable_auth_by_division        = true;
var gdn_enable_third_party_by_division = true;

/* ==================================================================== */
/* Defines global settings for user registration                        */
/* ==================================================================== */

var gdn_enable_reg_by_division  = true;
var gdn_sessions                = 2;
var gdn_page_views              = 3;
var gdn_days                    = 30;
var gdn_occupation_required     = false;
var gdn_enable_bt               = true;

/* ==================================================================== */
/* Defines supported Web browsers                                       */
/* ==================================================================== */

var gdn_browsers = [];
gdn_browsers[0]  = "Explorer|>=|6.0|Windows";
gdn_browsers[1]  = "Firefox|>=|1.0|Windows";
gdn_browsers[2]  = "Firefox|>=|1.0|Mac";
gdn_browsers[3]  = "Safari|>=|1.0|Mac";

var gdn_ext_ex = []; var gdn_local_ex = []; var gdn_msgs = [1]; gdn_msgs["eng"] = []; gdn_msgs["eng"]["CancelExec"] = "Canceling your membership..."; gdn_msgs["eng"]["CancelFailed"] = "We were unable to cancel your membership"; gdn_msgs["eng"]["CancelTimeout"] = "We were unable to cancel your membership. Please try again later."; gdn_msgs["eng"]["ChangeActDupEmail"] = "The email address you entered is already in use"; gdn_msgs["eng"]["ChangeActDupUser"] = "The screen name you entered is already in use"; gdn_msgs["eng"]["ChangeActExec"] = "Updating your account..."; gdn_msgs["eng"]["ChangeActFailed"] = "We were unable to update your account"; gdn_msgs["eng"]["ChangeActTimeout"] = "We were unable to update your account. Please try again later."; gdn_msgs["eng"]["ChangePwdExec"] = "Changing your password..."; gdn_msgs["eng"]["ChangePwdFailed"] = "We were unable to change your password"; gdn_msgs["eng"]["ChangePwdInvalid"] = "Your old password is invalid"; gdn_msgs["eng"]["ChangePwdTimeout"] = "We were unable to change your password. Please try again later."; gdn_msgs["eng"]["ChangeUsrDupUser"] = "The screen name you entered is already in use"; gdn_msgs["eng"]["ChangeUsrExec"] = "Updating your account..."; gdn_msgs["eng"]["ChangeUsrFailed"] = "We were unable to update your account"; gdn_msgs["eng"]["ChangeUsrTimeout"] = "We were unable to update your account. Please try again later."; gdn_msgs["eng"]["ConfirmActivated"] = "Your account has already been activated"; gdn_msgs["eng"]["ConfirmExec"] = "Sending your confirmation email..."; gdn_msgs["eng"]["ConfirmInvalid"] = "The email address you entered is invalid"; gdn_msgs["eng"]["ConfirmTimeout"] = "We were unable to send your confirmation email. Please try again later."; gdn_msgs["eng"]["ForgotPwdExec"] = "Retrieving your password..."; gdn_msgs["eng"]["ForgotPwdInvalid"] = "The email address you entered is invalid"; gdn_msgs["eng"]["ForgotPwdTimeout"] = "We were unable to retrieve your password. Please try again later."; gdn_msgs["eng"]["LoginExec"] = "Loading..."; gdn_msgs["eng"]["LoginFailed"] = "Invalid email or password"; gdn_msgs["eng"]["LoginLockedOut"] = "Your account is locked out. Please try again in 10 minutes."; gdn_msgs["eng"]["LoginNoCookies"] = "Cookies must be enabled to log in"; gdn_msgs["eng"]["LoginTimeout"] = "Unable to log you in"; gdn_msgs["eng"]["LoginUnavailable"] = "Your {0} is currently unavailable. Please manually enter your information and click the Become a Member button to sign up now."; gdn_msgs["eng"]["NletterExec"] = "Updating your newsletter subscriptions..."; gdn_msgs["eng"]["NletterFailed"] = "Your newsletter subscriptions could not be updated"; gdn_msgs["eng"]["NletterNone"] = "No newsletters were found"; gdn_msgs["eng"]["NletterSaved"] = "Your newsletter subscriptions updated successfully"; gdn_msgs["eng"]["NletterTimeout"] = "We were unable to update your newsletter subscriptions. Please try again later."; gdn_msgs["eng"]["RegDupEmail"] = "The email address you entered is already in use"; gdn_msgs["eng"]["RegDupUser"] = "The screen name you entered is already in use"; gdn_msgs["eng"]["RegExec"] = "Registering your account..."; gdn_msgs["eng"]["RegFailed"] = "We were unable to complete your registration"; gdn_msgs["eng"]["RegTimeout"] = "We were unable to register your account. Please try again later."; gdn_msgs["eng"]["ZagExec"] = "Registering..."; gdn_msgs["eng"]["ZagTimeout"] = "We were unable to register you. Please try again later."; gdn_msgs["eng"]["CompanySizeNone"] = "You must select your company size"; gdn_msgs["eng"]["CountryNone"] = "You must select your country"; gdn_msgs["eng"]["EmailInvalid"] = "Your email address is invalid (Ex. username@domain.com)"; gdn_msgs["eng"]["EmailMax"] = "Your email address must be 100 characters or less"; gdn_msgs["eng"]["EmailNone"] = "You must enter your email address"; gdn_msgs["eng"]["ErrorHeader"] = "The following errors occurred in each required field:"; gdn_msgs["eng"]["FirstNameMax"] = "Your first name must be 30 characters or less"; gdn_msgs["eng"]["GenderNone"] = "You must select your gender"; gdn_msgs["eng"]["IndustryNone"] = "You must select your industry"; gdn_msgs["eng"]["LastNameMax"] = "Your last name must be 30 characters or less"; gdn_msgs["eng"]["OccupationNone"] = "You must select your occupation"; gdn_msgs["eng"]["OldPwdNone"] = "You must enter your old password"; gdn_msgs["eng"]["PwdConfirm"] = "You must confirm your password"; gdn_msgs["eng"]["PwdInvalid"] = "Your password can only contain letters and numbers, no spaces"; gdn_msgs["eng"]["PwdMax"] = "Your password must be 30 characters or less"; gdn_msgs["eng"]["PwdMin"] = "Your password must be at least 5 characters"; gdn_msgs["eng"]["PwdNoMatch"] = "Your passwords do not match"; gdn_msgs["eng"]["PwdNone"] = "You must enter your password"; gdn_msgs["eng"]["UserNameCreate"] = "If you do not have a screen name, please create one"; gdn_msgs["eng"]["UserNameInvalid"] = "Your screen name can only contain letters and numbers, no spaces"; gdn_msgs["eng"]["UserNameMax"] = "Your screen name must be 16 characters or less"; gdn_msgs["eng"]["UserNameMin"] = "Your screen name must be at least 5 characters"; gdn_msgs["eng"]["UserNameNone"] = "You must enter your screen name"; gdn_msgs["eng"]["YobInvalid"] = "Your year of birth is invalid (Ex. 1975)"; gdn_msgs["eng"]["YobNone"] = "You must enter your year of birth"; gdn_msgs["eng"]["ZipFailed"] = "Your zip code is in the correct format but it is not valid"; gdn_msgs["eng"]["ZipInvalid"] = "Your zip code is invalid (Ex. 47012)"; gdn_msgs["eng"]["ZipNone"] = "You must enter your zip code"; gdn_msgs["eng"]["YobUnderage"]="We're sorry.  We cannot accept your registration at this time.  Please review our <a href=\"ReplacehrefTOS\">Terms of Service</a>";

/* -------------------------------------------------------------------- */
/* DEPRECATED                                                           */
/* -------------------------------------------------------------------- */

/* ==================================================================== */
/* Defines global settings for user authentication                      */
/* ==================================================================== */

var gdn_events_url = "gannett.ur.gcion.com/Scripts/UA/Events";
var gdn_objects_url = "gannett.ur.gcion.com/Scripts/UA/Objects";
var gdn_widgets_url = "gannett.ur.gcion.com/Scripts/UA/Widgets";

/* ==================================================================== */
/* Defines global settings for user registration                        */
/* ==================================================================== */

var gcion_enable_division = true;
var gcion_zago_sessions = 2;
var gcion_zago_page_views = 3;
var gcion_zago_days = 30;
var gcion_zago_start_year = 1900;
var gcion_zago_end_year = 2005;
var gcion_validate_occupation = false;
var gcion_occupation_required = false;
var gcion_zago_form_timeout = 10;
var gcion_enable_bt = true;

/* ==================================================================== */
/* Defines supported Web browsers for user registration                 */
/* ==================================================================== */

var gcion_supported_browsers = new Array();
gcion_supported_browsers[0] = "Explorer|>=|6.0|Windows";
gcion_supported_browsers[1] = "Firefox|>=|1.0|Windows";
gcion_supported_browsers[2] = "Firefox|>=|1.0|Mac";
gcion_supported_browsers[3] = "Safari|>=|1.0|Mac";

eval(function(p, a, c, k, e, d) { e = function(c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function(e) { return d[e] } ]; e = function() { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; } ('e E=d f();e F=d f();e a=d f(2);D(e t=0;t<a.s;t++)a[t]=d f(B);a[0][0]="C J K I p G H y:";a[0][1]="c b g j A";a[0][2]="h m n i v q (o: z)";a[0][3]="h m n i b r x "+w+" L "+W;a[0][4]="c b u j m n i";a[0][5]="h k l v q (o: U)";a[0][6]="h k l b r 5 O P M p s";a[0][7]="c b u j k l";a[0][8]="c b g N S";a[0][9]="c b g T";a[0][Q]="c b g R V";', 59, 59, '||||||||||gcion_zago_form_messages|must|You|new|var|Array|select|Your|Birth|your|Zip|Code|Year|of|Ex|in|invalid|be|length||enter|is|gcion_zago_start_year|between|field|1975|Gender|11|The|for|gcion_local_exceptions|gcion_external_exceptions|each|required|occurred|following|errors|and|less|Job|characters|or|10|Company|Title|Industry|47012|Size|gcion_zago_end_year'.split('|'), 0, {}))
/*
******************************************************************************
       File: GCIONSiteSettings.js
  Copyright: Copyright (c) 2008, Gannett Inc. All rights reserved.
******************************************************************************
*/

/* ==================================================================== */
/* Defines common site settings                                         */
/* ==================================================================== */

var gdn_version       = 3.3;
var gdn_common_url    = "http://ksdk.ur.gcion.com/Scripts/UA";
var gdn_cookie_domain = "";
var gdn_host          = "broadcast.app30.ur.gcion.com";
var gdn_site_name     = "ksdk.com";
var gdn_site_url      = "www.ksdk.com";

/* ==================================================================== */
/* Defines site settings for user authentication                        */
/* ==================================================================== */

var gdn_enable_auth_by_site        = true;
var gdn_enable_third_party_by_site = false;
var gdn_enable_ssl                 = false;
var gdn_enable_reg_help            = true;
var gdn_enable_search              = true;
var gdn_enable_links               = true;
var gdn_group_name                 = "gannett";
var gdn_app_name                   = "ksdk";
var gdn_third_party_app_name       = "MMX";
var gdn_third_party_site_name      = "Metromix";
var gdn_third_party_logo           = "/graphics/mmx_logo.jpg";
var gdn_login_title                = "Comment, blog &#38; share photos";
var gdn_login_image                = "/graphics/registration/login_tagline.gif";
var gdn_persona_url                = "/life/community/persona.aspx";
var gdn_blogs_url                  = "/life/community/persona.aspx?plckPersonaPage=PersonaBlog";
var gdn_photos_url                 = "/life/community/persona.aspx?plckPersonaPage=PersonaPhotos";
var gdn_default_avatar             = "/graphics/avatar.gif";
var gdn_tos_url                    = "/terms";
var gdn_pp_url                     = "/privacy";
var gdn_faq_url                    = "/faq";
var gdn_feedback_url               = "/feedback";
var gdn_confirm_dest               = "/news";
var gdn_email_logo                 = "/graphics/email_logo.jpg";

/* ==================================================================== */
/* Defines Saxotech settings for user authentication                    */
/* ==================================================================== */

var gdn_enable_saxotech    = false;
var gdn_saxotech_site_code = "";

/* ==================================================================== */
/* Defines site settings for user registration                          */
/* ==================================================================== */

var gdn_enable_reg_by_site = true;
var gdn_reg_site_code      = "gntbcstksdk";
var gdn_zag_form_url       = "/ur/zago-form.aspx";

/* ==================================================================== */
/* Defines user registration exceptions for local site URLs             */
/* ==================================================================== */

gdn_local_ex[0] = "/section(1|3).html";
gdn_local_ex[1] = "/article-1-2.html";
gdn_local_ex[2] = "/section4/*";
gdn_local_ex[3] = "/Weather";
gdn_local_ex[4] = "/video/*";
gdn_local_ex[5] = "/weather/*";
gdn_local_ex[6] = "/news/breaking/*";
gdn_local_ex[7] = "/company/*";


/* ==================================================================== */
/* Defines user registration exceptions for external site URLs          */
/* ==================================================================== */

gdn_ext_ex[0] = "http://www.gannett.com/";
gdn_ext_ex[1] = "http://www.gmti.com/";
var GDN=window.GDN||{};GDN.namespace=function(nameSpace){if(!nameSpace||!nameSpace.length)return null;var levels=nameSpace.split(".");var currentNamespace=GDN;for(var i=(levels[0]=="GDN")?1:0;i<levels.length;++i){currentNamespace[levels[i]]=currentNamespace[levels[i]]||{};currentNamespace=currentNamespace[levels[i]]}return currentNamespace};GDN.namespace("Cookies");GDN.namespace("UA");GDN.namespace("UA.Events");GDN.namespace("UR");GDN.namespace("UR.Events");var gdn_AuthService="GDNAuth.ashx";var gdn_ExtrovertService="Extrovert/GDNExtrovert.ashx";var gdn_MaxSessions=10;var gdn_RegService="GCION.ashx";var gdn_Version="3.4.2";var gdn_Actions=[];var gdn_Divs=[];var gdn_Timers=[];var gdn_Timeouts=[];var gdn_TimeoutIds=[];var gdn_Requests=[];var gdn_Widgets=[];gdn_Actions["Login"]=0;gdn_Actions["Refresh"]=0;gdn_Actions["Reg"]=0;gdn_Actions["RegThanks"]=0;gdn_Divs["ErrorSummary-Inline"]="UAErrorSummary-Inline";gdn_Divs["ErrorSummary-PopUp"]="UAErrorSummary-PopUp";gdn_Divs["ErrorSummary-ThirdPartyInline"]="UAErrorSummary-ThirdPartyInline";gdn_Divs["ErrorSummary-ThirdPartyPopUp"]="UAErrorSummary-ThirdPartyPopUp";gdn_Divs["Login"]="login-container";gdn_Divs["Newsletters"]="newsletter-subscription";gdn_Divs["NewslettersList"]="Newsletters";gdn_Divs["PluckLogin"]="pluck-signin";gdn_Divs["PluckReg"]="pluck-register";gdn_Divs["PluckLogout"]="pluck-signout";gdn_Divs["SaxotechLogin"]="saxotech-login";gdn_Divs["Status-Inline"]="UAStatus-Inline";gdn_Divs["Status-PopUp"]="UAStatus-PopUp";gdn_Divs["Status-ThirdPartyInline"]="UAStatus-ThirdPartyInline";gdn_Divs["Status-ThirdPartyPopUp"]="UAStatus-ThirdPartyPopUp";gdn_Divs["CustomStatus-PopUp"]="UACustomStatus-PopUp";gdn_Divs["CustomStatus-Inline"]="UACustomStatus-Inline";gdn_Timeouts["Avatar"]=5;gdn_Timeouts["Element"]=30;gdn_TimeoutIds["Default"]=0;GDN.AddHandler=function(object,type,fns){if(object.addEventListener){object.addEventListener(type,fns,false);return true}else if(object.attachEvent)return object.attachEvent('on'+type,fns);else object['on'+type]=fns};GDN.AddListener=function(elementName,callback){if(gdn_Timers[elementName]==null)gdn_Timers[elementName]=0;if(document.getElementById(elementName)){window.clearTimeout(gdn_TimeoutIds[elementName]);gdn_Timers[elementName]=0;if(callback)callback.call()}else{if(gdn_Timers[elementName]<(gdn_Timeouts["Element"]*1000)){gdn_TimeoutIds[elementName]=window.setTimeout("GDN.AddListener('"+elementName+"', "+callback+")",100);gdn_Timers[elementName]+=100}else{gdn_Timers[elementName]=0}}};GDN.AppendParam=function(url,name,value){if(url.indexOf("?")==-1)return url+"?"+name+"="+escape(value);else return url+"&"+name+"="+escape(value)};GDN.CombinePath=function(url,path,secure){if(secure){if(url.substr(0,7)!="https://")var absUrl="https://"+url;else var absUrl=url}else{if(url.substr(0,7)!="http://")var absUrl="http://"+url;else var absUrl=url}if(path.charAt(0)!="/")absUrl+="/"+path;else absUrl+=path;return absUrl};GDN.Disable=function(){if((document.getElementById(gdn_Divs["PluckLogin"])))var element="PluckLogin";if((document.getElementById(gdn_Divs["PluckReg"])))var element="PluckReg";if((document.getElementById(gdn_Divs["SaxotechLogin"])))var element="SaxotechLogin";if((document.getElementById(gdn_Divs["Newsletters"])))var element="Newsletters";if((document.getElementById(gdn_Divs["Login"])))var element="Login";if(document.getElementById(gdn_Divs[element]))GDN.Widget.Load("inline","MaintenanceMode","gdn_Widgets['MaintenanceMode']","gdn_Divs['"+element+"']")};GDN.GetAge=function(yob){var today=new Date();return(!GDN.IsNullOrEmpty(yob))?(today.getFullYear()-yob):0};GDN.GetCreationDate=function(){var today=new Date();return today.getFullYear().toString()+(((today.getMonth()+1)<10)?("0"+(today.getMonth()+1).toString()):(today.getMonth()+1).toString())+((today.getDate()<10)?("0"+today.getDate().toString()):(today.getDate().toString()))};GDN.GetDataType=function(value){if(value==true||value==false)return value;else if(GDN.IsNullOrEmpty(value))return'null';else if(!isNaN(value))return value;else return'"'+value+'"'};GDN.GetDomainName=function(){var domain=window.location.host;var match=/([\w-]+)\.[a-zA-Z]{2,3}$/i.exec(domain);domain=match?"."+match[0]:domain;try{if(gdn_cookie_domain)return"."+gdn_cookie_domain;else return domain}catch(e){return domain}};GDN.GetMessage=function(key){return gdn_msgs[gdn_language][key]};GDN.GetVersion=function(type){switch(type){case"Cookie":{if(!GDN.Cookie.Exists("GCIONID"))return 1;var cookie=GDN.Base64.Decode(GDN.Cookie.Get("GCIONID"));var parts=cookie.split('~');return parts[1]}default:return gdn_Version}};GDN.IsNullOrEmpty=function(object){if(object==null||(object==''&&'number'!=typeof object)||object.Length==0||object=="null"||object=="undefined"||object==undefined||object.toString().replace(/^\s+|\s+$/,'')==""){return true}else return false};GDN.LoadFile=function(file,type,callback){switch(type){case"UAEvents":var url=GDN.CombinePath(gdn_common_url,"UA/Events/"+file+".js");break;case"UAWidgets":var url=GDN.CombinePath(gdn_common_url,"UA/Widgets/"+file+".js");break;case"UREvents":var url=GDN.CombinePath(gdn_common_url,"UR/Events/"+file+".js");break;default:var url=GDN.CombinePath(gdn_common_url,file+".js");break}if(!GDN.Rpc.IsLoaded(url)){if(callback)GDN.Callback.Add(callback);GDN.Rpc.Send(url)}else{if(callback)callback.call()}};GDN.SetFocus=function(name){var form=document.getElementById(name);try{for(var i=0;i<form.elements.length;i++){if(/text/.test(form.elements[i].type)||/password/.test(form.elements[i].type)){form.elements[i].focus();break}}}catch(e){}};GDN.SetInnerHtml=function(elementName,html){var layer;if(document.layers){layer=document.layers[elementName];layer.document.open();layer.document.write(html);layer.document.close()}if(document.all){layer=document.all[elementName];layer.innerHTML=html}if(document.getElementById){layer=document.getElementById(elementName);layer.innerHTML=html}};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};GDN.Ajax=function(){var _callback=null;var _isAsync=true;var _method="GET";var _readyState=4;var _request=Init();var _requestBody=null;var _requestUrl=null;var _responseText=null;var _responseXml=null;var _statusCode=200;this.Callback=Callback;this.IsAsync=IsAsync;this.Method=Method;this.RequestUrl=RequestUrl;this.ResponseText=ResponseText;this.ResponseXml=ResponseXml;this.RequestBody=RequestBody;this.Send=Send;function Callback(callback){_callback=callback}function Init(){try{return new XMLHttpRequest()}catch(e){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return null}}}}function IsAsync(value){if(value)_isAsync=value;else return _isAsync}function Method(value){if(value)_method=value;else return _method}function RequestBody(value){_requestBody=value}function RequestUrl(value){if(value)_requestUrl=value;else return _requestUrl}function ResponseText(){return _responseText}function ResponseXml(){return _responseXml}function Send(){if(_request){_request.onreadystatechange=function(){if(_request.readyState==_readyState){if(_request.status==_statusCode){_responseText=_request.responseText;_responseXml=_request.responseXML;_callback.call()}}}}_request.open(_method,_requestUrl,_isAsync);_request.send(_requestBody)}};GDN.Api={Invoke:function(eventType){var fns=GDN.Api.Methods;var par=GDN.Api.Params;var evt=GDN.Api.Events;for(var i=0;i<evt.length;i++){if(evt[i].toLowerCase()==eventType.toLowerCase())fns[i].apply(GDN,new Array(par[i]))}},Register:function(method,param,eventType){GDN.Api.Methods.push(method);GDN.Api.Params.push(param);GDN.Api.Events.push(eventType)}};if(!GDN.Api.Methods)GDN.Api.Methods=[];if(!GDN.Api.Params)GDN.Api.Params=[];if(!GDN.Api.Events)GDN.Api.Events=[];GDN.Base64={Key:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Decode:function(value){var keyStr=this.Key;var output="";var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var i=0;value=value.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(value.charAt(i++));enc2=keyStr.indexOf(value.charAt(i++));enc3=keyStr.indexOf(value.charAt(i++));enc4=keyStr.indexOf(value.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64)output=output+String.fromCharCode(chr2);if(enc4!=64)output=output+String.fromCharCode(chr3);chr1=chr2=chr3="";enc1=enc2=enc3=enc4=""}while(i<value.length);return output},Encode:function(value){var keyStr=this.Key;var output="";var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var i=0;do{chr1=value.charCodeAt(i++);chr2=value.charCodeAt(i++);chr3=value.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2))enc3=enc4=64;else if(isNaN(chr3))enc4=64;output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);chr1=chr2=chr3="";enc1=enc2=enc3=enc4=""}while(i<value.length);return output}};GDN.Callback={Add:function(handler){if(GDN.Callback.Handlers.length>0)GDN.Callback.Handlers=[];GDN.Callback.Handlers.push(handler)},Invoke:function(){var fns=GDN.Callback.Handlers;for(var n=0;n<fns.length;n++)fns[n].apply(GDN,arguments)}};if(!GDN.Callback.Handlers)GDN.Callback.Handlers=[];GDN.Cookie={Exists:function(name){var cookieString=document.cookie;var cookieSet=cookieString.split(';');var setSize=cookieSet.length;var cookiePieces="";var cookieData="";for(var x=0;((x<setSize)&&(cookieData==""));x++){cookiePieces=cookieSet[x].split('=');if(cookiePieces[0].substring(0,1)==' ')cookiePieces[0]=cookiePieces[0].substring(1,cookiePieces[0].length);if(cookiePieces[0]==name)return true}return false},Get:function(name){var values=(' '+document.cookie).match(new RegExp(' '+name+'=[^;]*','g'))||[];var length=0;var result=null;for(var i=0;i<values.length;i++){if(values[i].length>length){length=values[i].length;result=unescape(values[i].substring(2+name.length))}}return result},Remove:function(name,path,domain,relative){if(this.Get(name)){document.cookie=name+'='+((path)?';path='+path:';path='+'\/')+((domain)?';domain='+domain:';domain='+((relative)?domain:GDN.GetDomainName()))+';expires=Thu, 01-Jan-1970 00:00:01 GMT'}},Set:function(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires)expires=expires*1000*60*60*24;var expirationDate=new Date(today.getTime()+(expires));document.cookie=name+'='+value+((expires)?';expires='+expirationDate.toGMTString():'')+((path)?';path='+path:';path='+'\/')+((domain)?';domain='+domain:';domain='+GDN.GetDomainName())+((secure)?';secure':'')}};GDN.Json=function(){var _attributes=[];var _names=[];var _values=[];this.Add=Add;this.AddAttribute=AddAttribute;this.Clear=Clear;this.HasEntries=HasEntries;this.ToString=ToString;function Add(name,value){_names.push(name);_values.push(value)}function AddAttribute(name,value){_attributes.push('{"Key":"'+name+'","Value":"'+value+'"}')}function Clear(){_attributes=[];_names=[];_values=[]}function HasEntries(){if(_names.length==0)return false;else return true}function ToString(){if(!this.HasEntries())return null;var json='{';for(var i=0;i<_names.length;i++){if(i!=_names.length-1)json+='"'+_names[i]+'"'+':'+GDN.GetDataType(_values[i])+',';else json+='"'+_names[i]+'"'+':'+GDN.GetDataType(_values[i])}if(_attributes.length>0){json+=',"Attributes":[';for(var i=0;i<_attributes.length;i++){if(i!=_attributes.length-1)json+=_attributes[i]+',';else json+=_attributes[i]+']'}}json+='}';return json}};GDN.Request={Init:function(){this.params=new Object();var querystring=location.search.substring(1,location.search.length);if(querystring.length==0)return;querystring=querystring.replace(/\+/g,' ');var args=querystring.split('&');for(var i=0;i<args.length;i++){var value;var pair=args[i].split('=');var name=unescape(pair[0].toString().toLowerCase());if(pair.length==2)value=unescape(pair[1]);else value=name;this.params[name]=value}},QueryString:function(name,defaultValue){if(defaultValue==null)defaultValue=null;var value=this.params[name.toLowerCase()];if(value==null)value=defaultValue;return value}};GDN.Request.Init();GDN.Rpc={Create:function(requestUrl){var htmlTag=document.getElementsByTagName('head').item(0);var scriptTag=document.createElement('script');scriptTag.setAttribute('language','javascript');scriptTag.setAttribute('type','text/javascript');scriptTag.setAttribute('src',requestUrl);htmlTag.appendChild(scriptTag);return false},IsLoaded:function(requestUrl){for(var i=0;i<gdn_Requests.length;i++){if(gdn_Requests[i]==requestUrl)return true}return false},Send:function(requestUrl){if(!this.IsLoaded(requestUrl)){gdn_Requests[gdn_Requests.length]=requestUrl;this.Create(requestUrl)}}};GDN.Cookies.Session={Name:"GCIONSN",GetValue:function(key){if(!GDN.Cookie.Exists(this.Name))return null;var cookie=GDN.Base64.Decode(GDN.Cookie.Get(this.Name));var pairs=cookie.split('~');for(var i=0;i<pairs.length;i++){var pair=pairs[i].split(':');if(key==pair[0])return pair[1]}return null},SetValue:function(key,value){if(GDN.Cookie.Exists(this.Name)){var cookie=GDN.Base64.Decode(GDN.Cookie.Get(this.Name));var pairs=cookie.split('~');var keyExists=false;for(var i=0;i<pairs.length;i++){var pair=pairs[i].split(':');if(key==pair[0]){keyExists=true;pairs[i]=pair[0]+":"+value}}if(!keyExists)pairs.push(key+":"+value);cookie=pairs.join('~')}else cookie=key+":"+value;GDN.Cookie.Set(this.Name,GDN.Base64.Encode(cookie))}};GDN.Widget={Code:null,Element:null,Name:null,Ref:null,Type:null,Url:null,Var:null,Pos:null,Width:350,Height:250,Callback:function(){if(GDN.Widget.Code)eval(GDN.Base64.Decode(GDN.Widget.Code));if(GDN.Widget.Type=="popup"){GDN.Widget.Show(eval(GDN.Widget.Var),GDN.Widget.Width,GDN.Widget.Height,GDN.Widget.Ref,GDN.Widget.Pos)}else GDN.SetInnerHtml(eval(GDN.Widget.Element),eval(GDN.Widget.Var))},Close:function(){try{cClick()}catch(e){}},GetFooter:function(){return'<a href=\"'+gdn_tos_url+'\">Terms of Service</a> | '+'<a href=\"'+gdn_pp_url+'\">Privacy Policy</a> | '+'<a href=\"'+gdn_faq_url+'\">FAQ</a> | '+'<a href=\"'+gdn_feedback_url+'\">Feedback</a>'+'<hr class=\"GDNLine\" />'+GDN.Widget.GetCloseWindow()},GetCloseWindow:function(){return'<a href=\"javascript:GDN.Widget.Close();\">Close this window</a>'},Load:function(){this.Type=arguments[0];this.Name=arguments[1];this.Var=unescape(arguments[2]);this.Url=GDN.CombinePath(gdn_common_url,"UA/Widgets/"+this.Name+".js");if(this.Type=="popup"){this.Width=arguments[3];this.Height=arguments[4];this.Code=arguments[5];this.Ref=(arguments[6])?arguments[6]:"UAWidgetRef-PopUp";this.Pos=arguments[7]}else{this.Element=arguments[3];this.Code=arguments[4]}if(GDN.IsNullOrEmpty(eval(this.Var))){GDN.Callback.Add(GDN.Widget.Callback);if(this.Name!="LoggedIn"&&this.Name!="LoggedOut")GDN.LoadFile("UI");if(!GDN.Rpc.IsLoaded(this.Url))GDN.Rpc.Send(this.Url)}else{GDN.Widget.Callback();if(this.Name=="LoggedIn"){var pluckPersonaImg=document.getElementById("PluckPersonaImg");var avatarImg=document.getElementById("AvatarImg");var screenName=document.getElementById("ScreenName");var pluckPersona=document.getElementById("PluckPersona");var pluckPhotos=document.getElementById("PluckPhotos");var pluckBlogs=document.getElementById("PluckBlogs");pluckPersonaImg.href=GDN.AppendParam(gdn_persona_url,"U",GDN.Cookies.Pluck.GetValue("UserId"));pluckPersona.href=GDN.AppendParam(gdn_persona_url,"U",GDN.Cookies.Pluck.GetValue("UserId"));pluckPhotos.href=GDN.AppendParam(gdn_photos_url,"U",GDN.Cookies.Pluck.GetValue("UserId"));pluckBlogs.href=GDN.AppendParam(gdn_blogs_url,"U",GDN.Cookies.Pluck.GetValue("UserId"));avatarImg.src=GDN.Avatar();GDN.SetInnerHtml("ScreenName","hi, "+GDN.Cookies.GDN.GetValue("UserName")+"!")}}},Show:function(widget,width,height,ref){if(GDN.IsNullOrEmpty(arguments[4]))var position="UL";else var position=arguments[4];try{overlib(widget,STICKY,WIDTH,width,HEIGHT,height,REF,ref,REFC,position,REFP,position,REFX,0,REFY,0,BGCLASS,"UAWidget-PopUpBorder",FGCLASS,"UAWidget-PopUpBg")}catch(e){}}};GDN.AuthUrl=function(parameters){var url=GDN.CombinePath(gdn_host,gdn_AuthService,gdn_enable_ssl);if(!GDN.IsNullOrEmpty(parameters))url+="?"+parameters+"&CacheDefeat="+new Date().getTime();return url};GDN.Avatar=function(){if(GDN.Cookies.Session.GetValue("sta")==GDN.UA.UserStatus.Success){if(!GDN.IsNullOrEmpty(GDN.Cookies.GDN.GetValue("Avatar")))return decodeURIComponent(GDN.Cookies.GDN.GetValue("Avatar"));else return gdn_default_avatar}else return gdn_default_avatar};GDN.ExtrovertUrl=function(parameters){var url=GDN.CombinePath(gdn_host,gdn_ExtrovertService,gdn_enable_ssl);if(!GDN.IsNullOrEmpty(parameters))url+="?"+parameters+"&CacheDefeat="+new Date().getTime();return url};GDN.LoginTitleTag=function(){if(!GDN.IsNullOrEmpty(gdn_login_image))return'<img src="'+gdn_login_image+'" alt="'+gdn_login_title+'" title="'+gdn_login_title+'" border="0" style=\"margin-left: 0px; float: left;\" />';else return'<h3>'+gdn_login_title+'</h3>'};GDN.Refresh=function(widget){switch(gdn_Actions["Refresh"]){case 1:window.location.href=GDN.Request.QueryString("Destination");break;case 2:{try{if(gdn_auto_refresh||gdn_login_redirect){window.location.reload();var clientReload=false}else var clientReload=true}catch(e){var clientReload=true}if(clientReload){if(widget)eval(widget);GDN.Widget.Close()}}break}};GDN.SaveAvatar=function(){if(!GDN.IsNullOrEmpty(gsl.personaHref)){if(GDN.Cookie.Exists(GDN.Cookies.GDN.Name)){var user=GDN.Cookies.GDN.Get();user.SetAttribute("Avatar",encodeURIComponent(gsl.personaHref));GDN.Cookies.GDN.Set(user);window.clearTimeout(gdn_TimeoutIds["Default"])}}else{gdn_TimeoutIds["Default"]=window.setTimeout("GDN.SaveAvatar()",500)}};GDN.UpdateAvatar=function(){if(gdn_Timers["UpdateAvatar"]==null)gdn_Timers["UpdateAvatar"]=0;if(gdn_Actions["Login"]==1)var status=gdn_Divs["Status-PopUp"];else if(gdn_Actions["Login"]==2)var status=gdn_Divs["Status-Inline"];else var status=null;if(!GDN.IsNullOrEmpty(gsl.personaHref)){if(GDN.Cookie.Exists(GDN.Cookies.GDN.Name)){var user=GDN.Cookies.GDN.Get();user.SetAttribute("Avatar",encodeURIComponent(gsl.personaHref));GDN.Cookies.GDN.Set(user);window.clearTimeout(gdn_TimeoutIds["Default"]);gdn_Timers["UpdateAvatar"]=0;GDN.Refresh('GDN.Widget.Load("inline", "LoggedIn", "gdn_Widgets[\'LoggedIn\']", "gdn_Divs[\'Login\']", "'+GDN.Base64.Encode('window.setTimeout("GDN.Api.Invoke(\'LoggedIn\')", 500)')+'")')}}else{if(gdn_Timers["UpdateAvatar"]<(gdn_Timeouts["Avatar"]*1000)){if(!GDN.IsNullOrEmpty(status))GDN.SetInnerHtml(status,GDN.GetMessage("LoginExec"));gdn_TimeoutIds["Default"]=window.setTimeout("GDN.UpdateAvatar()",500);gdn_Timers["UpdateAvatar"]+=500}else{gdn_Timers["UpdateAvatar"]=0;GDN.Refresh('GDN.Widget.Load("inline", "LoggedIn", "gdn_Widgets[\'LoggedIn\']", "gdn_Divs[\'Login\']", "'+GDN.Base64.Encode('window.setTimeout("GDN.Api.Invoke(\'LoggedIn\')", 500)')+'")')}}};GDN.Page={SaveAvatar:function(){GDN.SaveAvatar()}};GDN.Cookies.GDN={CoppaFormat:"{gannettid}~{version}~{date_created}~{status}~"+"uid:{uid}|usr:{usr}|adr:{adr}|aln:{aln}|tim:{tim}|"+"hsh:{hsh}|ava:{ava}|sax:0",Expires:365,Format:"{gannettid}~{version}~{date_created}~{status}~"+"uid:{uid}|usr:{usr}|adr:{adr}|fnm:{fnm}|lnm:{lnm}|"+"aln:{aln}|cou:{cou}|gen:{gen}|sta:{sta}|yob:{yob}|"+"zip:{zip}|tim:{tim}|hsh:{hsh}|ava:{ava}|sax:0",Name:"GCIONID",Version:"3",Get:function(){var user=new GDN.UA.User();user.AutoLogin(this.GetValue("AutoLogin"));user.Country(this.GetValue("Country"));user.Email(this.GetValue("Email"));user.FirstName(this.GetValue("FirstName"));user.GannettId(this.GetValue("GannettId"));user.Gender(this.GetValue("Gender"));user.LastName(this.GetValue("LastName"));user.State(this.GetValue("State"));user.UserId(this.GetValue("UserId"));user.UserName(this.GetValue("UserName"));user.Yob(this.GetValue("Yob"));user.Zip(this.GetValue("Zip"));user.SetAttribute("Avatar",this.GetValue("Avatar"));user.SetAttribute("Hash",this.GetValue("Hash"));user.SetAttribute("Timestamp",this.GetValue("Timestamp"));user.Status(GDN.Cookies.Session.GetValue("sta"));return user},GetMatch:function(key){switch(key){case"AutoLogin":return"aln";case"Avatar":return"ava";case"Country":return"cou";case"Email":return"adr";case"FirstName":return"fnm";case"Gender":return"gen";case"Hash":return"hsh";case"LastName":return"lnm";case"State":return"sta";case"Timestamp":return"tim";case"UserId":return"uid";case"UserName":return"usr";case"Yob":return"yob";case"Zip":return"zip"}return null},GetValue:function(key){if(!GDN.Cookie.Exists(this.Name))return null;var cookie=GDN.Base64.Decode(GDN.Cookie.Get(this.Name));var parts=cookie.split('~');switch(key){case"GannettId":return parts[0];case"Version":return parts[1];case"DateCreated":return parts[2];default:{if(parts.length==5){var pairs=parts[4].split('|');var match=this.GetMatch(key);for(var i=0;i<pairs.length;i++){var pair=pairs[i].split(':');if(match==pair[0])return pair[1]}}else return null}break}return null},Set:function(user){if((user.Yob()<=0)||(GDN.GetAge(user.Yob())<14)){var cookie=this.CoppaFormat;cookie=cookie.replace(/{gannettid}/gi,0);cookie=cookie.replace(/{date_created}/gi,GDN.GetCreationDate());cookie=cookie.replace(/{version}/gi,this.Version);cookie=cookie.replace(/{status}/gi,16);cookie=cookie.replace(/{uid}/gi,0);cookie=cookie.replace(/{usr}/gi,user.UserName());cookie=cookie.replace(/{adr}/gi,user.Email());cookie=cookie.replace(/{aln}/gi,user.AutoLogin())}else{var cookie=this.Format;cookie=cookie.replace(/{gannettid}/gi,(user.GetAttribute("EncryptedGannettId"))?user.GetAttribute("EncryptedGannettId"):user.GannettId());cookie=cookie.replace(/{date_created}/gi,GDN.GetCreationDate());cookie=cookie.replace(/{version}/gi,this.Version);cookie=cookie.replace(/{status}/gi,2);cookie=cookie.replace(/{uid}/gi,(user.GetAttribute("EncryptedUserId"))?user.GetAttribute("EncryptedUserId"):user.UserId());cookie=cookie.replace(/{usr}/gi,user.UserName());cookie=cookie.replace(/{adr}/gi,user.Email());cookie=cookie.replace(/{aln}/gi,user.AutoLogin());cookie=cookie.replace(/{cou}/gi,user.Country());cookie=cookie.replace(/{gen}/gi,user.Gender());cookie=cookie.replace(/{sta}/gi,user.State());cookie=cookie.replace(/{yob}/gi,user.Yob());cookie=cookie.replace(/{zip}/gi,user.Zip());cookie=cookie.replace(/{fnm}/gi,(user.FirstName()!="None")?user.FirstName():"None");cookie=cookie.replace(/{lnm}/gi,(user.LastName()!="None")?user.LastName():"None")}cookie=cookie.replace(/{ava}/gi,(user.GetAttribute("Avatar"))?user.GetAttribute("Avatar"):null);cookie=cookie.replace(/{hsh}/gi,(user.GetAttribute("Hash"))?user.GetAttribute("Hash"):null);cookie=cookie.replace(/{tim}/gi,(user.GetAttribute("Timestamp"))?user.GetAttribute("Timestamp"):null);GDN.Cookie.Set(this.Name,GDN.Base64.Encode(cookie),this.Expires);GDN.Cookies.Session.SetValue("sta",user.Status());GDN.Cookies.Session.SetValue("sts",(user.Status()==0)?"Success":"Failed")}};GDN.UA.Page={AutoLogin:function(){var user=new GDN.UA.User(GDN.UA.UserData);if(user.Status()==GDN.UA.UserStatus.Success){user.AutoLogin(GDN.Cookies.GDN.GetValue("AutoLogin"));user.SetAttribute("Avatar",GDN.Cookies.GDN.GetValue("Avatar"));GDN.Cookies.GDN.Set(user);GDN.Cookies.Pluck.Set(user);GDN.Api.Invoke("Login");GDN.Widget.Load("inline","LoggedIn","gdn_Widgets['LoggedIn']","gdn_Divs['Login']",GDN.Base64.Encode('window.setTimeout("GDN.Api.Invoke(\'LoggedIn\')", 500)'));if(GDN.Cookies.GCION.GetValue("Status")==16&&GDN.Cookies.GDN.GetValue("GannettId")==0)document.cookie="GCIONID =0;path=/;domain=."+gdn_site_name+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}else{GDN.Widget.Load("inline","LoggedOut","gdn_Widgets['LoggedOut']","gdn_Divs['Login']",GDN.Base64.Encode('window.setTimeout("GDN.Api.Invoke(\'LoggedOut\')", 500)'));if(GDN.Cookies.GCION.GetValue("Status")==16&&GDN.Cookies.GDN.GetValue("GannettId")==0)document.cookie="GCIONID =0;path=/;domain=."+gdn_site_name+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}},Load:function(){if(document.getElementById(gdn_Divs["Login"])){if(GDN.Cookie.Exists(GDN.Cookies.GDN.Name)){var user=GDN.Cookies.GDN.Get();if(user.Status()==GDN.UA.UserStatus.Success){GDN.Widget.Load("inline","LoggedIn","gdn_Widgets['LoggedIn']","gdn_Divs['Login']",GDN.Base64.Encode('window.setTimeout("GDN.Api.Invoke(\'LoggedIn\')", 500)'));if(GDN.Cookies.GCION.GetValue("Status")==16&&GDN.Cookies.GDN.GetValue("GannettId")==0)document.cookie="GCIONID =0;path=/;domain=."+gdn_site_name+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}else if(user.AutoLogin()=="true"){GDN.Callback.Add(GDN.UA.Page.AutoLogin);GDN.UA.UserProvider.Get(user)}else{GDN.Widget.Load("inline","LoggedOut","gdn_Widgets['LoggedOut']","gdn_Divs['Login']",GDN.Base64.Encode('window.setTimeout("GDN.Api.Invoke(\'LoggedOut\')", 500)'));if(GDN.Cookies.GCION.GetValue("Status")==16&&GDN.Cookies.GDN.GetValue("GannettId")==0)document.cookie="GCIONID =0;path=/;domain=."+gdn_site_name+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}else{GDN.Widget.Load("inline","LoggedOut","gdn_Widgets['LoggedOut']","gdn_Divs['Login']",GDN.Base64.Encode('window.setTimeout("GDN.Api.Invoke(\'LoggedOut\')", 500)'))}}},Newsletters:function(){if(document.getElementById(gdn_Divs["Newsletters"])){GDN.Widget.Load("inline","Newsletters","gdn_Widgets['Newsletters']","gdn_Divs['Newsletters']")}},PluckLogin:function(){if(document.getElementById(gdn_Divs["PluckLogin"])){GDN.Widget.Load("inline","PluckLogin","gdn_Widgets['PluckLogin']","gdn_Divs['PluckLogin']",GDN.Base64.Encode("gdn_Actions['Refresh'] = 1;gdn_Actions['Login'] = 2;window.setTimeout(\"GDN.SetFocus('UAWidget-PluckLogin')\", 500);"))}},PluckLogout:function(){if(document.getElementById(gdn_Divs["PluckLogout"])){if(GDN.Cookies.Session.GetValue("sts")==GDN.UA.UserStatus.Success){gdn_Actions["Refresh"]=1;if(!GDN.Rpc.IsLoaded(GDN.CombinePath(gdn_common_url+"/UA/Events","Logout.js")))GDN.LoadFile("Logout","UAEvents");else GDN.UA.Events.Logout.Execute()}else window.location.href=GDN.Request.QueryString("Destination")}},PluckReg:function(){if(document.getElementById(gdn_Divs["PluckReg"])){GDN.Widget.Load("inline","PluckRegistration","gdn_Widgets['PluckReg']","gdn_Divs['PluckReg']",GDN.Base64.Encode("gdn_Actions['Reg'] = 2;window.setTimeout(\"GDN.SetFocus('UAWidget-PluckRegistration')\", 500);"))}},SaxotechLogin:function(){if(document.getElementById(gdn_Divs["SaxotechLogin"])){GDN.Widget.Load("inline","SaxotechLogin","gdn_Widgets['SaxotechLogin']","gdn_Divs['SaxotechLogin']",GDN.Base64.Encode("gdn_Actions['Refresh'] = 2;gdn_Actions['Login'] = 2;window.setTimeout(\"GDN.SetFocus(\'UAWidget-SaxotechLogin\')\", 500);"));if(GDN.Cookie.Exists(GDN.Cookies.GDN.Name)){var user=GDN.Cookies.GDN.Get();if(user.AutoLogin()=="true"){user.Status(GDN.UA.UserStatus.Success);GDN.Cookies.Session.SetValue("sta",user.Status());GDN.Cookies.Session.SetValue("sts",(user.Status()==0)?"Success":"Failed")}}}},SaveAvatar:function(){GDN.SaveAvatar()}};GDN.Cookies.Pluck={CoppaFormat:"a={a}&u={u}&e={e}&t={t}&h={h}&s={s}",Format:"a={a}&u={u}&e={e}&f={f}&l={l}&g={g}&t={t}&h={h}&s={s}",Name:"at",GetMatch:function(key){switch(key){case"Email":return"e";case"FirstName":return"f";case"Gender":return"g";case"Hash":return"h";case"LastName":return"l";case"RegisteredApplications":return"s";case"Timestamp":return"t";case"UserId":return"u";case"UserName":return"a"}return null},GetValue:function(key){if(!GDN.Cookie.Exists(this.Name))return null;var cookie=unescape(GDN.Cookie.Get(this.Name));var pairs=cookie.split('&');var match=this.GetMatch(key);for(var i=0;i<pairs.length;i++){var pair=pairs[i].split('=');if(match==pair[0])return pair[1]}return null},Set:function(user){if((user.Yob()<=0)||(GDN.GetAge(user.Yob())<14)){var cookie=this.CoppaFormat;cookie=cookie.replace(/{a}/gi,user.UserName());cookie=cookie.replace(/{u}/gi,user.UserId().replace(/\-/gi,""));cookie=cookie.replace(/{e}/gi,user.Email());cookie=cookie.replace(/{t}/gi,user.GetAttribute("Timestamp"));cookie=cookie.replace(/{h}/gi,user.GetAttribute("Hash"));cookie=cookie.replace(/{s}/gi,user.GetAttribute("RegisteredApplications"))}else{var cookie=this.Format;cookie=cookie.replace(/{a}/gi,user.UserName());cookie=cookie.replace(/{u}/gi,user.UserId().replace(/\-/gi,""));cookie=cookie.replace(/{e}/gi,user.Email());cookie=cookie.replace(/{g}/gi,(user.Gender()==2)?"M":"F");cookie=cookie.replace(/{t}/gi,user.GetAttribute("Timestamp"));cookie=cookie.replace(/{h}/gi,user.GetAttribute("Hash"));cookie=cookie.replace(/{s}/gi,user.GetAttribute("RegisteredApplications"));if(GDN.IsNullOrEmpty(user.FirstName())||user.FirstName()=="None")cookie=cookie.replace(/{f}/gi,"");else cookie=cookie.replace(/{f}/gi,user.FirstName());if(GDN.IsNullOrEmpty(user.LastName())||user.LastName()=="None")cookie=cookie.replace(/{l}/gi,"");else cookie=cookie.replace(/{l}/gi,user.LastName())}GDN.Cookie.Set(this.Name,escape(cookie).replace(/\@/gi,"%40"))}};GDN.UA.User=function(){var _attributes=[];var _autoLogin=false;var _country="us";var _email=null;var _firstName=null;var _gannettId=null;var _gender=0;var _isActivated=false;var _isLockedOut=false;var _isOnline=false;var _lastName=null;var _password=null;var _state=null;var _status=-1;var _userId=null;var _userName=null;var _yob=0;var _zip="00000";this.Attributes=function(){if(arguments[0])_attributes=arguments[0];else return _attributes};this.AutoLogin=function(){if(arguments[0])_autoLogin=arguments[0];else return _autoLogin};this.Country=function(){if(arguments[0])_country=arguments[0];else return _country};this.Email=function(){if(arguments[0])_email=arguments[0];else return _email};this.FirstName=function(){if(arguments[0])_firstName=arguments[0];else return _firstName};this.GannettId=function(){if(arguments[0])_gannettId=arguments[0];else return _gannettId};this.Gender=function(){if(arguments[0])_gender=arguments[0];else return _gender};this.IsActivated=function(){if(arguments[0])_isActivated=arguments[0];else return _isActivated};this.IsLockedOut=function(){if(arguments[0])_isLockedOut=arguments[0];else return _isLockedOut};this.IsOnline=function(){if(arguments[0])_isOnline=arguments[0];else return _isOnline};this.LastName=function(){if(arguments[0])_lastName=arguments[0];else return _lastName};this.Password=function(){if(arguments[0])_password=arguments[0];else return _password};this.State=function(){if(arguments[0])_state=arguments[0];else return _state};this.Status=function(){if(arguments[0])_status=arguments[0];else return _status};this.UserId=function(){if(arguments[0])_userId=arguments[0];else return _userId};this.UserName=function(){if(arguments[0])_userName=arguments[0];else return _userName};this.Yob=function(){if(arguments[0])_yob=arguments[0];else return _yob};this.Zip=function(){if(arguments[0])_zip=arguments[0];else return _zip};this.GetAttribute=GetAttribute;this.SetAttribute=SetAttribute;if(arguments[0])Init(arguments[0]);function Init(){_attributes=arguments[0].Attributes;_autoLogin=arguments[0].AutoLogin;_country=arguments[0].Country;_email=arguments[0].Email;_firstName=arguments[0].FirstName;_gannettId=arguments[0].GannettId;_gender=arguments[0].Gender;_isActivated=arguments[0].IsActivated;_isLockedOut=arguments[0].IsLockedOut;_isOnline=arguments[0].IsOnline;_lastName=arguments[0].LastName;_password=arguments[0].Password;_state=arguments[0].State;_status=arguments[0].Status;_userId=arguments[0].UserId;_userName=arguments[0].UserName;_yob=arguments[0].Yob;_zip=arguments[0].Zip}function GetAttribute(name){if(_attributes){for(var i=0;i<_attributes.length;i++){if(_attributes[i].Key==name)return _attributes[i].Value}}else return null}function SetAttribute(name,value){var keyExists=false;for(var i=0;i<_attributes.length;i++){if(_attributes[i].Key==name){keyExists=true;break}}if(!keyExists)_attributes.push({"Key":name,"Value":value});else{for(var i=0;i<_attributes.length;i++){if(_attributes[i].Key==name){_attributes.splice(i,1);_attributes.push({"Key":name,"Value":value});break}}}}};GDN.UA.UserProvider={ChangePassword:function(user){var querystring="q=5&c=1";var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("Email",user.Email());json.AddAttribute("GroupName",gdn_group_name);json.AddAttribute("NewPassword",user.GetAttribute("NewPassword"));json.AddAttribute("OldPassword",user.GetAttribute("OldPassword"));json.AddAttribute("Timestamp",GDN.Cookies.GDN.GetValue("Timestamp"));json.AddAttribute("Hash",GDN.Cookies.GDN.GetValue("Hash"));if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))},Create:function(user,destination){var querystring="q=1&c=1";if(user.Country()!="us")user.Zip("0");var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("AutoLogin",user.AutoLogin());json.Add("Country",user.Country());json.Add("Email",user.Email());json.Add("FirstName",user.FirstName());json.Add("Gender",user.Gender());json.Add("LastName",user.LastName());json.Add("Password",user.Password());json.Add("UserName",user.UserName());json.Add("Yob",user.Yob());json.Add("Zip",user.Zip());if(!GDN.IsNullOrEmpty(destination))json.AddAttribute("Destination",destination);if(gdn_Actions["RegThanks"]==2){json.AddAttribute("ThirdPartyApplicationName",gdn_third_party_app_name);json.AddAttribute("ThirdPartySiteId",user.GetAttribute("ThirdPartySiteId"));json.AddAttribute("ThirdPartyUserId",user.GetAttribute("ThirdPartyUserId"))}if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code);json.AddAttribute("Version",gdn_version)}querystring+="&u="+json.ToString();if(!isNaN(user.UserName()))querystring=querystring.replace(user.UserName(),'"'+user.UserName()+'"');GDN.Rpc.Send(GDN.AuthUrl(querystring))},Delete:function(user){var querystring="q=3&c=1";var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("Email",user.Email());json.AddAttribute("GroupName",gdn_group_name);json.AddAttribute("Timestamp",GDN.Cookies.GDN.GetValue("Timestamp"));json.AddAttribute("Hash",GDN.Cookies.GDN.GetValue("Hash"));if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))},Get:function(user){var querystring="q=7&c=1";var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("Email",user.Email());json.AddAttribute("GroupName",gdn_group_name);json.AddAttribute("Timestamp",GDN.Cookies.GDN.GetValue("Timestamp"));json.AddAttribute("Hash",GDN.Cookies.GDN.GetValue("Hash"));if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))},GetThirdPartyUser:function(user){var querystring="q=2&c=1";querystring+="&ThirdPartyApplicationName="+gdn_third_party_app_name;querystring+="&ApplicationName="+gdn_app_name;querystring+="&Email="+user.Email();querystring+="&Password="+user.Password();GDN.Rpc.Send(GDN.ExtrovertUrl(querystring))},ResendConfirmation:function(user,destination){var querystring="q=8&c=1";if(GDN.IsNullOrEmpty(destination)){destination=window.location.protocol+"//"+window.location.hostname+window.location.pathname+window.location.search}var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("Email",user.Email());if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("Custom",gdn_saxotech_site_code)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))},RetrievePassword:function(user){var querystring="q=6&c=1";var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("Email",user.Email());if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))},Update:function(user){var querystring="q=2&c=1";if(user.Country()!="us")user.Zip("0");var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("AutoLogin",user.AutoLogin());json.Add("Country",user.Country());json.Add("Email",user.Email());json.Add("FirstName",user.FirstName());json.Add("Gender",user.Gender());json.Add("LastName",user.LastName());json.Add("UserName",user.UserName());json.Add("Yob",user.Yob());json.Add("Zip",user.Zip());json.AddAttribute("GroupName",gdn_group_name);json.AddAttribute("CurrentUserName",GDN.Cookies.GDN.GetValue("UserName"));json.AddAttribute("Timestamp",GDN.Cookies.GDN.GetValue("Timestamp"));json.AddAttribute("Hash",GDN.Cookies.GDN.GetValue("Hash"));if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))},UpdateNewsletters:function(user,newsletters){var querystring="q=9&c=1";var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("Email",user.Email());if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code);json.AddAttribute("Newsletters",newsletters)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))},Validate:function(user){var querystring="q=4&c=1";var json=new GDN.Json();json.Add("ApplicationName",gdn_app_name);json.Add("AutoLogin",user.AutoLogin());json.Add("Email",user.Email());json.Add("Password",user.Password());json.AddAttribute("GroupName",gdn_group_name);if(gdn_enable_saxotech){json.AddAttribute("EnableSaxotech",gdn_enable_saxotech);json.AddAttribute("SaxotechSiteCode",gdn_saxotech_site_code)}querystring+="&u="+json.ToString();GDN.Rpc.Send(GDN.AuthUrl(querystring))}};GDN.UA.UserStatus={Success:0,Failed:1,Pending:2,NotFound:3,LockedOut:4,DuplicateEmail:5,DuplicateUserId:6,DuplicateUserName:7,InvalidAnswer:8,InvalidEmail:9,InvalidPassword:10,InvalidQuestion:11,InvalidUserId:12,InvalidUserName:13,InvalidZipCode:14};GDN.GetDays=function(date1,date2){var year1=date1.substring(0,4);var month1=date1.substring(4,6)-1;var day1=date1.substring(6,8);var year2=date2.substring(0,4);var month2=date2.substring(4,6)-1;var day2=date2.substring(6,8);var startDate=new Date(year1,month1,day1);var endDate=new Date(year2,month2,day2);var day=1000*60*60*24;return Math.abs(Math.ceil((endDate.getTime()-startDate.getTime())/(day)))};GDN.RegUrl=function(parameters){var url=GDN.CombinePath(gdn_host,gdn_RegService);if(!GDN.IsNullOrEmpty(parameters))url+="?"+parameters.replace(/\?/,"")+"&CacheDefeat="+new Date().getTime();return url};GDN.ToggleOccupations=function(form){var occupation=form.Occupation.options[form.Occupation.selectedIndex].text;if(occupation=="Student/Intern"||occupation=="Retired"||occupation=="Not Employed"){form.Industry.selectedIndex=0;form.CompanySize.selectedIndex=0;this.Toggle("IndustryRow","hide");this.Toggle("CompanySizeRow","hide")}else{this.Toggle("IndustryRow","show");this.Toggle("CompanySizeRow","show")}};GDN.ZagFormUrl=function(){var url=GDN.CombinePath(gdn_site_url,gdn_zag_form_url);return GDN.AppendParam(url,"Destination",GDN.Request.QueryString("Destination"))};GDN.UR.Browser={Get:function(data){var browserType=new GDN.UR.BrowserType();var parts=data.split("|");for(var i=0;i<parts.length;i++){switch(i){case 0:browserType.Name=parts[i];break;case 1:browserType.Condition=parts[i];break;case 2:browserType.Version=parseFloat(parts[i]);break;case 3:browserType.Os=parts[i];break}}return browserType},Init:function(){this.Browser=this.SearchString(this.BrowserData)||null;this.Version=this.SearchVersion(navigator.userAgent)||this.SearchVersion(navigator.appVersion)||null;this.Os=this.SearchString(this.OsData)||null},IsSupported:function(){var isSupported=false;for(var i=0;i<gdn_browsers.length;i++){var browser=this.Get(gdn_browsers[i]);if(this.Browser&&this.Os){if(this.Browser==browser.Name&&this.Os==browser.Os){if(browser.Condition=="=")browser.Condition="==";var comparison="parseFloat("+this.Version+") "+browser.Condition+" parseFloat("+browser.Version+")";try{if(eval(comparison)){isSupported=true;break}}catch(e){}}}}return isSupported},SearchString:function(data){for(var i=0;i<data.length;i++){var browser=data[i].String;var os=data[i].Prop;this.VersionSearchString=data[i].VersionSearch||data[i].Identity;if(browser){if(browser.indexOf(data[i].SubString)!=-1)return data[i].Identity}else if(os)return data[i].Identity}},SearchVersion:function(data){var index=data.indexOf(this.VersionSearchString);if(index==-1)return;return parseFloat(data.substring(index+this.VersionSearchString.length+1))},BrowserData:[{String:navigator.vendor,SubString:"Apple",Identity:"Safari"},{String:navigator.userAgent,SubString:"Firefox",Identity:"Firefox"},{String:navigator.vendor,SubString:"iCab",Identity:"iCab"},{String:navigator.userAgent,SubString:"MSIE",Identity:"Explorer",VersionSearch:"MSIE"},{String:navigator.vendor,SubString:"KDE",Identity:"Konqueror"},{String:navigator.userAgent,SubString:"Gecko",Identity:"Mozilla",VersionSearch:"rv"},{String:navigator.userAgent,SubString:"Netscape",Identity:"Netscape"},{String:navigator.userAgent,SubString:"Mozilla",Identity:"Netscape",VersionSearch:"Mozilla"},{Prop:window.opera,Identity:"Opera"}],OsData:[{String:navigator.platform,SubString:"Linux",Identity:"Linux"},{String:navigator.platform,SubString:"Mac",Identity:"Mac"},{String:navigator.platform,SubString:"Win",Identity:"Windows"}]};GDN.UR.Browser.Init();GDN.UR.BrowserType=function(){var _condition=null;var _name=null;var _os=null;var _version=null;this.Condition=function(){if(arguments[0])_condition=arguments[0];else return _condition};this.Name=function(){if(arguments[0])_name=arguments[0];else return _name};this.Os=function(){if(arguments[0])_os=arguments[0];else return _os};this.Version=function(){if(arguments[0])_version=arguments[0];else return _version}};GDN.Cookies.GCION={CoppaFormat:"{gcionid}~{version}~{date_created}~{status}~",Expires:365,Name:"GCIONID",PostZagFormat:"{gcionid}~{version}~{date_created}~{status}~"+"zip:{zip}|yob:{yob}|gen:{gen}|cou:{cou}|sit:{sit}|"+"adr:{adr}|ind:{ind}|job:{job}|siz:{siz}",PreZagFormat:"{gcionid}~{version}~{date_created}~{status}~"+"ses:{ses}",Version:"1",Get:function(){var user=new GDN.UR.User();user.CompanySize(this.GetValue("CompanySize"));user.Country(this.GetValue("Country"));user.Email(this.GetValue("Email"));user.GcionId(this.GetValue("GcionId"));user.Gender(this.GetValue("Gender"));user.Industry(this.GetValue("Industry"));user.Occupation(this.GetValue("Occupation"));user.Sessions(this.GetSessions());user.Site(this.GetValue("Site"));user.Status(this.GetValue("Status"));user.Yob(this.GetValue("Yob"));user.Zip(this.GetValue("Zip"));return user},GetMatch:function(key){switch(key){case"CompanySize":return"siz";case"Country":return"cou";case"Email":return"adr";case"Gender":return"gen";case"Industry":return"ind";case"Occupation":return"job";case"Sessions":return"ses";case"Site":return"sit";case"Yob":return"yob";case"Zip":return"zip"}return null},GetSession:function(entry){if(GDN.IsNullOrEmpty(entry))return null;if(entry.indexOf("#")!=-1){entry=entry.split('#');var session=new GDN.UR.Session();session.Id(entry[0]);session.Date(entry[1]);session.PageViews(entry[2]);session.SectionFront(entry[3]);return session}else return null},GetSessions:function(){var entries=this.GetValue("Sessions");if(GDN.IsNullOrEmpty(entries))return null;if(entries.indexOf("$")!=-1){entries=entries.split('$');var sessions=[];for(var i=0;i<entries.length;i++)sessions.push(this.GetSession(entries[i]));return sessions}else return new Array(this.GetSession(entries))},GetValue:function(key){if(!GDN.Cookie.Exists(this.Name))return null;var cookie=GDN.Base64.Decode(GDN.Cookie.Get(this.Name));var parts=cookie.split('~');switch(key){case"GcionId":return parts[0];case"Version":return parts[1];case"DateCreated":return parts[2];case"Status":return parts[3];default:{if(parts.length==5){var pairs=parts[4].split('|');var match=this.GetMatch(key);for(var i=0;i<pairs.length;i++){var pair=pairs[i].split(':');if(match==pair[0])return pair[1]}}else return null}break}return null},Set:function(user,zagState){if(zagState==GDN.UR.UserStatus.UnderAge){var cookie=this.CoppaFormat;cookie=cookie.replace(/{gcionid}/gi,"0");cookie=cookie.replace(/{date_created}/gi,GDN.GetCreationDate());cookie=cookie.replace(/{version}/gi,this.Version);cookie=cookie.replace(/{status}/gi,user.Status())}else{var cookie=(zagState==GDN.UR.UserStatus.IdentifierCreated)?this.PreZagFormat:this.PostZagFormat;cookie=cookie.replace(/{gcionid}/gi,user.GcionId());cookie=cookie.replace(/{date_created}/gi,GDN.GetCreationDate());cookie=cookie.replace(/{version}/gi,this.Version);cookie=cookie.replace(/{status}/gi,user.Status());cookie=cookie.replace(/{zip}/gi,user.Zip());cookie=cookie.replace(/{yob}/gi,user.Yob());cookie=cookie.replace(/{gen}/gi,user.Gender());cookie=cookie.replace(/{cou}/gi,user.Country());cookie=cookie.replace(/{sit}/gi,user.Site());cookie=(!GDN.IsNullOrEmpty(user.Email()))?cookie.replace(/{adr}/gi,user.Email()):cookie.replace(/\|adr:{adr}/gi,"");cookie=(!GDN.IsNullOrEmpty(user.Industry()))?cookie.replace(/{ind}/gi,user.Industry()):cookie.replace(/\|ind:{ind}/gi,"");cookie=(!GDN.IsNullOrEmpty(user.Occupation()))?cookie.replace(/{job}/gi,user.Occupation()):cookie.replace(/\|job:{job}/gi,"");cookie=(!GDN.IsNullOrEmpty(user.CompanySize()))?cookie.replace(/{siz}/gi,user.CompanySize()):cookie.replace(/\|siz:{siz}/gi,"");cookie=cookie.replace(/{ses}/gi,this.SetSessions(user.Sessions()))}GDN.Cookie.Set(this.Name,GDN.Base64.Encode(cookie),this.Expires)},SetSessions:function(sessions){var entries="";for(var i=0;i<sessions.length;i++){if(i==(sessions.length-1)){entries+=sessions[i].Id()+"#"+sessions[i].Date()+"#"+sessions[i].PageViews()+"#"+sessions[i].SectionFront()}else{entries+=sessions[i].Id()+"#"+sessions[i].Date()+"#"+sessions[i].PageViews()+"#"+sessions[i].SectionFront()+"$"}}return entries}};GDN.UR.Intercept={CanIntercept:function(){if(window.location.href==GDN.ZagFormUrl())return false;var canIntercept=false;var count=0;var user=GDN.Cookies.GCION.Get();for(var i=0;i<user.Sessions().length;i++){if(canIntercept)break;if(i!=0){var days=GDN.GetDays(user.Sessions()[i-1].Date(),user.Sessions()[i].Date());if(days<=gdn_days){count++;if(count>=gdn_sessions){if(user.Sessions()[i].PageViews()>=(gdn_page_views-1)){if(user.Sessions()[i].SectionFront()=="frontpage"||user.Sessions()[i].SectionFront()=="section")canIntercept=true}}}else{if(i==1)count=1;else count=0}}else{count++;if(gdn_sessions==1){if(user.Sessions()[i].PageViews()>=(gdn_page_views-1)){if(user.Sessions()[i].SectionFront()=="frontpage"||user.Sessions()[i].SectionFront()=="section")canIntercept=true}}}}return canIntercept},ChangeLink:function(link,href){var innerText=link.innerText;link.href=href;if(link.innerText!=innerText)link.innerText=innerText},EscapeRegEx:function(value){if(!arguments.callee.sRE){var specials=['/'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g')}return value.replace(arguments.callee.sRE,'\\$1')},GetRegEx:function(ex){if(ex.indexOf("http")==-1){if(ex.charAt(0)!="/")ex=location.protocol+"//"+location.host+"/"+ex;else ex=location.protocol+"//"+location.host+ex}var index=ex.indexOf("*");if(index!=-1&&index==ex.length){var prefix=ex.substring(0,index);var suffix=ex.substring(index+1,ex.length);ex=prefix+"([a-zA-Z0-9_-]{1,})"+suffix}return"/"+this.EscapeRegEx(ex)+"/i"},InterceptLinks:function(){var links=document.links;for(var i=0;i<links.length;i++){if(GDN.IsNullOrEmpty(links[i].target)){if(links[i].href.indexOf(location.hostname)!=-1){try{var useInclusion=gdn_use_inclusion}catch(e){var useInclusion=false}if(useInclusion)var canIntercept=!(this.IsException(links[i].href,gdn_local_ex));else var canIntercept=this.IsException(links[i].href,gdn_local_ex)}else var canIntercept=!(this.IsException(links[i].href,gdn_ext_ex));if(canIntercept){if(gdn_zag_form_url.indexOf("?")==-1)var href=links[i].href.replace(gdn_zag_form_url+"?Destination=","");else var href=links[i].href.replace(gdn_zag_form_url+"&Destination=","");href=GDN.AppendParam(GDN.CombinePath(gdn_site_url,gdn_zag_form_url),"Destination",escape(href));this.ChangeLink(document.links[i],href)}}}},IsException:function(href,ex){if(href.toLowerCase().substring(0,11)=="javascript:")return true;var isException=true;for(var i=0;i<ex.length;i++){if(!GDN.IsNullOrEmpty(ex[i])){var exception=new RegExp(eval(this.GetRegEx(ex[i])));if(exception.test(href)){isException=false;break}}}return isException}};GDN.UR.Page={Intercept:function(){var user=GDN.Cookies.GCION.Get();if(user.Status()==GDN.UR.UserStatus.IdentifierCreated){GDN.UR.Page.UpdateSession();if(GDN.UR.Intercept.CanIntercept()){GDN.LoadFile("ValidateUser","UREvents")}}},Load:function(){if(GDN.UR.Browser.IsSupported()){if(document.getElementById("URWidget-Zag"))GDN.LoadFile("ZagUser","UREvents");if(GDN.Cookie.Exists(GDN.Cookies.GCION.Name)){if(GDN.IsNullOrEmpty(GDN.Cookies.GCION.GetValue("GcionId")))GDN.LoadFile("CreateUser","UREvents");else GDN.UR.Page.PreZag()}else GDN.LoadFile("CreateUser","UREvents")}},PreZag:function(){var user=GDN.Cookies.GCION.Get();if(user.Status()!=GDN.UR.UserStatus.IdentifierCreated)GDN.UR.Page.PostZag();else{if(!GDN.IsNullOrEmpty(GDN.Request.QueryString("GID"))){var gcionId=GDN.Request.QueryString("GID");if(user.GcionId()!=gcionId){if(gcionId=="0"){user.Yob(new Date().getFullYear());GDN.Cookies.GCION.Set(user,GDN.UR.UserStatus.UnderAge)}else GDN.LoadFile("GetUser","UREvents")}}else GDN.UR.Page.Intercept()}},PostZag:function(){var user=GDN.Cookies.GCION.Get();if(GDN.IsNullOrEmpty(GDN.Cookies.Session.GetValue("ref"))){GDN.LoadFile("GetUser","UREvents")}GDN.Cookies.Session.SetValue("ref",0)},UpdateSession:function(){var user=GDN.Cookies.GCION.Get();try{if(gdn_section_front=="frontpage"||gdn_section_front=="section")var sectionFront=gdn_section_front}catch(e){var sectionFront=null}if(GDN.IsNullOrEmpty(GDN.Cookies.Session.GetValue("ses"))){user.AddSession(sectionFront);GDN.Cookies.Session.SetValue("ses",user.Sessions().length)}else{user.UpdateSession(user.Sessions().length,sectionFront)}GDN.Cookies.GCION.Set(user,GDN.UR.UserStatus.IdentifierCreated)}};GDN.UR.Session=function(){var _date=null;var _id=0;var _pageViews=0;var _sectionFront=null;this.Date=function(){if(arguments[0])_date=arguments[0];else return _date};this.Id=function(){if(arguments[0])_id=arguments[0];else return _id};this.PageViews=function(){if(arguments[0])_pageViews=arguments[0];else return _pageViews};this.SectionFront=function(){if(arguments[0])_sectionFront=arguments[0];else return _sectionFront}};GDN.UR.User=function(){var _companySize=null;var _country=null;var _email=null;var _gcionId=null;var _gender=0;var _industry=null;var _occupation=null;var _sessions=[];var _site=null;var _status=0;var _yob=0;var _zip=null;this.CompanySize=function(){if(arguments[0])_companySize=arguments[0];else return _companySize};this.Country=function(){if(arguments[0])_country=arguments[0];else return _country};this.Email=function(){if(arguments[0])_email=arguments[0];else return _email};this.GcionId=function(){if(arguments[0])_gcionId=arguments[0];else return _gcionId};this.Gender=function(){if(arguments[0])_gender=arguments[0];else return _gender};this.Industry=function(){if(arguments[0])_industry=arguments[0];else return _industry};this.Occupation=function(){if(arguments[0])_occupation=arguments[0];else return _occupation};this.Sessions=function(){if(arguments[0])_sessions=arguments[0];else return _sessions};this.Site=function(){if(arguments[0])_site=arguments[0];else return _site};this.Status=function(){if(arguments[0])_status=arguments[0];else return _status};this.Yob=function(){if(arguments[0])_yob=arguments[0];else return _yob};this.Zip=function(){if(arguments[0])_zip=arguments[0];else return _zip};this.AddSession=AddSession;this.GetSession=GetSession;this.RemoveSession=RemoveSession;this.UpdateSession=UpdateSession;if(arguments[0])Init(arguments[0]);function Init(){_companySize=arguments[0].CompanySize;_country=arguments[0].Country;_email=arguments[0].Email;_gcionId=arguments[0].GcionId;_gender=arguments[0].Gender;_industry=arguments[0].Industry;_occupation=arguments[0].Occupation;_site=arguments[0].Site;_status=arguments[0].Status;_yob=arguments[0].Yob;_zip=arguments[0].Zip}function AddSession(sectionFront){if((_sessions.length+1)>=gdn_MaxSessions)this.RemoveSession();var session=new GDN.UR.Session();session.Date(GDN.GetCreationDate());session.Id(_sessions.length+1);session.PageViews(1);session.SectionFront(sectionFront);_sessions.push(session)}function GetSession(id){for(var i=0;i<_sessions.length;i++){if(id==_sessions[i].Id())return _sessions[i]}}function RemoveSession(){_sessions.shift()}function UpdateSession(id,sectionFront){for(var i=0;i<_sessions.length;i++){if(id==_sessions[i].Id()){_sessions[i].PageViews(parseInt(_sessions[i].PageViews())+1);if(_sessions[i].SectionFront()!="frontpage"&&_sessions[i].SectionFront()!="section")_sessions[i].SectionFront(sectionFront);break}}}};GDN.UR.UserProvider={Create:function(){var querystring="q=3&c=1&NoCookie=1";GDN.Rpc.Send(GDN.RegUrl(querystring))},Get:function(user){var querystring="q=3&c=1&NoCookie=1&";querystring=GDN.AppendParam(querystring,"GCIONID",user.GcionId());GDN.Rpc.Send(GDN.RegUrl(querystring))},UpdateZag:function(user){var querystring="q=4&c=1&NoCookie=1&";var cookie=GDN.Cookies.GCION.Get();if(user.Country()!="us")user.Zip("00000");querystring=GDN.AppendParam(querystring,"Country",user.Country());querystring=GDN.AppendParam(querystring,"GCIONID",GDN.Cookies.GCION.GetValue("GcionId"));querystring=GDN.AppendParam(querystring,"Gender",user.Gender());querystring=GDN.AppendParam(querystring,"OriginatingSite",escape(gdn_reg_site_code));querystring=GDN.AppendParam(querystring,"YOB",user.Yob());querystring=GDN.AppendParam(querystring,"Zip",user.Zip());if(gdn_occupation_required){if(user.Occupation()){querystring=GDN.AppendParam(querystring,"Occupation",user.Occupation());if(occupation!="Student/Intern"&&occupation!="Retired"&&occupation!="Not Employed"){querystring=GDN.AppendParam(querystring,"Industry",user.Industry());querystring=GDN.AppendParam(querystring,"CompanySize",user.CompanySize())}}}GDN.Rpc.Send(GDN.RegUrl(querystring))},Validate:function(user){var querystring="q=3&c=1&NoCookie=1&";querystring=GDN.AppendParam(querystring,"GCIONID",user.GcionId());GDN.Rpc.Send(GDN.RegUrl(querystring))},Zag:function(user){var querystring="q=2&c=1&NoCookie=1&";var cookie=GDN.Cookies.GCION.Get();if(user.Country()!="us")user.Zip("00000");querystring=GDN.AppendParam(querystring,"Country",user.Country());querystring=GDN.AppendParam(querystring,"GCIONID",GDN.Cookies.GCION.GetValue("GcionId"));querystring=GDN.AppendParam(querystring,"Gender",user.Gender());querystring=GDN.AppendParam(querystring,"OriginatingSite",escape(gdn_reg_site_code));querystring=GDN.AppendParam(querystring,"YOB",user.Yob());querystring=GDN.AppendParam(querystring,"Zip",user.Zip());if(gdn_occupation_required){if(user.Occupation()){querystring=GDN.AppendParam(querystring,"Occupation",user.Occupation());if(occupation!="Student/Intern"&&occupation!="Retired"&&occupation!="Not Employed"){querystring=GDN.AppendParam(querystring,"Industry",user.Industry());querystring=GDN.AppendParam(querystring,"CompanySize",user.CompanySize())}}}GDN.Rpc.Send(GDN.RegUrl(querystring))}};GDN.UR.UserStatus={IdentifierCreated:1,ZagCollected:2,OccupationCollected:4,EmailCollected:8,UnderAge:16};GDN.ChangeCheckedState=function(object,state){for(var i=0;i<object.length;i++){if(state.toLowerCase()=="checked")object[i].checked=true;else object[i].checked=false}};GDN.GetCheckedIndex=function(object,value){for(var i=0;i<object.length;i++){if(object[i].value==value)return i}return 0};GDN.GetCheckedValue=function(object){for(var i=0;i<object.length;i++){if(object[i].checked)return object[i].value}};GDN.HandleKeyPress=function(e,fns,keycode){var key=e.keyCode||e.which;if(key==keycode)fns.call()};GDN.SetCheckedIndex=function(object,value){for(var i=0;i<object.length;i++){if(object[i].value==value){object[i].checked=true;return}}};GDN.SetSelectedIndex=function(object,value){for(var i=0;i<object.options.length;i++){if(object.options[i].value==value){object.selectedIndex=i;return}}};GDN.Toggle=function(elementName,state){if(state=="show")document.getElementById(elementName).style.display='';else document.getElementById(elementName).style.display='none'};GDN.ToggleButton=function(elementName,isEnabled){document.getElementById(elementName).disabled=isEnabled};GDN.ToggleState=function(object,element){var country=object.options[object.selectedIndex].value.toLowerCase();if(GDN.IsNullOrEmpty(country)||country=="us")GDN.Toggle(element,"show");else GDN.Toggle(element,"hide")};GDN.ErrorSummary=function(){var _errors=[];var _header=null;this.AddError=AddError;this.HasErrors=HasErrors;this.Header=Header;this.Hide=Hide;this.Show=Show;this.ToString=ToString;function AddError(message){_errors.push(message)}function HasErrors(){if(_errors.length>0)return true;else return false}function Header(value){if(value)_header=value;else return _header}function Hide(elementName){GDN.Toggle(elementName,"hide")}function Show(elementName){var errorSummary='<p align="center">'+this.Header()+'</p>';errorSummary+='<ul>';for(var i=0;i<_errors.length;i++)errorSummary+='<li>'+_errors[i]+'</li>';errorSummary+='</ul>';GDN.Toggle(elementName,"show");GDN.SetInnerHtml(elementName,errorSummary)}function ToString(){var errorSummary=this.Header()+"\n\n";for(var i=0;i<_errors.length;i++)errorSummary+="* "+_errors[i]+"\n";return errorSummary}};GDN.Validate={IsChecked:function(object){for(var i=0;i<object.length;i++){if(object[i].checked)return true}return false},IsEmail:function(object){var regex=/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;return regex.test(object)},IsInt:function(object){var regex=/^-{0,1}\d+$/;return regex.test(object)},IsMaxEmail:function(object){var regex=/^.{1,100}$/;return!(regex.test(object))},IsMaxFirstName:function(object){var regex=/^.{1,30}$/;return!(regex.test(object))},IsMaxLastName:function(object){var regex=/^.{1,30}$/;return!(regex.test(object))},IsMaxPassword:function(object){var regex=/^.{1,30}$/;return!(regex.test(object))},IsMaxUserName:function(object){var regex=/^.{1,16}$/;return!(regex.test(object))},IsMinPassword:function(object){var regex=/^.{5,}$/;return!(regex.test(object))},IsMinUserName:function(object){var regex=/^.{5,}$/;return!(regex.test(object))},IsPassword:function(object){var regex=/^[a-zA-Z0-9]+$/;return regex.test(object)},IsUserName:function(object){var regex=/^[a-zA-Z0-9\_\-]+$/;return regex.test(object)},IsYob:function(object){var regex=/(^\d{4}$)/;return regex.test(object)},IsYobUnderAge:function(object){var today=new Date();var curyear=today.getFullYear();return((curyear-parseInt(object))<=(gdn_coppaage))?false:true},IsYobInRange:function(object){var today=new Date();var minYear=1901;var maxYear=today.getFullYear();if((parseInt(object)<minYear)||(parseInt(object)>maxYear))return false;else return true},IsZip:function(object){var regex=/(^\d{5}$)/;return regex.test(object)}};GDN.ValidatedFields=function(){var _invalidFields=[];var _validFields=[];var _validValues=[];this.AddInvalidField=AddInvalidField;this.AddValidField=AddValidField;this.Clear=Clear;this.Populate=Populate;this.SetFocus=SetFocus;function AddInvalidField(name){_invalidFields.push(name)}function AddValidField(name,value){_validFields.push(name);_validValues.push(value)}function Clear(form){for(var i=0;i<_invalidFields.length;i++){var field=eval("form."+_invalidFields[i]);if(!/select/.test(field.type))field.value=""}}function Populate(form){for(var i=0;i<_validFields.length;i++){var field=eval("form."+_validFields[i]);if(!/select/.test(field.type))field.value=_validValues[i].toString()}}function SetFocus(form){var field=eval("form."+_invalidFields[0]);if(field[0])field[0].focus();else field.focus()}};GDN.UA.Disable=function(){GDN.AddListener(gdn_Divs["Login"],GDN.Disable);GDN.AddListener(gdn_Divs["PluckLogin"],GDN.Disable);GDN.AddListener(gdn_Divs["PluckReg"],GDN.Disable);GDN.AddListener(gdn_Divs["SaxotechLogin"],GDN.Disable);GDN.AddListener(gdn_Divs["Newsletters"],GDN.Disable)};GDN.LoadUI=function(){GDN.LoadFile("UI")};if(gdn_enable_auth_by_division){if(gdn_enable_auth_by_site){GDN.AddListener(gdn_Divs["Login"],GDN.UA.Page.Load);GDN.AddHandler(window,'load',GDN.UA.Page.PluckLogin);GDN.AddHandler(window,'load',GDN.UA.Page.PluckReg);GDN.AddHandler(window,'load',GDN.UA.Page.PluckLogout);GDN.AddHandler(window,'load',GDN.UA.Page.SaxotechLogin);GDN.AddHandler(window,'load',GDN.UA.Page.Newsletters)}else GDN.UA.Disable()}else GDN.UA.Disable();if(gdn_enable_reg_by_division){if(gdn_enable_reg_by_site){if(GDN.GetVersion("Cookie")==1){GDN.AddHandler(window,"load",GDN.UR.Page.Load)}}}var gcion_enable_bt=gdn_enable_bt;GDN.AddHandler(window,'load',GDN.LoadUI);eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('G 9(){Y.v=\'U://\'+T+\'/W?V=Q&6=\'+P.i.6.S}g f=\'<5 2=\\"q\\" R=\\"p-E\\">\'+\'  <5 2=\\"e\\">\'+\'    <F>3 X</F>\'+\'    <k>3 14 B, 13 B, 16 15 Z.</k>\'+\'  </5>\'+\'  <r />\'+\'  <l A=\\"p-3\\" 12=\\"11\\" w=\\"i\\" K=\\"h:9();\\"  >\'+\'    <m o=\\"0\\" O=\\"0\\" I=\\"10\\">\'+\'    <n>\'+\'      <4 2=\\"J\\" C=\\"C\\" c=\\"t-2: 8;\\"><D M=\\"6\\">N:</D></4>\'+\'      <4 2=\\"e\\" c=\\"t-2: 8;\\"><L H=\\"1p\\" A=\\"6\\" w=\\"6\\" 1s=\\"1r\\" /></4>\'+\'      <4 2=\\"8\\"><1u 1t=\\"/1o/1n.1q\\" 1z=\\"9()\\" 1y=\\"1v\\" o=\\"0\\" c=\\"1w-e: 1x\\" /></a></4>\'+\'    </n>\'+\'    </m>\'+\' <r>\'+\'  <5 2=\\"q\\">\'+7.j.1m()+\'</5>\'+\'   </l>\';g s="| <a v=\\"h:7.j.1b(f,1c,1d,\'1a-E\');\\" ><b>3 17</b></a>";G d(u){18(u){19"3":{7.1e("1j",s)}1k}}1l(1i(z)!=\'1f\'&&z==1){7.x.y(d,"3","1g");7.x.y(d,"3","1h")}',62,98,'||align|Search|td|div|keywords|GDN|middle|GoToPDSearch|||style|HandleUAEvent|left|UserSearchPopup|var|javascript|PDSearch|Widget|span|form|table|tr|border|UAWidget|center|br|UserSearchLink|vertical|eventId|href|name|Api|Register|gdn_enable_search|id|names|nowrap|label|PopUp|h3|function|type|cellspacing|right|action|input|for|Keywords|cellpadding|document|1171|class|value|PDURL|http|aff|sp|People|location|information||get|method|real|screen|profile|and|people|switch|case|UAWidgetRef|Show|350|50|SetInnerHtml|undefined|LoggedOut|LoggedIn|typeof|CustomLinks|break|if|GetCloseWindow|button_go|graphics|text|gif|30|size|src|img|Go|padding|3px|alt|OnClick'.split('|'),0,{}))