FTG = new function () {
  this.showSportarten = "block";
  this.centerPage_pageX = null;

  this.centerPage = function () {
    try{
      var screenWidth = document.body.clientWidth;
      if( screenWidth > 1250 ){
        screenWidth = ( screenWidth - 1250 ) / 2;
        if( screenWidth > 0 ){
          if( !this.centerPage_pageX ){
            document.getElementById( "seite" ).style.left = screenWidth + "px";
            document.getElementById( "fuss" ).style.left = screenWidth + "px";
            this.centerPage_pageX = screenWidth;
          }
        }
        this.log( "FTG.centerPage to: " + FTG.centerPage_pageX );
      }
    }catch( e ){
      this.log( '\t ERROR: FTG.centerPage: \n\t' + e );
    }
  }

  this.showHideAlleSportarten = function(){
    try{
      for( i = 0; i < 1000; i++ ){
        document.getElementById( "sportart_" + i ).style.display = this.showSportarten;
      }
    }catch( e ){}
    if( this.showSportarten == "block" ){
      document.getElementById( "SportartenButton" ).src = '/_technik/img/alle-sportarten-off.gif';
      this.showSportarten = "none";
    }else{
      document.getElementById( "SportartenButton" ).src = '/_technik/img/alle-sportarten.gif';
      this.showSportarten = "block";
    }
  }
  
  this.getDomain = function(){
    try{
      var tmp = "";
      var rootfolder = "";
      var tmpArray = window.location.href.split("/");
      for( var i = 0; i < tmpArray.length; i++ ){
          tmp +=  i + ": " + tmpArray[ i ] + "\n";
          if( i == 3 ){
            rootfolder = tmpArray[ i ];
          }
      }
      return rootfolder;
    }catch( e ){
      this.log( "getDomain ERROR: " + e );
    }
  }

  this.historyBack = function(){
    var newURL = "";
    try{
      var path = document.location.href;
      path = path.split( '/' );
      var path2 = path[5].split( ',');
      newURL = "/" + path[3] + "/" + path[4] + "/" + path2[0] + ".php";
      FTG.log( "newURL: " + newURL );
      document.location.href = newURL;
    }catch( e ){
      this.log( "historyBack ERROR: " + e );
    }
  }

  this.historyBackFTG = function(){
    try{
      if( navigator.userAgent.indexOf('Firefox') >= 0 ){
        window.history.back();
      }else{
        var tmp = "";
        var tmpArray = window.location.hash.split("#");
        var tmpURL = tmpArray[ tmpArray.length-1 ];
        /**
        for( var i = 0; i < tmpArray.length; i++ ){
          tmp +=  i + ": " + tmpArray[ i ] + "\n";
        }
        alert( tmpURL + "\n____________\n" + document.referer + "\n" + document.referrer + "\n" + tmpArray.length + "\n" + tmp );
        **/
        if( tmpURL != "" ){
          document.location.href = tmpURL;
        }
      }
    }catch( e ){
      this.log( "historyBackFTG ERROR: " + e );
    }
  }

  this.historyBackSPOFA = function(){
    try{
      window.history.back();
      //document.location.href = 'http://www.ftg-sportfabrik.de/sportfabrik/';
    }catch( e ){
      this.log( "historyBackSPOFA ERROR: " + e );
    }
  }

  this.historyBackArticle = function(){
    var newURL = "";
    try{
      var path = document.location.href;
      path = path.split( '/' );
      this.log( "historyBack path.length: " + path.length );
      var path2 = path[ path.length-1 ].split( '?');
      for( var i = 0; i < (path.length-1); i++ ){
        var prepath = "";
        if( i > 0){
          prepath = "/";
        }
        newURL += prepath + path[i];
      }
      for( i = 0; i < (path2.length-1); i++ ){
        //newURL += "/" + path2[ i ];
      }
      //var newURL = "/" + path[3] + "/" + path[4] + "/" + path2[0] + ".php";
      FTG.log( "newURL: " + newURL );
      document.location.href = newURL;
    }catch( e ){
      this.log( "historyBack ERROR: " + e );
    }
  }

  this.popup = function( file, w, h, s, pName ) {
    var zeit = new Date();
    var ms = zeit.getTime();
    var scroll = "no";
    var wName = "FTGPopUp_" + ms;
    if( pName && pName != "" ){
      wName = pName;
    }
    if ( s == 1 ){
      scroll = "yes";
    }
    open( file, wName,
            +'location=0,'
            +'menubar=0,'
            +'scrollbars='+scroll+','
            +'toolbar=0,'
            +'status=0,'
            +'top=50,left=50,'
            +'width='+w+',height='+h);
    FTG.log( "PopUp opened with this Name: " + wName );
  }

  this.expressInstallSwfurl = 'http://www.adobe.com/go/getflashplayer_de';
  
  this.writeFlash = function( pURL, pID, pWidth, pHeight, pVersion, flashVars, params, attributes ){
    var output = "";
    var postfix = "";
    try{
      var search = location.search.replace( /\?/g, "" );
      if( search != "" ){
        postfix = "?" + search;
      }
      swfobject.embedSWF( pURL + postfix, pID, pWidth, pHeight, pVersion, this.expressInstallSwfurl, flashVars, params, attributes );
    }catch( e ){
      if( e == "TypeError: n has no properties" ){
        output = "DIV Bereich mit der ID " + pTarget + " ist undefined";
      }
      this.log( "writeFlash ERROR: " + output + " --> " +  e );
    }
  }    


  this.log = function( pWhat ){
    try{
      if( navigator.userAgent.indexOf('Firefox') >= 0 ){
        console.log( "FTG: " + pWhat );
      }
    }catch( e ){}
  }
  
  /* Event Listener                      */
  /* FTG.addEvent( window, 'load', FUNKTION ); */
  this.addEvent = function( obj, evType, func ){
    if (obj.addEventListener){ 
      obj.addEventListener( evType, func, false ); 
      return true; 
    }else if ( obj.attachEvent ){ 
      var r = obj.attachEvent( "on" + evType, func ); 
      return r; 
    }else { 
      return false; 
    }
  }

  this.getURL = function( url, my_id, callback_func, optional_var,  method){
    FTG.log( "getURL: " + url );
    var req, callback_func, url, optional_var;
    if(typeof(callback_func) == "undefined" || callback_func == "") {
      callback_func = "FTG.processStateChange";
    }
    if(typeof(optional_var) == "undefined" ) {
      optional_var = "";
    }
   if(typeof(method) == "undefined" || callback_func == "") {
      method = "GET";
    }
    if(url != "") {
      if(window.XMLHttpRequest) { 
        // Non-IE browsers oder IE 7
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {
          eval( callback_func )( req,my_id,optional_var,url );
        }
        try {
          req.open(method, url, true);
          var isbusy = true;
        } catch(e) {
          FTG.log( "ERROR: method: "+method+" | getURL: " + e ); 
          var isbusy = false;
        }
        if(isbusy){
          req.send(null);
        }
      } else if(window.ActiveXObject) {
        // IE < 7
        try { 
          req = new ActiveXObject("Msxml2.XMLHTTP"); 
        } catch(e) {
            try {
              req = new ActiveXObject("Microsoft.XMLHTTP");
            } catch(e) {
              // Error
              FTG.log( "ERROR: method:"+method+" | getURL: " + e );
            }
        }
        if(req) {
          req.onreadystatechange = function() {
            eval( callback_func )(req,my_id,optional_var,url);
          }
          try { 
            req.open(method, url, true);
            var isbusy = true;
          } catch(e) {
            // Error
            FTG.log( "ERROR: method:"+method+" | getURL: " + e );
            var isbusy = false;
          }
          if(isbusy){
            req.send();
          }
        }
      } else {
        // AJAX geht nicht
        FTG.log( "ERROR: method:"+method+" | getURL: " + "AJAX geht nicht" );
      }
    }
  }

  this.processStateChange = function( req, my_id, optional_var, url ) {
    // Complete
    try{
      if( req.readyState == 4 ) {
        // OK response
        if(req.status == 200) {
          if( document.getElementById( my_id ) ){
            this.loading = true;
            document.getElementById( my_id ).innerHTML = req.responseText;
          }
        } else {
          if( document.getElementById( my_id ) ){
            var myText = "\n";
            myText += '<table style="display:none"><tr><td class="font_18">' + req.responseText + '</td></tr></table><br />';
            document.getElementById( my_id ).innerHTML = myText;
          }else{
            // Bereich nicht definiert
          }
        }
      }else{
        if( this.loading == true ){
          this.loading = false;
          document.getElementById( my_id ).innerHTML = '<div style="text-align: center;"><img src="/_technik/img/ajax_loading.gif" width="150" height="150" alt="loading" title="loading"></div>';
        }
      }
    }catch( e ){
      FTG.log( "ERROR: FTG.processStateChange: " + e );
    }
  }
  
}();


