

 function Jump(ziel)
 {
 var Begriff = ziel;
var Teil = Begriff.substr(7, 19);
var Teil2 = Begriff.substr(30, 9);
//alert(Teil);
if(Teil == "www.freizeit-reisen" && Teil2 != "regionen/")

  location.href=ziel;
   else

 var Fenster = window.open(ziel,"Neu");
  if (Fenster) Fenster.focus();  
  }



function PopUp(w,h,ziel) {
  h = h - 20; var x=0, y=0, parameter="";
  if (w < screen.availWidth || h < screen.availHeight) {
    x = (screen.availWidth - w - 12) / 2;
    y = (screen.availHeight - h - 104) / 2;
    if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
    if (x<0 || y<0) { x=0; y=0; }
    else parameter = "width=" + w + ",height=" + h + ",";
  }
  parameter += "left=" + x + ",top=" + y;
  parameter += ",location=no,toolbar=no,status=no";
  parameter += ",menubar=yes,resizable=yes,scrollbars=yes";
  var Fenster = window.open(ziel,"PopUp",parameter);
  if (Fenster) Fenster.focus();

}

function BlurLinks(){
var a = document.getElementsByTagName('a');
var x = a.length;

for(i=0;i<x;i++){
a[i].onfocus = new Function("this.blur();");
}
}

 function toggle_me(id) {
 var e = document.getElementById(id);

 if(e.style.display == 'none')
 e.style.display = 'block';
 else
 e.style.display = 'none';
 }



 function show_me(id) {
 var e = document.getElementById(id);

 if(e.style.display = 'none')
 e.style.display = 'block';

 }

 function hide_me(id) {
 var e = document.getElementById(id);

 if(e.style.display == 'block')
 e.style.display = 'none';
 }



function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
function checkchars(form) {
var max=1000;
if (form.message.value.length > max) {
alert("Sie dürfen nicht mehr als 1000 Zeichen eingeben.\nSollten Sie mehr im Formuar stehen haben\nso haben Sie dies mit dem Kontextmenü der Maus eingefügt.\nBitte kopieren Sie den Text nur mit STRG + V in das Formularfeld.");
return false;
   }
else return true;
}



 // Branchensuche
   function onCatChange() {
  var dropdown = document.getElementsByName("kategorie_id")[0];

   if (dropdown.selectedIndex > 0 )
           document.finde.los.click();
   else  alert('Sie haben keine Auswahl getroffen');
    }

    //Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="#ffff00"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
        if (which.style&&intended.test(which.tagName)){
                if (ns6&&eventobj.nodeType==3)
                eventobj=eventobj.parentNode.parentNode
                return true
        }
        else
        return false
}

//Function to highlight form element
function highlight(e){
        eventobj=ns6? e.target : event.srcElement
        if (previous!=''){
                if (checkel(previous))
                previous.style.backgroundColor=''
                previous=eventobj
                if (checkel(eventobj))
                eventobj.style.backgroundColor=highlightcolor
        }
        else{
                if (checkel(eventobj))
                eventobj.style.backgroundColor=highlightcolor
                previous=eventobj
        }
}

////////////////////7

/* $Id: tooltip.js,v 1.1 2005/11/23 19:10:30 nijel Exp $ */


/**
 * Displays the Tooltips (hints), if we have some
 * 2005-01-20 added by Michael Keck (mkkeck)
 */

var ttXpos = 0, ttYpos = 0;
var ttXadd = 10, ttYadd = -10;
var ttDisplay = 0, ttHoldIt = 0;
// Check if browser does support dynamic content and dhtml
var ttNS4 = (document.layers) ? 1 : 0;           // the old Netscape 4
var ttIE4 = (document.all) ? 1 : 0;              // browser wich uses document.all
var ttDOM = (document.getElementById) ? 1 : 0;   // DOM-compatible browsers
if (ttDOM) { // if DOM-compatible, set the others to false
    ttNS4 = 0;
    ttIE4 = 0;
}

var myTooltipContainer = null;

if ( (ttDOM) || (ttIE4) || (ttNS4) ) {
    // mouse-event
    if ( ttNS4 ) {
        document.captureEvents(Event.MOUSEMOVE);
    } else {
        document.onmousemove = mouseMove;
    }
}

/**
 * init the tooltip and write the text into it
 *
 * @param string theText tooltip content
 */
