function getCookie(name){
    var dc=document.cookie;
    var prefix=name+"=";
    var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return
    null;}else
    begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)
    end=dc.length;
    return myunescape(dc.substring(begin+prefix.length,end));
}
function myunescape (str)
{
	str = "" + str;
	while (true)
	{
		var i = str . indexOf ('+');
		if (i < 0)
			break;
		str = str . substring (0, i) + '%20' +
			str . substring (i + 1, str . length);
	}
	return unescape (str);
}


function showUserNav() {

iffuname = getCookie('iffusername');
ifffullname = getCookie('ifffullname');
iffmembershipstatus = getCookie('iffmembershipstatus');

document.write('<td align="left" style="padding-left:5px;height-1px">');
document.write('<form  name="ifflogin"  action="/elgg/action/login" method="POST" >');
document.write('<table width="100%" border="0" align="right" valign="center" cellpadding="0" cellspacing="2" STYLE="text-align:center;line-height: 1.9em;padding-top:0px;padding-bottom:0px;">');
document.write('<tr>')


if (iffuname != '' && iffuname !=undefined) {
    var lsRegExp = /\+/g;
    ifffullname=unescape(ifffullname.replace(lsRegExp, " "));
    document.write('<td align="left" style="padding-lef:5px;">')
    document.write('<a href="#" onclick="return clickreturnvalue()" onmouseover="dropdownmenu(this, event, menu1, \'120px\',\'' + iffuname + '\')" onmouseout="delayhidemenu()">My Personal Page</a> |');
    document.write('<a href="#" onclick="return clickreturnvalue()" onmouseover="dropdownmenu(this, event, menu2, \'120px\',\'' + iffuname + '\')" onmouseout="delayhidemenu()">My Groups/Orgs</a> | ');
    document.write('<a href="#" onclick="return clickreturnvalue()" onmouseover="dropdownmenu(this, event, menu3, \'120px\',\'' + iffuname + '\')" onmouseout="delayhidemenu()">My Events</a> | ');
    document.write('<a href="/elgg/pg/messages/' + iffuname + '">Inbox</a> | ');
    document.write('<a href="/elgg/mod/iffgroups/invite.php">Invite Others</a>');
    document.write('</td><div style="clear:both;"></div>');
    document.write('</td>');
    document.write('</tr>');
    document.write('</table></form>');
    document.write('</td>');
    document.write('<td width="255" align="right">');
    document.write('Welcome, ' + ifffullname + '! &nbsp; |<a href="/elgg/action/logout">Logout</a>');
    document.write('</td>');
    document.write('</tr>');
}
else {
    document.write('<SCRIPT LANGUAGE="JavaScript">  function  setvar (){ document.ifflogin.iffurl.value =location.href; } </SCRIPT>');
    document.write('<td align="left" style="padding-lef:5px;">');
    document.write('Email &nbsp;<input type="hidden"  name="iff_token" id="iff_token" value="bb79f454cc4eb67bb4fe9bee7b50e5d7"/></td>');
    document.write('<td align="left"><input name="username" type="text" class="input" id="Email" tabindex=1 style="line-height:15px;height:15px;" /></td>');
    document.write('<td align="left">&nbsp;Password&nbsp;</td>');
    document.write('<td align="left"><input name="password" type="password" class="input" id="Password" tabindex=2 onKeyPress="return submitLoginenter(this,event)" style="line-height:15px;height:15px;" /></td>');
    document.write('<td align="center"><input type="hidden" id="iffurl" name="iffurl">');
    document.write('<SCRIPT LANGUAGE="JavaScript"> setvar (); </SCRIPT><a href="javascript:document.ifflogin.submit()"');
    document.write(' onmouseout=\'MM_swapImgRestore()\' onmouseover=\'MM_swapImage("Image25","","/images_new/login_on.jpg",1)\'>');
    document.write('<img src="/images_new/login.jpg" alt="Login" title="Login" name="Image25" width="49" height="18" border="0" id="Image25" /></a></td>');
    document.write('<td align="left"><a href="/elgg/account/forgotten_password.php">&nbsp;Forgot Password?</a>&nbsp;');
    document.write('</td></tr>');
    document.write('</table></form></td>');
    document.write('<td width="255" align="right">');
    document.write('<a href="/elgg/account/register.php">Join Our Network</a></td></tr>');

}


}


















