<!--

/*---------other functions---------*/
function CountLevel(s){    
    var temp = s.split('/');
    var counter = parseInt(temp.length)-1;
    return counter;
}

function isLoggedIn(){
		var ret = 0; 
		var loginCookie = document.cookie;
		if (document.cookie != "") {
			  loginCookie = loginCookie + ";"
				var split_cookie = loginCookie.split(";");
		
				for (var i=0 ; i < split_cookie.length; i++)
				{
						var c_val = split_cookie[i];
						var c_name = c_val.substr(0,c_val.indexOf("="));
						//c_val = c_val.substr(c_val.indexOf("=")+1);
						c_name = Trim(c_name);        
						if (c_name == "iLearnMemberID")     {  				    
								ret =1;
								break;
						}  
				}
   }
   return ret;
}

/*******************************************************************************************************/

var g_fileloc = window.location.toString();
g_fileloc = g_fileloc.substr(g_fileloc.indexOf(':')+3);
var level = CountLevel(g_fileloc);
//-- exception for my local project----
if (g_fileloc.substr(0,g_fileloc.indexOf('/')) == 'localhost')
   level = parseInt(level) - 1;    
 
var global_file_loc = '';

if (parseInt(level) == 2)   
  global_file_loc = '../';
else if (parseInt(level) ==3)
  global_file_loc = '../../';
var topswf = global_file_loc + 'swfs/topbanner.swf';

var def_file = g_fileloc.substr(g_fileloc.lastIndexOf('/')+1);

document.write('<TABLE align=center WIDTH=825 BORDER=0 CELLPADDING=0 CELLSPACING=0>');
document.write('<TR>');
document.write('	<TD COLSPAN=3><script language="javascript">InsertFlash(\'5,0,0,0\', 825 , 87,\'' + topswf + '\');</script></TD>');
document.write('</TR>');
document.write('<TR>');
document.write('	<TD COLSPAN=3 background="' + global_file_loc + 'images/level_02.gif" WIDTH=825 HEIGHT=34 valign=top>');
document.write('	 <table cellpadding="5" cellspacing="4" border="0">');
document.write('   <tr>');
document.write('     <td><IMG SRC="' + global_file_loc + 'images/spacer.gif" WIDTH=30 HEIGHT=1></td>');  
document.write('     <td class="tNav"><a class="tNav" href="' + global_file_loc + 'default.aspx">Home</a></td>');
document.write('     <td><IMG SRC="' + global_file_loc + 'images/spacer.gif" WIDTH=5 HEIGHT=1></td>');  
if (def_file == 'about.htm')       
    document.write('     <td class="NavDef">About us</td>');
else
		document.write('     <td class="tNav"><a class="tNav" href="' + global_file_loc + 'about.htm">About us</a></td>');

document.write('     <td><IMG SRC="' + global_file_loc + 'images/spacer.gif" WIDTH=5 HEIGHT=1></td>');  

if (def_file == 'contact.htm')       
		document.write('     <td class="NavDef">Contact us</td>');
else
		document.write('     <td class="tNav"><a class="tNav" href="' + global_file_loc + 'contact.htm">Contact us</a></td>');

document.write('		 <td><IMG SRC="' + global_file_loc + 'images/spacer.gif" WIDTH=5 HEIGHT=1></td>');

if (def_file == 'help.htm')       
		document.write('     <td class="NavDef">Help</td>');
else
		document.write('     <td class="tNav"><a class="tNav" href="' + global_file_loc + 'help/help.htm">Help</a></td>');

document.write('		 <td><IMG SRC="' + global_file_loc + 'images/spacer.gif" WIDTH=5 HEIGHT=1></td>');

if (def_file == 'tech.htm')       
		document.write('     <td class="NavDef">Tech help</td>');
else
		document.write('     <td class="tNav"><a class="tNav" href="' + global_file_loc + 'help/tech.htm">Tech help</a></td>');

document.write('		 <td><IMG SRC="' + global_file_loc + 'images/spacer.gif" WIDTH=70 HEIGHT=1></td>');

var checklogin = isLoggedIn();
//alert(checklogin);
if (parseInt(checklogin) == 1){		
   document.write('		<td align=right>');
   document.write('		  <a href="' + global_file_loc + 'progress.aspx" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'hdrProgress\',\'\',\'' + global_file_loc + 'images/myprog_over.gif\',1)"><IMG id="hdrProgress" border=0 SRC="' + global_file_loc + 'images/myprog.gif" title="Go to my Progress"></a>');
   document.write('		  <a href="' + global_file_loc + 'profile.aspx" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'hdrProfile\',\'\',\'' + global_file_loc + 'images/myprof_over.gif\',1)"><IMG id="hdrProfile" border=0 SRC="' + global_file_loc + 'images/myprof.gif" title="Go to my Profile"></a>');
   document.write('		  <a href="' + global_file_loc + 'logout.aspx?quit=1" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'hdrLogout\',\'\',\'' + global_file_loc + 'images/logout_over.gif\',1)"><IMG id="hdrLogout" border=0 SRC="' + global_file_loc + 'images/logout.gif" title="Logout now"></a>');
   document.write('		</td>');
}

document.write('   </tr>');
document.write('   </table>');
document.write('  </TD>');
document.write('</TR>');
document.write('<TR>');
document.write('  <TD valign=top background="' + global_file_loc + 'images/level_06.gif"><img src="' + global_file_loc + 'images/level_03.gif" width="25" height="265"></TD>');
document.write('	<TD bgcolor=#ffffff width="764" valign="top" rowspan="2"><br>');

-->