function textTooltip(theText) {
    if  (ttDOM || ttIE4) {                   // document.getEelementById || document.all
        myTooltipContainer.innerHTML = "";  // we should empty it first
        myTooltipContainer.innerHTML = theText;
    } else if (ttNS4) {                     // document.layers
        var layerNS4 = myTooltipContainer.document;
        layerNS4.write(theText);
        layerNS4.close();
    }
}

/**
 * @var integer
 */
var ttTimerID = 0;

/**
 * swap the Tooltip // show and hide
 *
 * @param boolean stat view status
 */
function swapTooltip(stat) {
    if (ttHoldIt!=1) {
        if (stat!='default') {
            if (stat=='true')
                showTooltip(true);
            else if (stat=='false')
                showTooltip(false);
        } else {
            if (ttDisplay)
                ttTimerID = setTimeout("showTooltip(false);",500);
            else
                showTooltip(true);
        }
    } else {
        if (ttTimerID) {
           clearTimeout(ttTimerID);
           ttTimerID = 0;
        }
        showTooltip(true);
    }
}

/**
 * show / hide the Tooltip
 *
 * @param boolean stat view status
 */
function showTooltip(stat) {
    if (stat==false) {
        if (ttNS4)
            myTooltipContainer.visibility = "hide";
        else
            myTooltipContainer.style.visibility = "hidden";
        ttDisplay = 0;
    } else {
        if (ttNS4)
            myTooltipContainer.visibility = "show";
        else
            myTooltipContainer.style.visibility = "visible";
        ttDisplay = 1;
    }
}
/**
 * hold it, if we create or move the mouse over the tooltip
 */
function holdTooltip() {
    ttHoldIt = 1;
    swapTooltip('true');
    ttHoldIt = 0;
}

/**
 * move the tooltip to mouse position
 *
 * @param integer posX    horiz. position
 * @param integer posY    vert. position
 */
function moveTooltip(posX, posY) {
    if (ttDOM || ttIE4) {
        myTooltipContainer.style.left   =       posX + "px";
        myTooltipContainer.style.top  = posY + "px";
    } else if (ttNS4) {
        myTooltipContainer.left = posX;
        myTooltipContainer.top  = posY;
    }
}

/**
 * build the tooltip
 *
 * @param    string    theText    tooltip content
 */
function pmaTooltip( theText ) {
    // reference to TooltipContainer
    if ( null == myTooltipContainer ) {
        if (ttNS4) {
            myTooltipContainer = document.TooltipContainer;
        } else if (ttIE4) {
            myTooltipContainer = document.all('TooltipContainer');
        } else if (ttDOM) {
            myTooltipContainer = document.getElementById('TooltipContainer');
        } else {
            return;
        }

        if ( typeof( myTooltipContainer ) == 'undefined' ) {
            return;
        }
    }

    var plusX=0, plusY=0, docX=0, docY=0;
    var divHeight = myTooltipContainer.clientHeight;
    var divWidth  = myTooltipContainer.clientWidth;
    if (navigator.appName.indexOf("Explorer")!=-1) {
        if (document.documentElement && document.documentElement.scrollTop) {
            plusX = document.documentElement.scrollLeft;
            plusY = document.documentElement.scrollTop;
            docX = document.documentElement.offsetWidth + plusX;
            docY = document.documentElement.offsetHeight + plusY;
        } else {
            plusX = document.body.scrollLeft;
            plusY = document.body.scrollTop;
            docX = document.body.offsetWidth + plusX;
            docY = document.body.offsetHeight + plusY;
        }
    } else {
        docX = document.body.clientWidth;
        docY = document.body.clientHeight;
    }

    ttXpos = ttXpos + plusX;
    ttYpos = ttYpos + plusY;

    if ((ttXpos + divWidth) > docX)
        ttXpos = ttXpos - (divWidth + (ttXadd * 2));
    if ((ttYpos + divHeight) > docY)
        ttYpos = ttYpos - (divHeight + (ttYadd * 2));

    textTooltip(theText);
    moveTooltip((ttXpos + ttXadd), (ttYpos + ttYadd));
    holdTooltip();
}

/**
 * register mouse moves
 *
 * @param    event    e
 */
function mouseMove(e) {
    if ( typeof( event ) != 'undefined' ) {
        ttXpos = event.x;
        ttYpos = event.y;
    } else {
        ttXpos = e.pageX;
        ttYpos = e.pageY;
    }
}

///////////////////////////////////////////////7
