// if ( ! parent.menu_top )
// {
  //*****************************************************************************
  //* loads frameset if frame is tried to be loaded directly                    *
  //*****************************************************************************
//  self.location.href = "http://homepages.fh-giessen.de/~hg10013";
// }
// else
// {
  //*****************************************************************************
  //* load styles                                                               *
  //*****************************************************************************
  setCss (parent.getStyleVar(),parent.getCssDir());
// }



//*****************************************************************************
//* load styles                                                               *
//*****************************************************************************
function setCss(style, dir)
{
	if (parseInt(navigator.appVersion.substring(0,1))>=4)
	{
	  document.open();
          document.write("<link REL=\"stylesheet\" HREF=\"" + parent.getCssDir() + "/style_"  + style  + ".css\" TYPE=\"text/css\">");
//        document.write("<link REL=\"stylesheet\" HREF=\"D:/Data/Projekte/.www/css/style_1.css\" TYPE=\"text/css\">");
	} 
}


//*****************************************************************************
//* handle subwindows and history                                             *
//*****************************************************************************
// when having hitten the BACK-Button it happens to the _info frame, that it has
// to be pushed back one in history although its dedicated main frame has not yet
// received a BACK event. For that reason the _info frame has to push its dedicated
// main frame by itself. That is done by comparing the actual name of the main frame 
// with the name of the dedicated main frame (which is known and forwarded with
// parameter "mainfile". If these names differ, the pushing need not be done.
// If these names are the same, the main frame has to be pushed back by the
// _info frame
function goBack(mainfile) 
{
  // go back in history only if file, that is dedicated to _info file has not already been changed
  filenameBegin  = parent.main.location.href.lastIndexOf("/");
  filenameLength = parent.main.location.href.length - filenameBegin;
  filename       = parent.main.location.href.substr(filenameBegin+1, filenameLength);
  if (filename == mainfile)
  {
    // alert("unloading: " + filename );
    parent.main.history.go(-1);
  }
  else
  {
    // alert("do not unload: " + mainfile + " (already: " + filename );
  }
}

// when coming back to a main frame, this main frame initially tries to load its
// dedicated _info frame, causing the original _info frame to be unload and
// loaded again. During unloading the _intro frame would try to push back its
// dedicated main frame, which would work, since it is already existent. For that
// reason, the _info frame has to be prevented from beeing loaded if already
// loaded.
function setInfo(infofile)
{ // avoid loading subwindow if already present
  filenameBegin  = parent.menu_sub.location.href.lastIndexOf("/");
  filenameLength = parent.menu_sub.location.href.length - filenameBegin;
  filename       = parent.menu_sub.location.href.substr(filenameBegin+1, filenameLength);
  if (filename != infofile)
  {
    // alert("loading: " + infofile + " --> " + filename  );
    parent.menu_sub.location.href = infofile;
  }
  else
  {
    // alert("do not load " + filename  );
  }
  
} 


//*****************************************************************************
//* select from menue                                                         *
//*****************************************************************************
function jump(menu) {
  ref    = menu.choice.options[menu.choice.selectedIndex].value;
  target = "";
  splitc = ref.lastIndexOf("@");
  if (splitc != -1) {
    loc    = ref.substring(0,splitc);
    target = ref.substring(splitc+1,1000);
  }
  else {
    loc    = ref;
    target = "_self";
  };
  if (ref != "") {
    lowtarget=target.toLowerCase();
    if       (lowtarget == "_self"  ) {window.location=loc;}
    else {if (lowtarget == "_top"   ) {top.location=loc;}
    else {if (lowtarget == "_blank" ) {window.open(loc);}
    else {if (lowtarget == "_parent") {parent.location=loc;}
    else                              {parent.frames[target].location=loc;}; }}}
  }
}

//*****************************************************************************
//* opens URL in new window                                                   *
//*****************************************************************************
function openWin(url_value, window)
{
  myWin= open ( url_value,
                window,
                "width=500,height=500,status=no,toolbar=no,menubar=no");
}                                

//*****************************************************************************
//* opens URL in new window, considering parameters                           *
//*****************************************************************************
/*
function openWindow(file,window)
{
  param = "Color=" + parent.getColorStyleVar() + ", " +
          "Font="  + parent.getFontStyleVar()  + ", " +
          "Size="  + parent.getSizeStyleVar()  + ", " +
          "Dir="   + parent.getCssDir();
  // ATTENTION: Assuming that directory is at last position !!!
  param = file + "?" + escape(param);
  openWin(param, window);
}


//*****************************************************************************
//* prints date of last modification of file in main-window                   *
//*****************************************************************************
function lastChange()
{
  zeit1  = new Date(parent.main.document.lastModified);
  monat1 = zeit1.getMonth()+1;
  document.write( ((zeit1.getDate()<10)? "0" : "") +
                    zeit1.getDate()                +
		    "."                            +
		  ((monat1<10)?"0":"")             +
		    monat1                         +
		    "."                            +
		    zeit1.getYear()                  );
}
*/
