
function TwitterAuthWait(callback){var timer;function ready(){cookieUtils.clear("twitterAuth");timer=setInterval(checkTwitterAuthentication,1000);}
function checkTwitterAuthentication(){if(!toBool(cookieUtils.get("twitterAuth=")))
return;if(typeof callback!='undefined')
callback();cookieUtils.clear("twitterAuth");}
this.startAuthentication=function(callback){function error(){}
function onGetRequestToken(xml){var requestToken=parseTwitterRequestToken(xml);window.open(requestToken.url,"Child","width=800,height=400,left=150,top=100,scrollbar=yes,resize=no");if(typeof callback!="undefined")
callback(requestToken);}
var targetUrl=apiUrl+"/twitter/requestToken";var options={url:targetUrl,type:"POST",success:onGetRequestToken,error:error,dataType:"xml"}
$.ajax(options);}
ready();}
