<!-- hide script
//	all contents on this site							--
//	are copyright (c) 1998-2010 by				--
//	http://www.art-emission.com					 	--
//	of Switzerland, all rights reserved		--

	var maxScreenX = 640; 
	if (screen.width){ maxScreenX=screen.width;};
	if (maxScreenX<=640){ maxScreenX=640;};
	var maxScreenY = 480;
	if (screen.height){ maxScreenY=screen.height;};
	if (maxScreenY<=480){ maxScreenY=480;};
	
	// Werte innerScreenX/Y werden nur fuer NS4 verwendet
	var innerScreenX = 1024;
	if (window.innerWidth){ innerScreenX=window.innerWidth;};
	if (innerScreenX<=100){ innerScreenX=100;};
	var innerScreenY = 768;
	if (window.innerHeight){ innerScreenY=window.innerHeight;};
	if (innerScreenY<=100){ innerScreenY=100;};
	
	var actualwin1=null;
	var win1open=false;
	
	var actualwin2=null;
	var win2open=false;

	var oldindex=0;

	
// for release
// -----------
//window.onerror=handleError;
//function handleError() { return true; } 

// --------------------------------------
// JQuery
// --------------------------------------
	
$(document).ready(function() 
{
	// Tabs sind vorhanden
	if ( ((typeof gTabDefJQuery!="undefined") && (gTabDefJQuery > 0)) &&
	     ((typeof gTabDefJQueryMSie6!="undefined") && (gTabDefJQueryMSie6 > 0)) )
	{
		if ($.browser.msie && parseFloat($.browser.version) < 7) {
			$('#tabs1').tabs({ cache: true, selected: (gTabDefJQueryMSie6-1) });
		} else {
			$('#tabs1').tabs({ cache: true, selected: (gTabDefJQuery-1) });
		}
	}
  //$('#tabs1').bind('tabsshow', function(event, ui) {
	//  if (ui.panel.id == "tabs1-2") {
  //	}
  //});	
	
});

	
	


