function errortrap()
{
 return true;
}
window.onerror=errortrap;

var basedir='./';

TextTitel=new Array(
new Array(
"Main page","e_index.html",
"Sitemap","sitemape.htm",
"Contact Form","umfragefe.htm",
"Script Tac Toe - The online game","tictacto/tictacto_e.htm",
"No Moles! - Another online game","nomole/index.htm",
"Editorial, legal disclaimer","edito_e.htm"
),
new Array(
"Programming","codindex.htm",
"Introduction into Assembler","asmgen.htm",
"Optimizing with and without Assembler","asmopt.htm",
"Protected Mode overview","x86modfd.htm",
"Protected Mode and your own programs","pmodeuse.htm",
"Programming tips","codetips.htm",
"Programming links","codelinx.htm"
),
new Array(
"Win32Asm","wasmtute.htm",
"Teil 1: The basics","w32asm1e.htm",
"Teil 2: Windows and Messages","w32asm2e.htm",
"Teil 3: DirectDraw and Sound Capture","w32asm3e.htm",
"Teil 4: Threads and Synchronisation","w32asm4e.htm",
"Teil 5: PE file format, memory management, ...","w32asm5e.htm",
"Win32 Assembler FAQ","wasmfaq_e.htm"
),
new Array(
"Downloads","downlds_e.htm",
"Raving Tomatoes","tomato4k_e.htm",
"Technologische Spitzenleistung - Fluelen Remastered 64b","tsfrm_e.htm",
"Cardomania 4k","atz4k0a08_e.htm",
"Quadratkontamination 64b","ts64b0a08_e.htm",
"Snailmail 4k","ts4knv08_e.htm",
"Only You Can Stop Cowboyism","cowbyism_e.htm",
"Earl Biohazard & the Dilletantish Disconnecters","./earlbio/earlbioe.htm",
"Mustermacher 64b","mstrmach_e.htm",
"X-Messy Sylvester","ts4ktum5_e.htm",
"Lochfrass 64b","lochfrss_e.htm",
"Merry SCX-Mess 4k","ts4ktum4_e.htm",
"Mandal0a000h 4k","ts4k0a04_e.htm",
"Klappquadrat 32b","klapquad_e.htm",
"Merry X-Mess 4k","ts4ktum3_e.htm",
"Hirngespinnst 4k","ts4k0a03_e.htm",
"Triple(t) 64 and 32b","triplet_e.htm",
"faktoid","fakt4k_e.htm",
"Wellen64b","wellen64_e.htm",
"Zwischenraumhypnose 4k","zhp4k_e.htm",
"Drunken ant on its way to the loo","ameise_e.htm",
"Triton Sirius Elysium 4k","tse4k_e.htm",
"SpacemouseCursorTool","spmcur_e.htm",
"JoystickMouseTool","jmt_e.htm",
"JoystickCursorTool","jct_e.htm",
"Other small programs written by me","e_tstinprg.htm",
"Various stuff made by me","e_tssware.htm"
),
new Array(
"Software","e_pcconfig.htm",
"Small browser utilities in JavaScript","jsfav_e.htm",
"Using harddisks over 8GB/32GB/64GB/128GB without a new BIOS","e_over8mb.htm",
"Fast bookmark access via browser starting page","bmkfav_e.htm",
"Useful tools","e_tools.htm",
"Getting programs to work on a Cyrix 6x86","e_cy6x86cr.htm",
"Gaming tips","e_gametufd.htm",
"Optimizing autoexec.bat und config.sys for DOS/Win9x","dosconf_e.htm",
"Various soundcard tips","e_sctips.htm",
"Fixing the noise during sound playback on VIA chipsets","mvp3_zlt_e.htm"
),
new Array(
"Hardware","e_pchw.htm",
"Optimal usage of TFT / Flatpanel displays","e_tftmon.htm",
"Typical layout of ISA and PCI soundcards","e_sndcard.htm",
"Adding inputs to CMI8738 soundcards / soundchips","cmi8738s_e.htm",
"Repairing graphic tablet pens","grafrep_e.htm",
"Repairing CDROM drives","cdrep_e.htm",
"Selfmade digital CD-ROM cable","e_digikab.htm",
"Volume control on SoundBlaster cards with a fingertip","e_sbvolctl.htm",
"Less mess on the desk in 5 minutes","kbkbl_e.htm",
"Making the mouse more precise","e_maustune.htm",
"Connecting the mainboard speaker to the sound card","e_sbpcqlnk.htm",
"Low-profile standard PC","e_flach.htm",
"Links to hardware sites","e_hwtpslnx.htm"
),
new Array(
"Cartoons and Co","cartoon/unfug_e.htm",
"Cartoons","cartoon/unfug_e.htm",
"The first slot-in CD-ROM","e_slotincd.htm"
)
);


