var fbLoginPath="http://www.facebook.com/login.php";function getParams(args){params="?";for(i in args){if(args[i]==''){params+=(i);}else{params+=(i+'='+args[i]+'&');}} return params;} function generateLoginUrl(){args={api_key:fauxfb_api_key,extern:'1',nochrome:'1',fbconnect:'1',v:'1.0',connect_display:'popup',return_session:'1',next:my_base_url+my_pligg_base+'/facebook/request',cancel_url:my_base_url+my_pligg_base+'/facebook/request?cancel=1',req_perms:'email,offline_access'} return fbLoginPath+getParams(args);} function openLoginWindow(type){var _width=550;var Xpos=((screen.availWidth-_width)/2);var _height=500;var Ypos=((screen.availHeight-_height)/2);if(type==2){window.facebookWindow=window.open(my_base_url+my_pligg_base+'/libs/oauthfacebook/request.php?type=1','','width='+_width+',height='+_height+',toolbar=no,resizable=fixed,status=no,scrollbars=no,menubar=no,screenX='+Xpos+',screenY='+Ypos);facebookWindow.focus();return false;}else if(type==3){window.twitterWindow=window.open(my_base_url+my_pligg_base+'/libs/oauthtwitter/request.php?type=1','','width='+_width+',height='+_height+',toolbar=no,resizable=fixed,status=no,scrollbars=no,menubar=no,screenX='+Xpos+',screenY='+Ypos);twitterWindow.focus();return false;}else if(type==4){window.googleWindow=window.open(my_base_url+my_pligg_base+'/libs/oauthgoogle/request.php?type=1','','width='+_width+',height='+_height+',toolbar=no,resizable=fixed,status=no,scrollbars=no,menubar=no,screenX='+Xpos+',screenY='+Ypos);googleWindow.focus();return false;}else{window.yahooWindow=window.open(my_base_url+my_pligg_base+'/libs/oauthyahoo/request.php?type=1','','width='+_width+',height='+_height+',toolbar=no,resizable=fixed,status=no,scrollbars=no,menubar=no,screenX='+Xpos+',screenY='+Ypos);yahooWindow.focus();return false;}}