// Aufruf innerhalb einer Datei 
function initJQuery()  
{ 

	// Gallery Photo ist vorhanden
	if ((typeof gGalleryPhotoJQuery!="undefined") && (gGalleryPhotoJQuery == true))
	{
		$("a[rel^='prettyPhoto']").prettyPhoto({
			animationSpeed: 1, /* fast/slow/normal */
			opacity: 0.90, /* Value between 0 and 1 */
			showTitle: false, /* true/false */
			allowresize: true, /* true/false */
			default_width: 500,
			default_height: 344,
			counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
			hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
			wmode: 'opaque', /* Set the flash wmode attribute */
			autoplay: false, /* Automatically start videos: True/False */
			modal: false, /* If set to true, only the close button will close the window */
			changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
			callback: function(){}, /* Called when prettyPhoto is closed */
			markup: '<div class="pp_pic_holder"> \
						<div class="pp_top"> \
							<div class="pp_left"></div> \
							<div class="pp_middle"></div> \
							<div class="pp_right"></div> \
						</div> \
						<div class="pp_content_container"> \
							<div class="pp_left"> \
							<div class="pp_right"> \
								<div class="pp_content"> \
									<div class="pp_fade"> \
										<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
										<div class="pp_loaderIcon"></div> \
										<div class="pp_hoverContainer"> \
											<a class="pp_next" href="#">next</a> \
											<a class="pp_previous" href="#">previous</a> \
										</div> \
										<div id="pp_full_res"></div> \
										<div class="pp_details clearfix"> \
											<a class="pp_close" href="#">X</a> \
											<p class="pp_description"></p> \
											<div class="pp_nav"> \
												<a href="#" class="pp_arrow_previous">Previous</a> \
												<p class="currentTextHolder">0/0</p> \
												<a href="#" class="pp_arrow_next">Next</a> \
											</div> \
										</div> \
									</div> \
								</div> \
							</div> \
							</div> \
						</div> \
						<div class="pp_bottom"> \
							<div class="pp_left"></div> \
							<div class="pp_middle"></div> \
							<div class="pp_right"></div> \
						</div> \
					</div> \
					<div class="pp_overlay"></div> \
					<div class="ppt"></div>',
			image_markup: '<img id="fullResImage" src="" />',
			flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
			quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',
			iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
			inline_markup: '<div class="pp_inline clearfix">{content}</div>'
		});
	}

	// Tabs werden aktiviert
	if ( ((typeof gTabDefJQuery!="undefined") && (gTabDefJQuery > 0)) &&
	     ((typeof gTabDefJQueryMSie6!="undefined") && (gTabDefJQueryMSie6 > 0)) ) 
	{
		$('#tabs1').show();
	}

	
	// Accordion ist vorhanden
	if ((typeof gAcJQuery!="undefined") && (gAcJQuery == true))
	{
		//$("#accordion").hide();
		$("#accordion").css("display","block");
		$("#accordion").accordion({ 
			header: "h6", 
			collapsible: true, 
			autoHeight: gAcJQueryHeight,
			active: gAcJQueryActive
		});
		//$('#accordion').accordion('option', 'autoHeight', false);
	}	
	
	// More Infos
	if ((typeof gMoreJQuery!="undefined") && (gMoreJQuery == true))
	{
		//hide the all of the elements with class moreinfo
	  $(".moreinfo").hide();
	}	

	// Form fuer Kontakt ist vorhanden
	if ((typeof gFormJQueryContact!="undefined") && (gFormJQueryContact == true))
	{
	}

	// Gallery ist vorhanden
	if ((typeof gGalleryJQuery!="undefined") && (gGalleryJQuery == true))
	{
		if ((typeof gGallerySJQuery!="undefined") && (gGallerySJQuery == true))	{
			$('.gallery').addClass('galleryImgS'); 
		} else {
			$('.gallery').addClass('galleryImg'); 
		}	
		
		if ((typeof gGallerySJQuery!="undefined") && (gGallerySJQuery == true))	{
		$('ul.galleryImgS').galleria(
		{
			history   : false, 				
			clickNext : false, 				
			insert    : '#mainImage', 
			onImage   : function(image,caption,thumb) { 
				if(! ($.browser.mozilla && navigator.appVersion.indexOf("Win")!=-1) ) { 
					image.css('display','none').fadeIn(1); }
				caption.css('display','none').fadeIn(1);
				var _li = thumb.parents('li');
				_li.siblings().children('img.selected').fadeTo(500,0.4);
				thumb.fadeTo('fast',1).addClass('selected');
				var a1 = image.parents('a');
				var strSrc  = image.attr('src');
				var strName = thumb.attr('name');
				var str2 = strSrc.replace('_s&rex','_l&rex');
				var str2 = strSrc.replace('_g&rex','_l&rex');
				a1.attr('href', str2);
				a1.attr('title', thumb.attr('title'));
				a1.attr('alt', thumb.attr('alt'));
				a1.attr('onClick','$(\'#'+strName+'\').click(); return false;');
			},
			onThumb : function(thumb) { 
				var _li = thumb.parents('li');
				var _fadeTo = _li.is('.active') ? '1' : '0.4';
				thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
				thumb.hover(
					function() { thumb.fadeTo('fast',1); },
					function() { _li.not('.active').children('img').fadeTo('fast',0.4); }
				)
			}
		});
		
		} else {
		
		$('ul.galleryImg').galleria(
		{
			history   : false, 				
			clickNext : false, 				
			insert    : '#mainImage', 
			onImage   : function(image,caption,thumb) { 
				if(! ($.browser.mozilla && navigator.appVersion.indexOf("Win")!=-1) ) { 
					image.css('display','none').fadeIn(1); }
				caption.css('display','none').fadeIn(1);
				var _li = thumb.parents('li');
				_li.siblings().children('img.selected').fadeTo(500,0.4);
				thumb.fadeTo('fast',1).addClass('selected');
				var a1 = image.parents('a');
				var strSrc  = image.attr('src');
				var strName = thumb.attr('name');
				var str2 = strSrc.replace('_s&rex','_l&rex');
				var str2 = strSrc.replace('_g&rex','_l&rex');
				a1.attr('href', str2);
				a1.attr('title', thumb.attr('title'));
				a1.attr('alt', thumb.attr('alt'));
				a1.attr('onClick','$(\'#'+strName+'\').click(); return false;');
			},
			onThumb : function(thumb) { 
				var _li = thumb.parents('li');
				var _fadeTo = _li.is('.active') ? '1' : '0.4';
				thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
				thumb.hover(
					function() { thumb.fadeTo('fast',1); },
					function() { _li.not('.active').children('img').fadeTo('fast',0.4); }
				)
			}
		});
		} // if
	}
		


	// More Infos
	if ((typeof gMoreJQuery!="undefined") && (gMoreJQuery == true))
	{
	  //show the more link for users with javascript enabled
	  $("p.moreinfo_link").show();
  
	  //toggle the content to be displayed
	  $("p.moreinfo_link").click(function()
	  {   
			if ($(this).next(".moreinfo").is(":hidden"))
	    {
		    $(this).html("weniger Anzeigen");
	  	  $(this).next(".moreinfo").slideToggle(600);
	    	$(this).addClass("linkless");
		    $(this).removeClass("linkmore");
	
		    $("p.lessinfo_link").html("weniger Anzeigen");
				$("p.lessinfo_link").addClass("linkless");
		    $("p.lessinfo_link").removeClass("linkmore");
				
				$("p.lessinfo_link").show();
				
	    } 
			else 
			{
		    $(this).html("mehr Anzeigen");
	  	  $(this).next(".moreinfo").slideToggle(600);
	    	$(this).addClass("linkmore");
		    $(this).removeClass("linkless");
	
		    $("p.lessinfo_link").html("mehr Anzeigen");
	    	$("p.lessinfo_link").addClass("linkmore");
		    $("p.lessinfo_link").removeClass("linkless");
				
			  $("p.lessinfo_link").hide();
	
			}
		});

	  $("p.lessinfo_link").click(function()
	  {   
			if ($(this).prev(".moreinfo").is(":hidden"))
	    {
		    $(this).html("mehr Anzeigen");
	  	  $(this).prev(".moreinfo").slideToggle(600);
	    	$(this).addClass("linkmore");
		    $(this).removeClass("linkless");
	
		    $("p.moreinfo_link").html("weniger Anzeigen");
				$("p.moreinfo_link").addClass("linkless");
		    $("p.moreinfo_link").removeClass("linkmore");
	
			  $("p.lessinfo_link").hide();
	    } 
			else 
			{
		    $(this).html("weniger Anzeigen");
	  	  $(this).prev(".moreinfo").slideToggle(600);
	    	$(this).addClass("linkless");
		    $(this).removeClass("linkmore");
				
		    $("p.moreinfo_link").html("mehr Anzeigen");
	    	$("p.moreinfo_link").addClass("linkmore");
		    $("p.moreinfo_link").removeClass("linkless");
	
			  $("p.lessinfo_link").hide();
			}
		});
	}

	// Sliding
	if ((typeof gSlidingJQuery!="undefined") && (gSlidingJQuery == true))
	{
		//Full Caption Sliding (Hidden to Visible)
		$('.boxgrid.captionfull').hover(function(){
			$(".cover", this).stop().animate({top:'270px'},{queue:false,duration:160});
		}, function() {
			$(".cover", this).stop().animate({top:'430px'},{queue:false,duration:160});
		});

		$('.boxgrid_light.captionfull_light').hover(function(){
			$(".cover", this).stop().animate({top:'430px'},{queue:false,duration:260});
		}, function() {
			$(".cover", this).stop().animate({top:'195px'},{queue:false,duration:260});
		});

		$('.boxgrid_dark.captionfull_dark').hover(function(){
			$(".cover", this).stop().animate({top:'430px'},{queue:false,duration:260});
		}, function() {
			$(".cover", this).stop().animate({top:'195px'},{queue:false,duration:260});
		});
	}	
	
	
	// Scrollable ist vorhanden
	if ((typeof gScrollJQuery!="undefined") && (gScrollJQuery == true))
	{	

		$("#tab3Kontakt a").tooltip({showURL: false});
		$("#tab3Kontakt div").tooltip({showURL: false});
		$("#tab3Kontakt area").tooltip({showURL: false});

		// initialize scrollable 
		var api = $("#wheeled").scrollable(
		{
			size: 1,
			vertical: true,
			clickable:	false	
		}).navigator().mousewheel({api: true});

	}	

	jQueryIsReady = true;
	
	
	
}

