<!-- // hide 4 non js-browsers

function securedelete () {

	var code=Math.round(Math.random()*10000)

	var pass = prompt('Wollen Sie wirklich löschen?\nBitte geben zur Bestätigung diesen Code ein: '+code,'');

	if (pass!=code) {return false;}

}


var we_images=new Array();
	
function preloadimages() {

	for (i=0;i<preloadimages.arguments.length;i++) {
	
		we_images[i]=new Image()
			
		we_images[i].src=preloadimages.arguments[i]
		
	}

}

//start fckeditor

// FCKeditor Class
var FCKeditor = function( instanceName, width, height, toolbarSet, value )
{
	// Properties
	this.InstanceName	= instanceName ;
	this.Width			= width			|| '100%' ;
	this.Height			= height		|| '200' ;
	this.ToolbarSet		= toolbarSet	|| 'Default' ;
	this.Value			= value			|| '' ;
	this.BasePath		= '../editor/';
	this.CheckBrowser	= true ;
	this.DisplayErrors	= true ;

	this.Config			= new Object() ;

	// Events
	this.OnError		= null ;	// function( source, errorNumber, errorDescription )
}

FCKeditor.prototype.Create = function()
{
	// Check for errors
	if ( !this.InstanceName || this.InstanceName.length == 0 )
	{
		this._ThrowError( 701, 'You must specify a instance name.' ) ;
		return ;
	}

	document.write( '<div>' ) ;
	
	if ( !this.CheckBrowser || this._IsCompatibleBrowser() )
	{
		document.write( '<input type="hidden" id="' + this.InstanceName + '" name="' + this.InstanceName + '" value="' + this._HTMLEncode( this.Value ) + '">' ) ;
		document.write( this._GetConfigHtml() ) ;
		document.write( this._GetIFrameHtml() ) ;
	}
	else
	{
		var sWidth  = this.Width.toString().indexOf('%')  > 0 ? this.Width  : this.Width  + 'px' ;
		var sHeight = this.Height.toString().indexOf('%') > 0 ? this.Height : this.Height + 'px' ;
		document.write('<textarea name="' + this.InstanceName + '" rows="4" cols="40" style="WIDTH: ' + sWidth + '; HEIGHT: ' + sHeight + '" wrap="virtual">' + this._HTMLEncode( this.Value ) + '<\/textarea>') ;
	}

	document.write( '</div>' ) ;
}

FCKeditor.prototype.ReplaceTextarea = function()
{
	if ( !this.CheckBrowser || this._IsCompatibleBrowser() )
	{
		var oTextarea = document.getElementsByName( this.InstanceName )[0] ;
		oTextarea.style.display = 'none' ;
		this._InsertHtmlBefore( this._GetConfigHtml(), oTextarea ) ;
		this._InsertHtmlBefore( this._GetIFrameHtml(), oTextarea ) ;
	}
}

FCKeditor.prototype._InsertHtmlBefore = function( html, element )
{
	if ( element.insertAdjacentHTML )	// IE
		element.insertAdjacentHTML( 'beforeBegin', html ) ;
	else								// Gecko
	{
		var oRange = document.createRange() ;
		oRange.setStartBefore( element ) ;
		var oFragment = oRange.createContextualFragment( html );
		element.parentNode.insertBefore( oFragment, element ) ;
	}
}

FCKeditor.prototype._GetConfigHtml = function()
{
	var sConfig = '' ;
	for ( var o in this.Config )
	{
		if ( sConfig.length > 0 ) sConfig += '&' ;
		sConfig += this._HTMLEncode(o) + '=' + this._HTMLEncode( this.Config[o] ) ;
	}

	return '<input type="hidden" id="' + this.InstanceName + '___Config" value="' + sConfig + '">' ;
}

FCKeditor.prototype._GetIFrameHtml = function()
{
	var sLink = this.BasePath + 'editor/fckeditor.html?InstanceName=' + this.InstanceName ;
	if (this.ToolbarSet) sLink += '&Toolbar=' + this.ToolbarSet ;

	return '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height + '" frameborder="no" scrolling="no"></iframe>' ;
}

FCKeditor.prototype._IsCompatibleBrowser = function()
{
	var sAgent = navigator.userAgent.toLowerCase() ;

	// Internet Explorer
	if ( sAgent.indexOf("msie") != -1 && sAgent.indexOf("mac") == -1 && sAgent.indexOf("opera") == -1 )
	{
		var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
		return ( sBrowserVersion >= 5.5 ) ;
	}
	// Gecko
	else if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 )
		return true ;
	else
		return false ;
}

