function riscmainFramecheck()
{
//Printing through hidden Netscape 4 window, then do not reload
   if (document.layers && (self.innerHeight == 0 && self.innerWidth == 0)) return;

   var bestandsnaam = self.location.pathname.substring(self.location.pathname.lastIndexOf('/')+1,self.location.pathname.indexOf('.htm'));
// Local IE uses \ in path   
   bestandsnaam = bestandsnaam.substring(bestandsnaam.lastIndexOf('\\')+1, bestandsnaam.length);
   var bestandspad = self.location.pathname.substring(0,self.location.pathname.indexOf(bestandsnaam+'.htm'));
// Local IE path strip first /
	 if (bestandspad.indexOf(':')>-1) { bestandspad = bestandspad.substring(1, bestandspad.length)};

   var regarea = (self.location.pathname.indexOf('/sus/')>-1) || (self.location.pathname.indexOf('\\sus\\')>-1) || (self.location.pathname.indexOf('/sanscrit/')>-1) || (self.location.pathname.indexOf('\\sanscrit\\')>-1) || (self.location.pathname.indexOf('/vlierhumaan/')>-1) || (self.location.pathname.indexOf('\\vlierhumaan\\')>-1) || (self.location.pathname.indexOf('/vlierupdate/')>-1) || (self.location.pathname.indexOf('\\vlierupdate\\')>-1);

   var producthoofdcat = bestandsnaam.substring(0, 2);
   var productsubcat1 = bestandsnaam.substring(2, 4);
//   alert("hoofdcat: "+producthoofdcat+"   productsubcat: "+productsubcat1);

   if (bestandsnaam == 'main') {riscmenuname='01'}
   else
   if (producthoofdcat == 'rf' || bestandsnaam=='riscframework') {riscmenuname='02'}
   else
   if (producthoofdcat == 'sw' || bestandsnaam=='software') {riscmenuname='03'}
   else
   if (producthoofdcat == 'tn' || bestandsnaam=='training') {riscmenuname='04'}
   else
   if (producthoofdcat == 'nw' || bestandsnaam == 'news') {riscmenuname='05'}
   else
   if (producthoofdcat == 'nf' || bestandsnaam == 'information') {riscmenuname='06'}
   else
   if (producthoofdcat == 'dw' || bestandsnaam == 'download') {riscmenuname='07'}
   else
   if (producthoofdcat == 'sr' || bestandsnaam == 'search') {riscmenuname='08'}
   else
   if (producthoofdcat == 'ct' || bestandsnaam == 'contact') {riscmenuname='09'}
   else
   if (producthoofdcat == 're' || bestandsnaam == 'support' || regarea==true) {riscmenuname='10'}
   else{
   riscmenuname='01'}

   riscmenuname = 'menu'+riscmenuname;

   if ((top==self) || (parent.frames['riscmainFrame']==null)) {
// following is better for Opera browsers, but does not work locally on IE
//     var newURL = self.location.protocol + '//' + self.location.host + self.location.pathname.substring(0,self.location.pathname.lastIndexOf('/')) + '/index.html?pgotmainFrame='+pgotpagename;
//     if (document.images) top.location.replace(newURL);
//        else top.location.href = newURL;

			 if (bestandspad.indexOf('/sanscritsales/')==0 || bestandspad.indexOf('\\sanscritsales\\')>-1 || bestandspad.indexOf('/rischuman/')==0 || bestandspad.indexOf('\\rischuman\\')>-1 || bestandspad.indexOf('/sanscrit/')==0 || bestandspad.indexOf('\\sanscrit\\')>-1 || bestandspad.indexOf('/vlierhumaan/')==0 || bestandspad.indexOf('\\vlierhumaan\\')>-1 || bestandspad.indexOf('/vlierupdate/')==0 || bestandspad.indexOf('\\vlierupdate\\')>-1 || bestandspad.indexOf('/downloads/')==0 || bestandspad.indexOf('\\downloads\\')>-1){
				 var indexlocatie = bestandspad;

				 if (indexlocatie.indexOf('/downloads/')==0){ indexlocatie = '/' + indexlocatie.substring(11, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\downloads\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\downloads\\')+1); }

				 if (indexlocatie.indexOf('/sanscritsales/')==0){ indexlocatie = '/' + indexlocatie.substring(15, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\sanscritsales\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\sanscritsales\\')+1); }

				 if (indexlocatie.indexOf('/rischuman/')==0){ indexlocatie = '/' + indexlocatie.substring(11, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\rischuman\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\rischuman\\')+1); }

				 if (indexlocatie.indexOf('/sanscrit/')==0){ indexlocatie = '/' + indexlocatie.substring(10, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\sanscrit\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\sanscrit\\')+1); }

				 if (indexlocatie.indexOf('/vlierhumaan/')==0){ indexlocatie = '/' + indexlocatie.substring(13, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\vlierhumaan\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\vlierhumaan\\')+1); }

				 if (indexlocatie.indexOf('/vlierupdate/')==0){ indexlocatie = '/' + indexlocatie.substring(13, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\vlierupdate\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\vlierupdate\\')+1); }

				 if (indexlocatie.indexOf('/vlierrelease/')==0){ indexlocatie = '/' + indexlocatie.substring(14, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\vlierrelease\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\vlierrelease\\')+1); }

                 if (indexlocatie.indexOf('/rischuman33/')==0){ indexlocatie = '/' + indexlocatie.substring(13, indexlocatie.length); }
				 if (indexlocatie.indexOf('\\rischuman33\\')>-1){ indexlocatie = indexlocatie.substring(0, indexlocatie.indexOf('\\rischuman33\\')+1); }


	       top.location.href=indexlocatie+'index.html?riscmainFrame='+bestandspad+bestandsnaam+'.htm';
			 }
			 else
			 {
	       top.location.href='index.html?riscmainFrame='+bestandsnaam+'.htm';
			 }
   }
   else
   {
/*
    var toptitle01='';
    var toptitle02='';
    var toptitle03='';
    var toplink01='';
    var toplink02='';
    var toplink03='';
    if (producthoofdcat=='rf') {
      toptitle01='RISC Framework';
      toplink01='riscframework.htm';}
    else
    if (producthoofdcat=='sw') {
      toptitle01='Software';
      toplink01='software.htm';}
    else
    if (producthoofdcat=='tn') {
      toptitle01='Training';
      toplink01='training.htm';}
    else
    if (producthoofdcat=='nw') {
      toptitle01='News';
      toplink01='news.htm';}
    else
    if (producthoofdcat=='nf') {
      toptitle01='Information';
      toplink01='information.htm';}
    else
    if (producthoofdcat=='dw') {
      toptitle01='Download';
      toplink01='download.htm';}
    else
    if (producthoofdcat=='sr') {
      toptitle01='Search';
      toplink01='search.htm';}
    else
    if (producthoofdcat=='ct') {
      toptitle01='Contact';
      toplink01='contact.htm';}


    if (productsubcat1=='ri') {
      toptitle02='RISC-HUMAN';
      toplink02='sw_rischuman.htm';}
    else
    if (productsubcat1=='su') {
      toptitle02='SUS';
      toplink02='sw_sus.htm';}
    else
    if (productsubcat1=='vl') {
      toptitle02='VLIER-HUMAAN';
      toplink02='sw_vlierhumaan.htm';}
    else
    if (productsubcat1=='fq') {
      toptitle02='FAQs';
      toplink02='nf_faqs.htm';}
    else
    if (productsubcat1=='pc') {
      toptitle02='Publications';
      toplink02='nf_publications.htm';}
    with (parent.menutopFrame.document) {
      open();
      writeln('<HTML><HEAD><title>RISC topmenu</title>');
      writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
      writeln('<link rel="stylesheet" href="topmenu.css">');
      writeln('</HEAD>');
      writeln('<BODY bgcolor="#FFFFCC" background="images/topbar.gif" leftmargin="20" topmargin="0" marginwidth="20" marginheight="0">');
      writeln('<TABLE border="0">');
      writeln('  <TR>');
      writeln('    <TD class="topmenutekst" height="40" width="120"><A HREF="'+toplink01+'" TARGET="riscmainFrame">'+toptitle01+'<\/A><\/TD>');
      writeln('    <TD class="topmenutekst" height="40" width="120"><A HREF="'+toplink02+'" TARGET="riscmainFrame">'+toptitle02+'<\/A><\/TD>');
      writeln('    <TD class="topmenutekst" height="40" width="120"><A HREF="'+toplink03+'" TARGET="riscmainFrame">'+toptitle03+'<\/A><\/TD>');
      writeln('  <\/TR>');
      writeln('<\/TABLE>');
      writeln('<\/BODY><\/HTML>');
      close();
    }
*/    
    if (parent.frames['menuFrame']!=null) {
      parent.menuFrame.MM_nbGroup('down','group1', riscmenuname,'images/'+riscmenuname+'_hi.gif',1);
    }
   }
}//function riscmainFramecheck()