/*
* (c) 2011 Chad Etzel - TweetGrid.com
* This file may not be reproduced without the express written permission of the author.
*/
function oauth_open_login_window(){var width=800;var height=450;var left=Math.floor((screen.width-width)/2);var top=Math.floor((screen.height-height)/2);var params='width='+width+', height='+height;params+=', top='+top+', left='+left;params+=', directories=no';params+=', location=no';params+=', menubar=no';params+=', resizable=no';params+=', scrollbars=no';params+=', status=no';params+=', toolbar=no';var newwin=(window.open("./oauth_login",'',params));if(window.focus){newwin.focus()}return false;}function oauth_parent_receiver(username,userid,oauth_access_token,oauth_access_secret){$('.select_usernames').append('');mpmetrics.track('oauth_login');}function oauth_tell_parent(username,userid,oauth_access_token,oauth_access_secret){window.opener.oauth_parent_receiver(username,userid,oauth_access_token,oauth_access_secret);}function oauth_restore_users(){$.ajax({type:"POST",url:"./js/oauth_restore_users.php5",data:"",success:function(data){data=eval(data);for(var i in data){var username=data[i]["username"];var userid=data[i]["userid"];$('.select_usernames').append('');}}});}function oauth_logout(){$('.select_usernames').html('');$.ajax({type:"POST",url:"./js/oauth_logout.php5",data:"",success:function(data){void(0);}});var i;for(i=0;i<=10;i++){var type=get_("type",i);if(type=="friends"||type=="dms"){stopit(i);}}}