function sc(e,d,b){var a="";if(b){var c=new Date();c.setTime(c.getTime()+(b*24*60*60*1000));a="; expires="+c.toGMTString();}document.cookie=e+"="+d+a+"; path=/";
}function gc(f){var d=f+"=";var a=document.cookie.split(";");for(var b=0;b<a.length;b++){var e=a[b];while(e.charAt(0)==" "){e=e.substring(1,e.length);}if(e.indexOf(d)==0){return e.substring(d.length,e.length);
}}return null;}function ser(c){var b=[];for(var d in c){b[b.length]=encodeURIComponent(d)+"="+encodeURIComponent(c[d]);}var a=b.join("&").replace(/%20/g,"+");return a.substring(0,1)!="&"?"&"+a:a;
}var _guid,_type,_data,_challengeUrl;function uwh_init(a){_guid=a;var b=gc(_guid+"_"+_type);if(b==null){var d=document.createElement("div");d.setAttribute("id","UWH-divCon");
d.style.display="none";document.body.appendChild(d);var c=document.createElement("iframe");_challengeUrl="http://userwarehouse.com/challenge.jsp?guid="+_guid+"#";
c.setAttribute("src",_challengeUrl);c.setAttribute("id","UWH-IFrame");c.setAttribute("name","fbc_uwh_send_frame");c.style.width=1+"px";c.style.height=1+"px";d.appendChild(c);
}}function uwh_fbc(a){_type="sfud";uwh_init(a);}function uwh_generic(a,b){_type="sgud";_data=b;uwh_init(a);}function uwh_switchboard(b){var a=gc(_guid+"_"+_type);
if(a==null){switch(_type){case"sfud":uwh_fbc_data(b);break;case"sgud":uwh_generic_data(b);break;}}}function uwh_fbc_data(a){FB.Facebook.get_sessionState().waitUntilReady(function(c){var b=["name","timezone","birthday","sex","locale","profile_url","proxied_email","pic"];
FB.Facebook.apiClient.callMethod("users.getInfo",{uids:c.uid,fields:b,locale:"en_US"},function(d){d=d[0];var e="&fbUser.uid="+d.uid+"&fbUser.name="+d.name+"&fbUser.timezone="+d.timezone+"&fbUser.birthday="+d.birthday+"&fbUser.sex="+d.sex+"&fbUser.locale="+d.locale+"&fbUser.profile_url="+d.profile_url+"&fbUser.proxied_email="+d.proxied_email+"&fbUser.pic="+d.pic;
uwh_send_data(a,e);sc(_guid+"_"+_type,"harvested",1);});});}function uwh_generic_data(a){uwh_send_data(a,ser(_data));sc(_guid+"_"+_type,"harvested",1);}function uwh_send_data(b,a){var c=document.getElementById("UWH-IFrame");
c.src=_challengeUrl+a+"&uwh_action="+_type+"&uwh_ticket="+b;}function uwh_cleanup(){var a=document.getElementById("UWH-divCon");document.body.removeChild(a);}