function setbasedir()
{
 var adresse=location.href;
 if(top.frames.length>0)
 {
  adresse=top.location.href;
 }

 if(adresse.lastIndexOf("#")!=-1)
 {
  adresse=adresse.substring(0,adresse.lastIndexOf("#"));
 }

 var j=0;
 while(j<TextTitel.length)
 {
  var i=0;
  while((2*i)<TextTitel[j].length)
  {
   var subaddr=TextTitel[j][2*i+1];
   var subadrpos=adresse.indexOf(subaddr);
   if(subadrpos>=0)
   {
    basedir=adresse.substring(0,subadrpos);
   }
   i++;
  }
  j++;
 }
};

function getIndex()
{
 var adresse=location.href;
 if(top.frames.length>0)
 {
  adresse=top.location.href;
 }

 if(adresse.lastIndexOf("#")!=-1)
 {
  adresse=adresse.substring(0,adresse.lastIndexOf("#"));
 }

 var j=0;
 while(j<TextTitel.length)
 {
  var i=0;
  while((2*i)<TextTitel[j].length)
  {
   var subaddr=TextTitel[j][2*i+1];
   var subadrpos=adresse.indexOf(subaddr);
   if(subadrpos>=0)
   {
    return { chapter:j,page:i };
   }
   i++;
  }
  j++;
 }
 return { chapter:0, page:0 };
};


function p()
{
 var pos = getIndex();
 return GetURL(pos.chapter,pos.page-1);
}

function n()
{
 var pos = getIndex();
 return GetURL(pos.chapter,pos.page+1);
}

function u()
{
 var pos = getIndex();
 return GetURL((pos.page != 0) ? pos.chapter : 0, 0);
}

function f()
{
 var pos = getIndex();
 return GetURL(pos.chapter, 0);
}

function l()
{
 var pos = getIndex();
 return GetURL(pos.chapter, 999);
}

function GetURL(chapter, page)
{
 var TextTitelC=TextTitel[Math.max(0,Math.min(chapter,TextTitel.length-1))];
 var TextTitelCP=TextTitelC[Math.max(0,Math.min(page,TextTitelC.length/2-1))*2+1];
 return basedir+TextTitelCP;
}

setbasedir();

var head = document.getElementsByTagName('head')[0];
head.innerHTML += 
'<link rel="home" href="/e_index.html" title="Home">' +
'<link rel="contents" href="/sitemape.htm" title="Sitemap">' +
'<link rel="author" href="/edito_e.htm#2" title="Author">' +
'<link rel="copyright" href="/edito_e.htm#3" title="Copyright">' +
'<link rel="first" href="javascript:f();" title="First page">' +
'<link rel="prev" href="javascript:p();" title="Previous page">' +
'<link rel="next" href="javascript:n();" title="Next page">' +
'<link rel="last" href="javascript:l();" title="Last page">' +
'<link rel="up" href="javascript:u();" title="Chapter">' +
'<link rel="shortcut icon" href="favicon.ico">' +
'<link href="'+basedir+'dropdown.css" media="screen" rel="stylesheet" type="text/css" />';

if((window.innerWidth ? window.innerWidth : screen.availWidth) > 600)
{
	document.open();
	
	 document.write('<ul id="navdropdown">');
	 var j=0;
	 while(j<TextTitel.length)
	 {
	  var name = TextTitel[j][0];
	  var url  = basedir+TextTitel[j][1];
	  document.write('<li><a href="'+url+'" target="_top">'+name+'</a><ul>');
	  var i=1;
	  while((2*i)<TextTitel[j].length)
	  {
	   var name =TextTitel[j][2*i];
	   var url  =basedir+TextTitel[j][2*i+1];
	   document.write('<li><a href="'+url+'" target="_top">'+name+'</a></li>');
	   i++;
	  }
	  document.write('</ul></li>');
	  j++;
	 }
	 document.write('</ul><hr/>');
	
	document.close();
}
