function fblogout(){FB.logout(function(response){window.location=CONTEXT_ROOT+"/logout?logoutfb=fb";});}function readCookieEdit(name){var nameEQ=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}return null;}function displayLoginStrip(croot,imgurl){var htmlString="";var uid=readCookie("userid");var firstpos=location.href.lastIndexOf("/")+1;var lastpos=location.href.length;var Namer=location.href.substring(firstpos,lastpos);if(uid>0){var firstpos=location.href.lastIndexOf("/")+1;var lastpos=location.href.length;var Namer=location.href.substring(firstpos,lastpos);var picture=readCookie("picture");picture=picture.replace(/"/g,"");var name=readCookieEdit("name");name=name.replace(/"/g,"");htmlString+="<p class='block_a_new'>";htmlString+="<a href='"+croot+"logout' class='link_a' onclick='user_logout();return false;'>Sign Out</a>";htmlString+="<b>|</b>";if(Namer=="myprofile"){htmlString+="<a href='"+croot+"myprofile' class='link_a current_link'>My profile</a>";}else{htmlString+="<a href='"+croot+"myprofile' class='link_a'>My profile</a>";}htmlString+="<b>&nbsp;|&nbsp;</b>";htmlString+="<label>Hi, ";htmlString+=name;htmlString+="</label>";htmlString+="<em><img id='user_pro_img' alt='Member Image' title='Member Image' src='"+picture+"' style='width:15px;height:15px;'></em>";if(readCookie("fb_id")>0){htmlString+="<em><img alt='Facebook' title='Facebook' src='"+imgurl+"/facebook_letter.gif'></em>";}if(readCookie("tw_id")>0){htmlString+="<em><img alt='Twitter' title='Twitter' src='"+imgurl+"/twitter_small.gif'></em>";}if(readCookie("google_id")!=""){htmlString+="<em><img alt='Google' title='Google' src='"+imgurl+"/google_favicon.gif'></em>";}if(readCookie("yahoo_id")!=""){htmlString+="<em><img alt='Yahoo' title='Yahoo' src='"+imgurl+"/yahoo_favicon.gif'></em>";}htmlString+="</p>";}else{if(readCookie("login_incorrect")==1){}else{htmlString+="<p class='block_a_new' >";htmlString+="<a  href='javascript:void(0)' onclick='show_new_popup(); return false;' class='link_a'>Sign In</a>";htmlString+="<b>&nbsp;|&nbsp;</b>";if(Namer=="signup"){htmlString+="<a class='label'>Already Registered</a>";}else{htmlString+="<a href='"+croot+"signup' class='link_a'>Sign Up</a>";}htmlString+="</p>";}}document.getElementById("login_block_other").innerHTML=htmlString;if(readCookie("login_incorrect")==-1){show_new_popup();setCookie("login_incorrect",0,1);}}function initGoogleYahooConnect(lookup,linkAccFlag,accTypeId,email){UsersService.initGoogleYahooConnect(lookup,linkAccFlag,accTypeId,email,function(data){if(data==null){alert("data not received");}else{testwindow=window.open(data,"","scrollbars=1, width=900,height=600");}});}function openId(){alert("openId");}