FTG_Menue = new function() {
  this.menue = [];
  this.menueNames = [];
  this.active = 0;
  this.counter = 0;
  this.currentItem = 0;

  this.init = function( pIndex, pActive, pName ){
    this.menue[ this.counter ] = pIndex;
    this.menueNames[ this.counter ] = pName.toLowerCase();
    this.counter++;
    this.active = pActive;
  }
  
  this.switcher = function( pIndex ){
    try{
      var laenge = this.menue.length;
      var preMainMenue = "main_menue_";
      var preMainMenueFont = "main_menue_font_";
      for(var i = 0; i < laenge; i++){
        if( pIndex == i ){
          document.getElementById( preMainMenue + i ).className = "item active";
          document.getElementById( preMainMenueFont + i ).className = "font_20";
        }else{
          document.getElementById( preMainMenue + i ).className = "item ";
          document.getElementById( preMainMenueFont + i ).className = "font_21";
        }
      }
    }catch( e ){
      
    }
  }
  
  // GETTER
  this.getActive = function(){
    return this.active;
  }
  
  this.getCurrentItem = function(){
    return this.currentItem;
  }
  
  //SETTER
  this.setCurrentItem = function( pNum ){ 
    if( pNum == 0 ){
      //this.currentItem = FTG_Menue.testUrl();
      this.currentItem = pNum;
      this.active = this.currentItem;
    }else{
      this.currentItem = pNum;
    }
    FTG.log( "this.setCurrentItem: " + this.currentItem );
  }

  this.testUrl = function(){
    var tmpNumber = 0;
    var tmp_arr = document.location.href.split( "/" );
    if( typeof( tmp_arr[5] ) != "undefined" ){
      for(var i = 0; i < this.menueNames.length; i++){
        if( this.menueNames[i] == tmp_arr[4] ){
          //FTG.log( "1 JA: " + this.menueNames[i] + " == " + tmp_arr[4] );
          this.currentItem = i;
          this.active = i;
          FTG_Menue.switcher( i );
        }else{
          //FTG.log( "1 NEIN: " + this.menueNames[i] + " == " + tmp_arr[4] );
        }
      } 
    }else{
      for(var i = 0; i < this.menueNames.length; i++){
        if( this.menueNames[i] == tmp_arr[4] ){
          //FTG.log( "2 JA: " + this.menueNames[i] + " == " + tmp_arr[4] );
          this.currentItem = i;
          this.active = i;
          FTG_Menue.switcher( i );
        }else{
          //FTG.log( "2 NEIN: " + this.menueNames[i] + " == " + tmp_arr[4] );
        }
      } 
    }
    return tmpNumber;
  }

}