var idMap1     = "";
var longitude1 = 1;
var latitude1  = 1;
var zoom1      = 14;
var newtext1   = "";

function setMap(idMap, longitude, latitude, zoom, newtext)
{
	idMap1     = idMap;
	longitude1 = longitude;
	latitude1  = latitude;
	zoom1      = zoom;
	newtext1   = newtext;
} 


function initMap()
{
try {
if (GBrowserIsCompatible()) { 
    
var map = new GMap2(document.getElementById(idMap1));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(longitude1, latitude1), zoom1);

var point = new GLatLng(longitude1, latitude1);
var marker = new GMarker(point);
GEvent.addListener(marker, 'click',
	function() {
		marker.openInfoWindowHtml(newtext1);
	}
);
GEvent.addListener(map, 'click',
	function() {
		marker.openInfoWindowHtml(newtext1);
	}
);
marker.openInfoWindowHtml(newtext1);
map.addOverlay(marker);

}

} catch (error) { }

} // function initMap()


// post-submit callback 
function showFormResponse(responseText, statusText)  
{ 
	if (responseText.length<=2) 
	{
		if (responseText.length<=1) 
		{
			$.prompt('<b class="rot">Das Formular wurde nicht gesendet !</b>', { callback: showPromptCallbackNoOK });
		}	
	}
	else
	{ 
		$.prompt('<b class="rot">Das Formular wurde erfolgreich gesendet:</b>'+responseText, { callback: showPromptCallbackOK });
	}
} 		
		
		
	
