//_____________________________________________________________
// Initialisierung der uniflash-Seite
// wird bei jedem Aufruf ausgeführt


function start_uf(){

  var scr_size = "screen_width=" + screen.width + "&screen_height=" +  screen.height ;

  window.document.write( "<BR><BR><BR><BR><BR>\n<table border='0' width='100%' align='center' valign='middle'>\n" ) ;
  window.document.write( "<tr><td width='20%'>.</td><td colspan='2'>\n" ) ;
  window.document.write( "<a href='http://uniflash.de/cgi-bin/uniflash.pl?ct=m&ln=ST&" + scr_size ) ;

// Bild
//  window.document.write( "<img src='/pics/head/uniflash_start.gif' border='0'>\n" ) ;

// Flashfilm
  window.document.write( "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=2,0,0,0' width='656' height='342'>\n" ) ;
  window.document.write( "<param name='SRC' value='/pics/head/intro.swf'>\n" ) ;
  window.document.write( "<embed src='/pics/head/intro.swf' pluginspage='http://www.macromedia.com/shockwave/download/' width='656' height='342'></embed>\n" ) ;
  window.document.write( "</object>\n</a>\n" ) ;

  window.document.write( "</td><td width='20%'></td>\n</tr>\n" ) ;
  window.document.write( "<tr>" ) ;

//  window.document.write( "<a href='http://uniflash.de/cgi-bin/uniflash.pl?domain=s&ct=m&ln=ST&" + scr_size + "'  onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('software','','http://uniflash.de/pics/head/bl_sware2.gif',1)\">" ) ;
//  window.document.write( "<img name='software' border='0' src='http://uniflash.de/pics/head/bl_sware1.gif' width='117' height='31'></a>" ) ;

//  window.document.write( "<a href='http://uniflash.de/cgi-bin/uniflash.pl?domain=w&ct=m&ln=ST&" + scr_size + "' onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('werbung','','http://uniflash.de/pics/head/bl_werbe2.gif',1)\">" ) ;
//  window.document.write( "<img name='werbung' border='0' src='http://uniflash.de/pics/head/bl_werbe1.gif' width='117' height='31'></a>" ) ;

  window.document.write( "<td></td>\n<td align='left' valign='top'><a href='http://uniflash.de/cgi-bin/uniflash.pl?domain=s&ct=m&ln=ST&" + scr_size + "'>" ) ;
  window.document.write( "<img name='software' border='0' src='http://uniflash.de/pics/head/bl_sware1.gif' width='117' height='31'></a></td>" ) ;

  window.document.write( "<td align='right' valign='top'>\n<!-- \n<a href='http://uniflash.de/cgi-bin/uniflash.pl?domain=w&ct=m&ln=ST&" + scr_size + "'>" ) ;
  window.document.write( "<img name='werbung' border='0' src='http://uniflash.de/pics/head/bl_werbe1.gif' width='117' height='31'></a>\n-->\n</td>" ) ;

  window.document.write( "<td></td>\n</tr>\n" ) ;
  window.document.write( "</table>\n" ) ;
}


var load_ready = false ;


