//menu items
var menu=Array();
menu[0]=Array();
menu[0][0]='Introduction';
menu[0][1]='What\'s new in version 6.2';
menu[0][2]='Version Features';
menu[1]=Array();
menu[1][0]='Captain FTP Licensing';
menu[1][1]='Captain FTP with Upgrade Protection';
menu[1][2]='License Agreement';
menu[2]=Array();
menu[2][0]='Getting started with Captain FTP';
menu[2][1]='Tasks, Trace, File listing and Preview Drawers';
menu[2][2]='Captain FTP Install / Uninstall';
menu[2][3]='Quick Connect';
menu[2][4]='Exiting from Captain FTP';
menu[3]=Array();
menu[3][0]='File & Folder Transfer';
menu[3][1]='Tabbed Interface';
menu[3][2]='Getting files from the server (Downloading files)';
menu[3][3]='Putting files on the server (Uploading files)';
menu[3][4]='Synchronize folders';
menu[3][5]='Sync Browsing';
menu[3][6]='Accelerated download';
menu[3][7]='Status Line';
menu[3][8]='Create, Delete, Rename, Manage Files & Folders';
menu[3][9]='WebDAV Server';
menu[3][10]='File Archiving';
menu[3][11]='Aliases';
menu[3][12]='Send files as URL';
menu[4]=Array();
menu[4][0]='Address Book';
menu[4][1]='Favorites';
menu[4][2]='Address Book toolbar customization';
menu[4][3]='Import/Export Address Book';
menu[4][4]='Multiple connections';
menu[4][5]='Setting up connection parameters';
menu[4][6]='Connect to iDisk';
menu[5]=Array();
menu[5][0]='Transfer Manager & Scheduling';
menu[5][1]='Toolbar description';
menu[5][2]='Scheduling Transfers';
menu[6]=Array();
menu[6][0]='Sync Scheduling & Backup';
menu[6][1]='Amazon Storage Service';
menu[7]=Array();
menu[7][0]='Share Files, Folder and Address Book';
menu[7][1]='File Sharing Authorization';
menu[8]=Array();
menu[8][0]='Virtual Folders';
menu[9]=Array();
menu[9][0]='Useful tools, tips & tricks';
menu[9][1]='Edit file with BBEdit and other text editors';
menu[9][2]='File finder';
menu[9][3]='File or Folder info';
menu[9][4]='Setting Permissions';
menu[9][5]='Captain FTP as ftp protocol helper';
menu[9][6]='Toolbar Button customization';
menu[9][7]='Growl Notifications';
menu[9][8]='Shortcuts';
menu[9][9]='Burn files to CD or DVD';
menu[9][10]='Compare Files or Folders';
menu[10]=Array();
menu[10][0]='Captain FTP Preferences';
menu[10][1]='The Toolbar';
menu[10][2]='Browser Options';
menu[10][3]='Miscellaneous';
menu[10][4]='FTP Settings';
menu[10][5]='FTP Transfer Settings';
menu[10][6]='Font Options';
menu[10][7]='Actions';
menu[10][8]='Transfer Manager Preferences';
menu[10][9]='File Sharing Authorization';
menu[11]=Array();
menu[11][0]='Advanced Topics';
menu[11][1]='Passive mode';
menu[11][2]='Firewall (proxy server)';
menu[11][3]='Files Transfer Mode';
menu[11][4]='Update RSA key';
menu[11][5]='Creator and Type of files';
menu[11][6]='Xbox Connectivity';
menu[11][7]='Captain FTP Scripting';
menu[12]=Array();
menu[12][0]='Captain FTP on-line';
menu[13]=Array();
menu[13][0]='FAQs';