FCKeditor.prototype._ThrowError = function( errorNumber, errorDescription )
{
	this.ErrorNumber		= errorNumber ;
	this.ErrorDescription	= errorDescription ;

	if ( this.DisplayErrors )
	{
		document.write( '<div style="COLOR: #ff0000">' ) ;
		document.write( '[ FCKeditor Error ' + this.ErrorNumber + ': ' + this.ErrorDescription + ' ]' ) ;
		document.write( '</div>' ) ;
	}

	if ( typeof( this.OnError ) == 'function' )
		this.OnError( this, errorNumber, errorDescription ) ;
}

FCKeditor.prototype._HTMLEncode = function( text )
{
	if ( typeof( text ) != "string" )
		text = text.toString() ;
	
	text = text.replace(/&/g, "&amp;") ;
	text = text.replace(/"/g, "&quot;") ;
	text = text.replace(/</g, "&lt;") ;
	text = text.replace(/>/g, "&gt;") ;
	text = text.replace(/'/g, "&#146;") ;

	return text ;
}


function we_openNewWindow(URLtoOpen, windowName, windowFeatures) {
	
	newWindow=window.open(URLtoOpen, windowName, windowFeatures);
	
} 

function we_checkhide () {
 
 	var x = event.clientX;
 	
 	var y = event.clientY;
  
  	var startx = img.offsetLeft;
  	
  	var starty = img.offsetTop;
  
  //alert(startx+':'+starty);
  	
  	var endx = startx + img.offsetWidth;
  	
  	var endy = starty + img.offsetHeight;
  	
  	if (x<(startx-10) || y<(starty-10) || x>(endx+10) || y>(endy+10)) {
  	
  		if (document.getElementById("newimg")){ 
  		
  			document.getElementsByTagName('body')[0].removeChild(newimg);
  		
  			document.getElementsByTagName('body')[0].style.cursor='auto';
  		
  		}
  	
  	}
  	
}

function setBG(id,shownBid,smid,shownsmid) {
	if (id!=shownBid && (!smid || smid!=shownsmid)) document.getElementById('topnavi'+id).style.backgroundColor='#e95d0f';
}

function resetBG(id,shownBid,smid,shownsmid) {
	if (id!=shownBid && (!smid || smid!=shownsmid)) document.getElementById('topnavi'+id).style.backgroundColor='#9e131b';
}

function setSubnaviIcon(id,shownBid,relpath) {
	
	alternativIcon = document.getElementById('subNaviIcon'+id).src.match(/uBe/);
	
	if (id!=shownBid) {
		if (!alternativIcon) {
			document.getElementById('subNaviIcon'+id).src=relpath+'images/c/mOr.png';
		} else {
			document.getElementById('subNaviIcon'+id).src=relpath+'images/c/uOr.png';
		}
	}
	document.body.style.cursor='pointer';
}

function resetSubnaviIcon(id,shownBid,relpath) {
	
	alternativIcon = document.getElementById('subNaviIcon'+id).src.match(/uOr/);
	
	if (id!=shownBid) {
		if (!alternativIcon) {
			document.getElementById('subNaviIcon'+id).src=relpath+'images/c/mBe.png';
		} else {
			document.getElementById('subNaviIcon'+id).src=relpath+'images/c/uBe.png';
		}
	}
	
	document.body.style.cursor='default';
}

function showSnavAngebot(id) {
	
	angezeigt = document.angebot.angezeigteDiv.value;

	if (angezeigt!=id) {
	
		document.getElementById('link'+angezeigt).style.color='#e95d0f';
		document.getElementById('link'+angezeigt).style.textDecoration='underline';
		document.getElementById('cont'+angezeigt).style.display='none';
		document.getElementById('icon'+angezeigt).src='./images/c/mOr.png';
		
		document.getElementById('link'+id).style.color='#7d7d7d';
		document.getElementById('link'+id).style.textDecoration='none';
		document.getElementById('cont'+id).style.display='block';
		document.getElementById('icon'+id).src='./images/c/mGr.png';
		
		document.angebot.angezeigteDiv.value=id;
		
	}
	
}

function openCal (insertframe, insertform, insertname, time, showold, lid) {

	calWin = window.open('./kalender,insertframe,'+insertframe+',insertform,'+insertform+',insertname,'+insertname+',mark_date,'+time+',showold,'+showold+',lid,'+lid+'.html','KalenderPopup'+time,'toolbar=no,location=no,menubar=no,scrollbars=no,resizeable=yes,width=295,height=218');
	if (calWin.opener == null) calWin.opener = self;

}

function updRes () {

	upd = document.uSuche.noUpdate.value;
	
	document.uSuche.action='./sucheAjax.php';
	
	$('uSuchen').request({
		encoding : 'UTF-8',
		parameters : {fromAjax: 1},
		onSuccess: function(t) {
            $('suche').update(t.responseText);
			 if (upd==0) { updCont(); }
        }
    });

	document.uSuche.action='';
	
}

function updCont () {

	var land = document.uSuche.land.value;
	

	document.uSuche.action='./ergebnisseAjax.php';
	
	$('uSuchen').request({
		encoding : 'UTF-8',
		onLoading: function(t) {

			document.getElementById('ergebnisse').style.visibility='hidden'; 

			if (land) {
 				document.getElementById('load').style.display='block';
			}
			 
		},
		onSuccess: function(t) {
            $('ergebnisse').update(t.responseText);
        },
        onComplete: function(t) {
     		window.setTimeout("appear()",250);
    	}
    });

	document.uSuche.action='';
}

function updHomeRes () {

	
	act = document.uSuche.action;
	
	document.uSuche.action='./sucheAjaxHome.php';
	
	$('uSuchen').request({
		encoding : 'UTF-8',
		parameters : {fromAjax: 1},
		onSuccess: function(t) {
            $('suche').update(t.responseText);
        }
    });

	document.uSuche.action = act;
	
}

function appear () {
	document.getElementById('load').style.display='none';
		document.getElementById('ergebnisse').style.visibility='visible';
}

function switchDiv (lay,layOffen) {

	var disp = document.getElementById(lay).style.display;

	
	if (disp=="block") {
		document.getElementById(lay).style.display='none';
		document.getElementById(layOffen).value=0;			
	} else {
		document.getElementById(lay).style.display='block';
		document.getElementById(layOffen).value=1;
	}
}

function switchHNav (mid) {
	
	active = document.mainNav.naviActive.value;
	
	if (active) document.getElementById('hn'+active).style.display = 'none';
	if (mid) {
		document.getElementById('hn'+mid).style.display = 'block';
		document.mainNav.naviActive.value=mid;
	}
		
}

function reloadGMap() {

	reloaded = document.angebot.mapReloaded.value;
	
	if (reloaded==0) {
	
		initialize();
		
		document.angebot.mapReloaded.value='1';
	
	}	

}

function transferText (e,mess) {
	
	var checkValue = (e.id=='acom1') ? document.getElementById('abfahrtId').value : document.getElementById('ankunftId').value;
	
	//retourfahrtsdaten aktualisieren

		if (e.id=='acom1') document.edit.retourAnkunft.value=e.value;
		if (e.id=='acom2') document.edit.retourAbfahrt.value=e.value;
			

}

function resetText (e,compare) {
	
	if (e.value==compare) {
	
		e.value='';
		e.style.color='#000000';
		
		if (e.id=='acom1') {
			document.edit.retourAnkunft.value='';
			document.edit.abfahrtId.value='';
		}
		if (e.id=='acom2') {
			document.edit.retourAbfahrt.value='';
			document.edit.ankunftId.value='';
		}
		
	}
	
}

function checkRetour() {
	
	if (document.getElementById('retour').style.display=='none') document.getElementById('retour').style.display=='block';
	
	if (document.edit.fahrten[0].checked) {
		
		Effect.BlindDown('retour', { duration: 1.0 });
		
	} else {
		
		Effect.BlindUp('retour', { duration: 1.0 });
		
	}
	
}

function transferPreis () {

	act = document.edit.action;
	
	document.edit.action='./transfersAjax.php';
	
	$('edit').request({
		encoding : 'UTF-8',
		parameters : {},
		onSuccess: function(t) {
            $('transferPreis').update(t.responseText);
        }
    });

	document.edit.action = act;
	
}

function updateHotelnamen (e) {
	
	var checkValue = (e.id=='acom1') ? document.getElementById('abfahrtId').value : document.getElementById('ankunftId').value;

	pattern = /\{[0-9A-Z-]*\}/;
	
	if (pattern.exec(checkValue)!=null) {
	
		act = document.edit.action;
		
		document.edit.action='./hotelnamenAjax.php';
		
		$('edit').request({
			encoding : 'UTF-8',
			parameters : {fromAjax: 1},
			onSuccess: function(t) {
	            $('hotNamen').update(t.responseText);
	        }
	    });
	
		document.edit.action = act;
		
	}
	
}

















// -->