FTG_Sizer = new function() {
  this.basics = {};
  this.basics.minWidth  = 1255;
  this.basics.status  = false;
  this.basics.button = "switcherImg";
  this.basics.addInnerHtml = false;
  this.basics.switcherImg   = "/_technik/img/bg/bg_switcher.gif";
  this.basics.switcherImg2  = "/_technik/img/bg/bg_switcher2.gif";

  this.init = function(){
    //alert( "this.getWidth(): " + this.getWidth() + "\nthis.getMinWidth(): " + this.getMinWidth() );
    FTG.log( "FTG_Sizer.init: width: " + this.getWidth() );
    FTG.log( "FTG_Sizer.init: height: " + this.getHeight() );
    if( this.getWidth() < this.getMinWidth() ){
      FTG.log( "FTG_Sizer.init: 2 small, lets resize..." + this.getWidth() );
      this.reposition();
    }else{
      this.remove();
    }
  }
  
  this.reposition = function(){
    try{
      document.getElementById( 'seite' ).style.width = "1000px";
      document.getElementById( 'koerper' ).style.width = "1000px";
      document.getElementById( 'koerper' ).style.overflow = "hidden";
      document.getElementById( 'kopf' ).style.width = "1000px";
      document.getElementById( 'kopf' ).style.overflow = "hidden";
      document.getElementById( 'bild' ).style.width = "780px";
      document.getElementById( 'inhalt' ).style.width = "1000px";
      document.getElementById( 'inhalt' ).style.overflow = "hidden";
      document.getElementById( 'inhaltR' ).style.display = "none";
      document.getElementById( 'inhaltR' ).style.left = "-315px";
      //document.getElementById( 'inhaltR' ).style.top = (-document.getElementById( this.basics.button ).height - 11 ) + "px";
      document.getElementById( 'inhaltR' ).style.top = "-450px";
      document.getElementById( 'rechts' ).style.width = "34px";
      document.getElementById( 'switcher' ).style.display = "block";
      document.getElementById( 'switcherImg' ).style.display = "block";
      document.getElementById( this.basics.button ).style.cursor = "pointer";
      document.getElementById( this.basics.button ).onclick = function(){
        FTG.log( "rechts.onclick --> FTG_Sizer.showhide()" );
        FTG_Sizer.showhide();
      }
    }catch( e ){
      FTG.log( "ERROR: FTG_Sizer.reposition: " + e );
    }
  }

  this.remove = function(){
    try{
      delete document.getElementById( this.basics.button ).onclick;
      delete document.getElementById( this.basics.button ).style.cursor;
      FTG.log( "FTG_Sizer.remove: rechts.onclick & cursor removed..." );
    }catch( e ){
      FTG.log( "ERROR: FTG_Sizer.remove: " + e );
    }
  }
  
  this.showhide = function(){
    try{
      if( this.getStatus() ){ 
        FTG.log( "FTG_Sizer.showhide: show: " + this.getStatus() );
        this.basics.status  = false;
        document.getElementById( this.basics.button ).src = this.basics.switcherImg;
        //document.getElementById( 'inhaltR' ).style.position = "relative";
        document.getElementById( 'inhaltR' ).style.display = "none";
        document.getElementById( 'inhaltM' ).style.display = "block";
      }else{
        FTG.log( "FTG_Sizer.showhide: hide: " + this.getStatus() );
        this.basics.status  = true;
        document.getElementById( this.basics.button ).src = this.basics.switcherImg2;
        this.reposition();
        //document.getElementById( 'inhaltR' ).style.position = "absolute";
        document.getElementById( 'inhaltR' ).style.display = "block";
        document.getElementById( 'inhaltM' ).style.display = "none";
      }
    }catch( e ){
      FTG.log( "ERROR: FTG_Sizer.showhide: " + e );
    }
  }
  
  // GETTER
  this.getWidth = function(){
    if( window.innerWidth ){
      //alert( "window.innerWidth: " + window.innerWidth );
      return window.innerWidth;
    }else{
      //alert( "document.body.clientWidth: " + document.body.clientWidth );
      return document.body.clientWidth;
    }
  }
  
  this.getHeight = function(){ 
    if( window.innerHeight){
      return window.innerHeight;
    }else{
      return document.body.clientHeight;
    }
  }
  
  this.getMinWidth = function(){ 
    return this.basics.minWidth;
  }
  
  this.getStatus = function(){ 
    return this.basics.status;
  }
    
}