function init(){
  var head_pics = "http://uniflash.de/pics/head" ;

  PR1 = new Image() ;
  PR1.src = head_pics + "/PR1.gif" ;
  PR2 = new Image() ;
  PR2.src = head_pics + "/PR2.gif" ;

  SV1 = new Image() ;
  SV1.src = head_pics + "/SV1.gif" ;
  SV2 = new Image() ;
  SV2.src = head_pics + "/SV2.gif" ;

  RF1 = new Image() ;
  RF1.src = head_pics + "/RF1.gif" ;
  RF2 = new Image() ;
  RF2.src = head_pics + "/RF2.gif" ;

  PT1 = new Image() ;
  PT1.src = head_pics + "/PT1.gif" ;
  PT2 = new Image() ;
  PT2.src = head_pics + "/PT2.gif" ;

  UF1 = new Image() ;
  UF1.src = head_pics + "/UF1.gif" ;
  UF2 = new Image() ;
  UF2.src = head_pics + "/UF2.gif" ;

  KT1 = new Image() ;
  KT1.src = head_pics + "/KT1.gif" ;
  KT2 = new Image() ;
  KT2.src = head_pics + "/KT2.gif" ;


  DW1 = new Image() ;
  DW1.src = head_pics + "/DW1.gif" ;
  DW2 = new Image() ;
  DW2.src = head_pics + "/DW2.gif" ;

  WFL1 = new Image() ;
  WFL1.src = head_pics + "/WFL1.gif" ;
  WFL2 = new Image() ;
  WFL2.src = head_pics + "/WFL2.gif" ;

  WSV1 = new Image() ;
  WSV1.src = head_pics + "/WSV1.gif" ;
  WSV2 = new Image() ;
  WSV2.src = head_pics + "/WSV2.gif" ;

  WUF1 = new Image() ;
  WUF1.src = head_pics + "/WUF1.gif" ;
  WUF2 = new Image() ;
  WUF2.src = head_pics + "/WUF2.gif" ;

  WKT1 = new Image() ;
  WKT1.src = head_pics + "/WKT1.gif" ;
  WKT2 = new Image() ;
  WKT2.src = head_pics + "/WKT2.gif" ;

  WDW1 = new Image() ;
  WDW1.src = head_pics + "/WDW1.gif" ;
  WDW2 = new Image() ;
  WDW2.src = head_pics + "/WDW2.gif" ;


  g1_1 = new Image() ;
  g1_1.src = head_pics + "/g1_1.gif" ;

  g2_1 = new Image() ;
  g2_1.src = head_pics + "/g2_1.gif" ;

  g3_1 = new Image() ;
  g3_1.src = head_pics + "/g3_1.gif" ;

  g1_2 = new Image() ;
  g1_2.src = head_pics + "/g1_2.gif" ;

  g2_2 = new Image() ;
  g2_2.src = head_pics + "/g2_2.gif" ;

  g3_2 = new Image() ;
  g3_2.src = head_pics + "/g3_2.gif" ;

  load_ready = true ;
  return true ;
}


//________________________________________________________
// START: Funktionen für den Content der uniflash.de-Seite

// Klick im Hauptmenu
function mclick( nmenu ){         // wechselt Menu- und Textfeld-Layer
  if( load_ready ){
    var menu_on = 'f' ;
    if( typeof amenu != 'undefined' ){
       sh_lay( "document.layers[\'menu" + amenu + "\']", "document.all[\'menu" + amenu + "\']", "hide" );
       sh_lay( "document.layers[\'mehr" + amenu + "\']", "document.all[\'mehr" + amenu + "\']", "hide" );
       switch_img( 'm' ) ;
    }
    if( typeof atext != 'undefined' ){
       sh_lay( "document.layers[\'" + atext + "\']",     "document.all[\'" + atext + "\']",     "hide" ) ;
       sh_lay( "document.layers[\'mehr" + atext + "\']", "document.all[\'mehr" + atext + "\']", "hide" ) ;
    }
    menu_on = sh_lay( "document.layers[\'menu" + nmenu + "\']",  "document.all[\'menu" + nmenu + "\']",  "show" ) ;

    // default_menu-Layer ein- oder ausblenden
    if( menu_on = 'f' ){      sh_lay( "document.layers['default_menu']",  "document.all['default_menu']",  "show" ) }
    else if( menu_on = 't' ){ sh_lay( "document.layers['default_menu']",  "document.all['default_menu']",  "hide" ) }

    sh_lay( "document.layers[\'"     + nmenu + "\']",  "document.all[\'"     + nmenu + "\']",  "show" ) ;
    sh_lay( "document.layers[\'mehr" + nmenu + "\']",  "document.all[\'mehr" + nmenu + "\']",  "show" ) ;
    sh_lay( "document.layers[\'back" + nmenu + "\']",  "document.all[\'back" + nmenu + "\']",  "show" ) ;
    amenu = nmenu ;
    atext = nmenu ;
  }
}

// Klick im Nebenmenu