//menu links
var path='html_docs/';
var links=Array();
links[0]=Array();
links[0][0]='Introduction.html';
links[0][1]='What\'s New.html';
links[0][2]='Version Features.html';
links[1]=Array();
links[1][0]='Captain FTP Licensing.html';
links[1][1]='Captain FTP with Upgrade Protection.html';
links[1][2]='License Agreement.html';
links[2]=Array();
links[2][0]='Getting Started with Captain FTP.html';
links[2][1]='Tasks, Trace, File listing and Preview Drawers.html';
links[2][2]='Captain FTP Install_Uninstall.html';
links[2][3]='Quick Connect.html';
links[2][4]='Exiting from Captain FTP.html';
links[3]=Array();
links[3][0]='File & Folder Transfer.html';
links[3][1]='Tabbed Interface.html';
links[3][2]='Getting files from the server (Downloading files).html';
links[3][3]='Putting files on the server (Uploading files).html';
links[3][4]='Synchronize folders.html';
links[3][5]='Sync Browsing.html';
links[3][6]='Accelerated download.html';
links[3][7]='Status Line.html';
links[3][8]='Create, Delete, Rename, Manage Files & Folders.html';
links[3][9]='WebDAV Server.html';
links[3][10]='File Archiving.html';
links[3][11]='Aliases.html';
links[3][12]='Send files as URL.html';
links[4]=Array();
links[4][0]='Address Book.html';
links[4][1]='Favorites.html';
links[4][2]='Address Book toolbar customization.html';
links[4][3]='Import_Export Address Book.html';
links[4][4]='Multiple connections.html';
links[4][5]='Setting up connection parameters.html';
links[4][6]='Connect to iDisk.html';
links[5]=Array();
links[5][0]='Transfer Manager.html';
links[5][1]='Toolbar description.html';
links[5][2]='Scheduling Transfers.html';
links[6]=Array();
links[6][0]='Sync Scheduling and Backup.html';
links[6][1]='Amazon Storage Service.html';
links[7]=Array();
links[7][0]='Collaborative File Sharing.html';
links[7][1]='File Sharing Authorization.html';
links[8]=Array();
links[8][0]='Virtual Folders.html';
links[9]=Array();
links[9][0]='Useful tools.html';
links[9][1]='Edit file with BBEdit and other text editors.html';
links[9][2]='File finder.html';
links[9][3]='File or Folder info.html';
links[9][4]='Settings File Permissions.html';
links[9][5]='Captain FTP as FTP protocol helper.html';
links[9][6]='Toolbar Button customization.html';
links[9][7]='Growl Notifications.html';
links[9][8]='Shortcuts.html';
links[9][9]='Burn files to CD or DVD.html';
links[9][10]='Compare Files or Folders.html';
links[10]=Array();
links[10][0]='Captain FTP Customization.html';
links[10][1]='The Toolbar.html';
links[10][2]='Browser Options.html';
links[10][3]='Miscellaneous.html';
links[10][4]='FTP Settings.html';
links[10][5]='FTP Transfer Settings.html';
links[10][6]='Font Options.html';
links[10][7]='Actions.html';
links[10][8]='Transfer Manager Preferences.html';
links[10][9]='File Sharing Authorization.html';
links[11]=Array();
links[11][0]='Advanced Topics.html';
links[11][1]='Passive mode.html';
links[11][2]='Firewall (proxy server).html';
links[11][3]='Files Transfer Mode.html';
links[11][4]='Update RSA key.html';
links[11][5]='Creator and Type of files.html';
links[11][6]='Xbox Connectivity.html';
links[11][7]='Captain FTP Scripting.html';
links[12]=Array();
links[12][0]='Captain FTP on-line.html';
links[13]=Array();
links[13][0]='FAQs.html';

//show main menu function 
function showMainMenu() {
var content='<TABLE WIDTH="100%" CELLSPACING="1" CELLPADDING="0">';
	for (i=0;i<menu.length;i++) {
		content+='<TR><TD><A HREF="javascript:top.CONTROL.loadMenu('+i+',0,\'\')">'+menu[i][0]+'</A></TD></TR>';
	}
	content+='</TABLE>';
	document.getElementById('menu-content').innerHTML=content;
}

//load frame functions
function loadMenu(x,y,z) {
	m=x; s=y; a=z;
	top.MAINMENU.location.replace('./frames.html');
}

function showContent(m,s) {
var content='<TABLE WIDTH="100%" CELLSPACING="1" CELLPADDING="0">';
	for (i=0;i<menu.length;i++) {
		if (i==m) {
			content+='<TR><TD COLSPAN="2">'+menu[i][0]+'</TD></TR>';
			for (j=0;j<menu[i].length;j++) {
				if (j==s) content+='<TR CLASS="submenu"><TD WIDTH="1%">'+(i+1)+'.'+(j+1)+'</TD><TD CLASS="submenu" style="color:#FF6B6B">'+menu[i][j]+'</TD></TR>'; else content+='<TR CLASS="submenu"><TD WIDTH="1%">'+(i+1)+'.'+(j+1)+'</TD><TD CLASS="submenu"><A HREF="javascript:top.CONTROL.callMenu('+i+','+j+',\'\')">'+menu[i][j]+'</A></TD></TR>';
			}
		} else content+='<TR><TD COLSPAN="2"><A HREF="javascript:top.CONTROL.callMenu('+i+',0,\'\')">'+menu[i][0]+'</A></TD></TR>';
	}
	content+='</TABLE>';
	top.MAINMENU.MENU.document.getElementById('menu-content').innerHTML=content;
}

//show menu function
function callMenu(m,s,a) {
	showContent(m,s);
	top.MAINMENU.MAIN.location.replace('./'+path+links[m][s]+a);
}

//show menu function
function showMenu(m,s,a) {
	showContent(m,s);
	top.MAINMENU.MAIN.location.replace('./'+links[m][s]+a);
	
}

//force frames function
function forceFrames() {
	if (window.self==parent.window) {
		var str=location.href.substring(location.href.lastIndexOf('/')+1,location.href.length);
		location.replace('../Captain FTP Help Guide.html'+'#'+str);
	}
}

//find indexes function
function findIndexes(str) {
var str2;
	while (str.indexOf('%20')>-1) str = str.replace('%20',' ');
	for (i=0;i<links.length;i++) {
		for (j=0;j<links[i].length;j++) {
			str2 = links[i][j];
			if (str2.substring(str2.lastIndexOf('/')+1,str2.length)==str) {
				m=i;
				s=j;
				found=true;
			}
		}
	}
}

//resize images function
function resizeImages() {
	divs = document.getElementsByTagName("div");
	for (i=0;i<divs.length;i++) divs[i].style.width=document.body.clientWidth-2+'px';
}