FTG_Calender = new function() {
  this.kalender = [];
  this.kalender[ "Montag" ] = [];
  this.kalender[ "Dienstag" ] = [];
  this.kalender[ "Mittwoch" ] = [];
  this.kalender[ "Donnerstag" ] = [];
  this.kalender[ "Freitag" ] = [];
  this.kalender[ "Samstag" ] = [];
  this.kalender[ "Sonntag" ] = [];
  this.sortedArray = [];
  this.counter  = 0;
  this.containerID = null;
  
  this.numsort = function (a, b) {
    return a - b;
  }
  
  this.init = function( pDay ){
    var tmp = "";
    var day = pDay;
    var i = 0;
    var tmpH1 = "";
    var tmpH2 = "";
    try{
      for( z = 0; z < 24; z++ ){
        tmpH2 = String( z );
        if( z < 10 ){
          tmpH2 = "0" + z;
        }
        for( i = 0; i < this.getItemsCount( day ); i++ ){
          if( typeof( this.kalender[ day ][ i ] ) != "undefined" ){
            tmpH1 = this.kalender[ day ][ i ][ "timeStart" ].slice(0, 2);
            if( tmpH1 == tmpH2 ){
              this.sortedArray.push( this.kalender[ day ][ i ] );
              //FTG.log( "FTG_Calender.init: " + tmpH1 + " == " + tmpH2 + " -> " + this.kalender[ day ][ i ]["name"] );
            }
          }
        }
      }
      tmp += '<div class="modul kalenderItem">' + "\n";
      tmp += '  <div class="top">&nbsp;</div>' + "\n";
      tmp += '  <div class="middle">' + "\n";
      for( i = 0; i < this.sortedArray.length && i < 30; i++ ){
        if( typeof( this.sortedArray[ i ] ) != "undefined" ){
          tmp += '    <div class="rubrik font_1">' + "\n";
          tmp += '      ' + this.sortedArray[ i ][ "timeStart" ] + "\n";
          tmp += '      ' + ' - ' + "\n";
          tmp += '      ' + this.sortedArray[ i ][ "timeEnd" ] + "\n";
          tmp += '    </div>' + "\n";
          tmp += '    <div class="headline font_3" title="">' + "\n";
          tmp += '      ' + this.sortedArray[ i ][ "name" ] + "\n";
          tmp += '    </div>' + "\n";
          tmp += '    <div class="text font_0">' + "\n";
          tmp += '      ' + this.sortedArray[ i ][ "teasertext" ] + "\n";
          tmp += '    </div>' + "\n";
        }
      }
      tmp += '  </div>' + "\n";
      tmp += '  <div class="bottom">&nbsp;</div>' + "\n";
      tmp += '</div>' + "\n";
      document.getElementById( this.containerID ).innerHTML = tmp;
    }catch( e ){
      FTG.log( "ERROR: FTG_Calender.init: "+ i + ": " + e );
    }
  }
  
  this.addItem = function( pDay, pTime, pTimeStart, pTimeEnd, pName, pTeaserText, pLink ){
    try{
      switch( pTime ){
        case "0a":
        case "0b":
          pTime = "08:00-12:00";
        break;
        case "1a":
        case "1b":
          pTime = "12:00-18:00";
        break;
        case "2a":
        case "2b":
          pTime = "18:00-23:00";
        break;
        case "3a":
        case "3b":
          pTime = "23:00-08:00";
        break;
        case "4a":
        case "4b":
          pTime = "00:00-23:59";
        break;
        default:
        break;
      }
      this.kalender[ pDay ][ this.counter ] = [];
      this.kalender[ pDay ][ this.counter ][ "time" ] = pTime;
      this.kalender[ pDay ][ this.counter ][ "timeStart" ] = pTimeStart;
      this.kalender[ pDay ][ this.counter ][ "timeEnd" ] = pTimeEnd;
      this.kalender[ pDay ][ this.counter ][ "name" ] = pName;
      this.kalender[ pDay ][ this.counter ][ "teasertext" ] = pTeaserText;
      this.kalender[ pDay ][ this.counter ][ "link" ] = pLink;
      /**
      FTG.log( "\t" + 
        "Nr.: " + this.counter + " | day: " + pDay + "\n\t" + 
        "time: " + this.kalender[ pDay ][ this.counter ][ "time" ] + "\n\t" + 
        "name: " + this.kalender[ pDay ][ this.counter ][ "name" ] + "\n\t" + 
        "teasertext: " + this.kalender[ pDay ][ this.counter ][ "teasertext" ] 
      );
      **/
      this.counter++;
    }catch( e ){
      FTG.log( "ERROR: FTG_Calender.addItem: " + e );
    }
  }
  
  this.destroy = function(){
    this.kalender[ "Montag" ] = [];
    this.kalender[ "Dienstag" ] = [];
    this.kalender[ "Mittwoch" ] = [];
    this.kalender[ "Donnerstag" ] = [];
    this.kalender[ "Freitag" ] = [];
    this.kalender[ "Samstag" ] = [];
    this.kalender[ "Sonntag" ] = [];
    this.sortedArray = [];
  }
  
  // GETTER & SETTER
  this.getItemsCount = function( pDay ){
    try{
      return this.kalender[ pDay ].length;
    }catch(e){};
  }
  
  this.setContainer = function( pID ){
    this.containerID = pID;
  }

}