function tclick( ntext ){        // wechselt den Textfeld-Layer
  if( load_ready ){
    // alten Text raus, neuen Text rein
    if( typeof atext != 'undefined' ){ sh_lay( "document.layers[\'" + atext + "\']", "document.all[\'" + atext + "\']", "hide" ) } ;
    if( typeof atext != 'undefined' ){ sh_lay( "document.layers[\'back" + atext + "\']", "document.all[\'back" + atext + "\']", "hide" ) } ;
    if( typeof ntext != 'undefined' ){ sh_lay( "document.layers[\'" + ntext + "\']", "document.all[\'" + ntext + "\']", "show" ) } ;

    // altes 'mehr' raus, neues 'mehr' rein
    if( typeof atext != 'undefined' ){ sh_lay( "document.layers[\'mehr" + atext + "\']", "document.all[\'mehr" + atext + "\']", "hide" ) } ;
    if( typeof ntext != 'undefined' ){ sh_lay( "document.layers[\'mehr" + ntext + "\']", "document.all[\'mehr" + ntext + "\']", "show" ) } ;
    if( typeof ntext != 'undefined' ){ sh_lay( "document.layers[\'back" + ntext + "\']", "document.all[\'back" + ntext + "\']", "show" ) } ;
    atext = ntext ;
  }
}


function sh_lay() {
  var rv = 'f' ;
  if( load_ready ){
    var i, visStr, args, theObj;
    args = sh_lay.arguments;
    for (i=0; i<(args.length-2); i+=3) {
      visStr = args[i+2] ;
      if (navigator.appName == "Netscape" && document.layers != null) {
        theObj = eval(args[i]);
        if (theObj){
          theObj.visibility = visStr;
          if(visStr = 'show'){ rv = 't' }
        }
      }
      else if (document.all != null) {
        if (visStr == "show") visStr = "visible";
        if (visStr == "hide") visStr = "hidden";
        theObj = eval(args[i+1]);
        if (theObj){
          theObj.style.visibility = visStr ;
          if(visStr = 'visible'){ rv = 't' }
        }
      }
    }
  }
  return rv ;
}

//________________________________________________________________________
// START: Funktionen für die Funktionalität der Seitenmenüs am linken Rand
// drei Bilder austauschen

// praefix ist:
// m, falls Wechsel im Seitenmenu
// hm, falls im Wechsel im Hauptemnu
// lmenu gibt die Menu-Kennung an

function switch_img( praefix, lmenu ){
  if( document.images != null && load_ready ){
  //   alert(  "Browser: " + navigator.appName ) ;
    if( praefix == 'm' ){

      // ausschalten
      if( typeof am != 'undefined' ){
        document.images[ 'g1' + am ].src = eval( 'g1_1.src' )
        document.images[ 'g2' + am ].src = eval( 'g2_1.src' )
        document.images[ 'g3' + am ].src = eval( 'g3_1.src' )
      }

      // einschalten
      if( typeof lmenu != 'undefined' ){
        document.images[ 'g1' + lmenu ].src = eval( 'g1_2.src' )
        document.images[ 'g2' + lmenu ].src = eval( 'g2_2.src' )
        document.images[ 'g3' + lmenu ].src = eval( 'g3_2.src' )

        // alte merken
        am = lmenu ;
      }
    }
    if( praefix == 'hm' ){

      // ausschalten
      if( typeof ahm != 'undefined' ){ document.images[ 'i' + ahm ].src = eval( ahm + '1.src' ) }

      // anschalten
      document.images[ 'i' + lmenu ].src = eval( lmenu + '2.src' ) ;

      // altes merken
      ahm = lmenu  ;
    }
  }
}



// ENDE: Funktionen für die Funktionalität des Hauptmenüs am linken Rand
//_______________________________________________________________________




//_______________________________________________________________________
// START: Funktionen für die Funktionalität des Hauptmenüs am oberen Rand

function MM_preloadImages() { //v3.0
  var d=document;
  if(d.images){ if(!d.MM_p) d.MM_p=new Array() ;
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
    for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
    }
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n];
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0; !x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments;
  document.MM_sr=new Array;
  for(i = 0; i < (a.length-2); i += 3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x ;
    if(!x.oSrc) x.oSrc=x.src ;
    x.src=a[i+2] ;
  }
}

// ENDE: Funktionen für die Funktionalität des Hauptmenüs am oberen Rand
//_______________________________________________________________________



// ENDE: Funktionen für den Content der uniflash.de-Seite
//_______________________________________________________