function showPromptCallbackOK(v, m, f)
{	
  $('#formContact').clearForm(); 
}

function showPromptCallbackNoOK(v, m, f)
{
	alert('showPromptCallbackNoOK');
}
	
function goTop()
{	
	if (document.location.hash=="#top")
	{	window.location.href=document.location;	}
	else
	{	window.location.href=document.location+"#top";	}	
}	



function emaillinkname(name, domain, subject)
{	
	var web1="mailto:"+name;
	var web2="@"
	var web3=domain;
	var web4=subject;
	var web=web1+web2+web3+'?subject='+web4;
	location.href=web;
}


// new windows		
function clswinlocal()
{
	var oldwin=window.opener;
	if (oldwin!=null)
	{	window.close();}
}
	
// Position von Fenster
function getXcenter(sizeX)
{	
	var newPosX = 0;
	if (sizeX<=maxScreenX)
	{	newPosX = (maxScreenX-sizeX)/2;}
	return newPosX;
}

// Position von Fenster
function getYcenter(sizeY)
{	
	var newPosY = 0;
/*	
	if (bName == "i")
	{	if ((sizeY+105)<=maxScreenY)
		{	newPosY = (maxScreenY-(sizeY+105))/2;}}
	else	
	{	if ((sizeY+70)<=maxScreenY)
		{	newPosY = (maxScreenY-(sizeY+70))/2;}}
*/
	if ((sizeY+70)<=maxScreenY)
	{	newPosY = (maxScreenY-(sizeY+70))/2;}
	return newPosY;
}

// Position von Fenster
function getMaxYsize(sizeY,maxYsize)
{	
	var newMaxY = sizeY;
	if ((sizeY+80)>=maxScreenY)
	{	newMaxY = (maxScreenY-80);}
	else
	{	newMaxY = sizeY;}
	if (newMaxY>=maxYsize)
	{	newMaxY = maxYsize;}
	return newMaxY;
}
		



function loadObjectInWindow(url)
{	
	var merkmalewin1='toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=990,height='+getMaxYsize(530,1200)+',left='+getXcenter(990)+',top='+getYcenter(getMaxYsize(530,1200));
	var dateiname=url;
	actualwin1=window.open('','docwin1net',merkmalewin1);
	win1open=true;
	if (actualwin1!=null)
	{	actualwin1.focus();
		actualwin1.location.href=dateiname;
		return false;}
	else
	{	return true;}
}

function loadLinkInWindow(url)
{	
	var merkmalewin2='toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1012,height='+getMaxYsize(560,1200)+',left='+getXcenter(1012)+',top='+getYcenter(getMaxYsize(560,1200));
	var dateiname=url;
	actualwin2=window.open('','docwin2net',merkmalewin2);
	win2open=true;
	if (actualwin2!=null)
	{	actualwin2.focus();
		actualwin2.location.href=dateiname;}
		
}


function clswinall(index)
{	if (index==1)
	{	if (win1open && (actualwin1!=null) && !(actualwin1.closed))
		{	actualwin1.close();
			actualwin1=null;}
		win1open=false;}
	else
	{	if (win2open && (actualwin2!=null) && !(actualwin2.closed))
		{	actualwin2.close();
			actualwin2=null;}
		win2open=false;}	
}

					
function unloadPictures()
{
	clswinall(2);
	clswinall(1);
}


function buttonColorOn(button, color)
{
	if (button.style)
	{
		button.style.backgroundColor = color;
	}	
}

function buttonColorOff(button, color)
{
	if (button.style)
	{
		button.style.backgroundColor = color;
	}	
}		
			
// stop hiding -->	
		
	
		