FTG_Google = new function() {
  this.tables = document.getElementsByTagName( 'table' );
  this.reloadInterval = "";
  this.counter  = 0;
  this.max      = 1;
  
  this.test = function() {
    FTG.log( 'ERROR: FTG_Google this.tables.length ' + this.tables.length );
    for(var i = 0; i < this.tables.length; i++){
      if( typeof( this.tables[i].style ) != 'undefined' ){
        if( this.tables[i].style == 'border: 1px solid rgb(0, 0, 0);' ){
          this.tables[i].style.display = 'none';
          //FTG.log( 'FTG_Google hide Google Ads ' + this.counter );
        }else{
          //FTG.log( 'ERROR: FTG_Google did not hide Google Ads ' + this.tables[i].style );
        }
      }
    }
    if( this.counter == 0 ){
      this.reloadInterval = window.setInterval( FTG_Google.reLoader, 100 );
    }else if( this.counter == this.max ){
      window.clearInterval( this.reloadInterval );
    }
    this.counter++;
  }

  this.reLoader = function(){
    try{
      FTG_Google.test();
    }catch(e){
    }
  }

}

FTG_Forms = new function() {
  this.borderStyle		= "1px solid red";
  this.borderStyleDefault	= "1px solid #A7A6AA";

  this.changeDocType = function() {
    var target = document.getElementsByName( 'doctype' )[ 0 ];
    if( target.selectedIndex == "2" ){
      FTG.log( "changeDocType: pdf" );
      document.getElementsByName( 'KontaktForm' )[ 0 ].action = "/_technik/pdf/pdf.php?pdf";
    }else{
      FTG.log( "changeDocType: html" );
      document.getElementsByName( 'KontaktForm' )[ 0 ].action = "/_technik/pdf/pdf.php";
    }
  }
  
  /** GENERIC (PDF) FORM CHECKER **/
  this.checkform = function() {
    if( this.validateGeneric() ){
      document.KontaktForm.submit();
      document.getElementById( "message" ).innerHTML = "";
    }else{
      document.getElementById( "message" ).innerHTML = "&nbsp;Bitte füllen Sie die rot markierten Pflichtfelder aus.";
    }
  }
  
  this.validateGeneric = function() {
    var tmpReturn = true;
    var inputs    = document.getElementsByTagName( 'input' );
    var selects   = document.getElementsByTagName( 'select' );
    var tmp       = "";
    
    // input
    for( var i = 0; i < inputs.length; i++ ){
      try{
        tmp = inputs[ i ];
        if( tmp.lang == "mandatory"){
          if( tmp.value == "" ){
            tmpReturn = false;
            tmp.style.border = this.borderStyle;
          }else{
            tmp.style.border = this.borderStyleDefault;
          }
        }
        FTG.log( "validate: " + tmp.name );
      }catch( e ){
      }
    }
    
    // select
    for( var i = 0; i < selects.length; i++ ){
      try{
        tmp = selects[ i ];
        if( tmp.lang == "mandatory"){
          if( tmp.value == "" || tmp.value == "Bitte auswählen..." ){
            tmpReturn = false;
            tmp.style.border = this.borderStyle;
          }else{
            tmp.style.border = this.borderStyleDefault;
          }
        }
        FTG.log( "validate: " + tmp.name );
      }catch( e ){
      }
    }
    
    return tmpReturn;
  }

  /** Kontakt & Adressänderungen **/
  this.submitform = function() {
    if( this.validate() ){
      document.KontaktForm.submit();
      document.getElementById( "message" ).innerHTML = "";
    }else{
      document.getElementById( "message" ).innerHTML = "&nbsp;Bitte füllen Sie die rot markierten Pflichtfelder aus.";
    }
  }
  
  this.validate = function() {
    var tmpReturn = false;
    try{
      var input_mail = document.getElementsByName( "e_Mail" )[0];
      if( input_mail.value == "" ){
        input_mail.style.border = this.borderStyle;
        tmpReturn = false;
      }else{
        input_mail.style.border = this.borderStyleDefault;
        tmpReturn = true;
      }
    }catch( e ){
    }
    try{
      var input_name = document.getElementsByName( "Name" )[0];
      if( input_name.value == "" ){
        input_name.style.border = this.borderStyle;
        tmpReturn = false;
      }else{
        input_name.style.border = this.borderStyleDefault;
        tmpReturn = true;
      }
    }catch( e ){
    }
    return tmpReturn;
  }

}

function INIT(){
  try{
    FTG_Sizer.init();
    FTG_Menue.testUrl();
    //FTG_Google.test();
  }catch( e ){ 
    FTG.log( "ERROR: INIT: " + e );
  }
}
FTG.addEvent( window, 'load', INIT );




function gotoSportart( pName ){
  FTG.log( "gotoSportart | Name: " + pName );
  var targetURL = "http://www.ftg-frankfurt.de/ftg/sportangebote/angebote-von-a-z,,";
  for(var i = 0; i < sportartenName.length; i++){
    if( sportartenName[i] == pName ){
      targetURL += sportartenIDs[i] + '.php';
      break;
    }
  } 
  FTG.log( "gotoSportart | targetURL: " + targetURL );
  document.location.href = targetURL;
}

