function load() {
	//<![CDATA[
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
			map.setCenter(new GLatLng(49.85582,9.177755), 17, G_HYBRID_MAP);
			
			var html1 = "<h5>Edelmann Technology GmbH & Co. KG</h5><p>Daimlerring 11, 63839 Kleinwallstadt</p>"
			var point1 = new GPoint(9.177755,49.85582);
			var beck = new GMarker(point1);
			GEvent.addListener(beck, "click", function() {beck.openInfoWindowHtml(html1)});
			map.addOverlay(beck);			
		}
	//]]>	
}

//<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.de/maps?f=d&amp;saddr=Daimler+Ring+11,+63839+Kleinwallstadt+(Edelmann+Service+GmbH)&amp;daddr=Daimlerring+11,+63839+Kleinwallstadt&amp;hl=de&amp;geocode=Fd68-AIdHAaMACGwM5tBzeKAlg%3B&amp;mra=ls&amp;sll=49.85572,9.176605&amp;sspn=0.004724,0.013947&amp;ie=UTF8&amp;ll=49.85572,9.176605&amp;spn=0,0.00001&amp;output=embed&amp;s=AARTsJpcZACHeZsd-EhT_pgR95N6M7qCrQ"></iframe><br /><small><a href="http://maps.google.de/maps?f=d&amp;saddr=Daimler+Ring+11,+63839+Kleinwallstadt+(Edelmann+Service+GmbH)&amp;daddr=Daimlerring+11,+63839+Kleinwallstadt&amp;hl=de&amp;geocode=Fd68-AIdHAaMACGwM5tBzeKAlg%3B&amp;mra=ls&amp;sll=49.85572,9.176605&amp;sspn=0.004724,0.013947&amp;ie=UTF8&amp;ll=49.85572,9.176605&amp;spn=0,0.00001&amp;source=embed" style="color:#0000FF;text-align:left">Größere Kartenansicht</a></small>
function show(element) {				
	element.className += "_hover";
}

function hide(element) {
	element.className = element.className.replace("_hover", "");
}				
				
function show_more(i) {
	document.getElementsByName("more")[i].className += "_hover";
}				

function hide_more(i) {
	document.getElementsByName("more")[i].className = document.getElementsByName("more")[i].className.replace("_hover", "");
}								
	
function show_more2(i) {
	document.getElementsByName("more")[i].firstChild.className += "_hover";
}				

function hide_more2(i) {
	document.getElementsByName("more")[i].firstChild.className = document.getElementsByName("more")[i].firstChild.className.replace("_hover", "");
}						

function slow_hide(element, old_opacity) {		
	if (element.style.opacity) {
		opacity =  element.style.opacity;
	}
	else {
		opacity = 1;
	}
	if (!old_opacity) {
		old_opacity = opacity;
	}
					
	opacity = parseFloat(opacity);
	old_opacity = parseFloat(old_opacity);
//					document.getElementById("test").innerHTML += "hide: "+opacity+", ";
	if (opacity > 0.5) {									
		opacity -= 0.05;
		element_out = eval(element);
		element.style.opacity = opacity;		
		element_out.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+opacity*100+")";
//						if (old_opacity > opacity) {
		this.setTimeout("slow_hide(element_out, "+opacity+")", 20);																		
//						}
	}
}
				
function slow_show(element, old_opacity) {		
	if (element.style.opacity) {
		opacity =  element.style.opacity;
	}
	else {
		opacity = 0.5;
	}
	if (!old_opacity) {
		old_opacity = opacity;
	}					
				
	opacity = parseFloat(opacity);
	old_opacity = parseFloat(old_opacity);
//					document.getElementById("test").innerHTML += "show: "+opacity+", ";
	if (opacity < 1) {									
		opacity += 0.05;
		element_out = eval(element);
		element_out.style.opacity = opacity;											
		element_out.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+opacity*100+")";
		if (old_opacity < opacity) {						
			this.setTimeout("slow_show(element_out, "+opacity+")", 20);																		
		}
	}
}				

function slow_opacity(id,start_opacity,end_opacity,old_opacity) {		
	(document.getElementById(id).style.opacity || document.getElementById(id).style.filter) ? opacity = document.getElementById(id).style.opacity :  opacity = start_opacity;					
		!old_opacity ? old_opacity = (opacity) : old_opacity = (old_opacity);					
	opacity = parseFloat(opacity);
	start_opacity = parseFloat(start_opacity);
	end_opacity = parseFloat(end_opacity);
		
	opacity = Math.round(opacity*100)/100;
	old_opacity = Math.round(old_opacity*100)/100;
			
	//document.getElementById("test").innerHTML += "old:"+old_opacity+", new:"+opacity+" | ";
	wrong_turn = false;
	if (old_opacity != opacity) {
		wrong_turn = true;
	}					
		
	if (start_opacity < end_opacity) {	
		opacity += 0.05;
	}
	else {
		opacity -= 0.05;
	}
					
	if ((opacity <= 1) && (opacity >= 0) && (!wrong_turn)) {										
		document.getElementById(id).style.opacity = opacity;											
		document.getElementById(id).style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+opacity*100+")";
		this.setTimeout("slow_opacity('"+id+"',"+start_opacity+","+end_opacity+","+opacity+")", 20);
	}
}								


//JQUERY
$(document).ready(function(){
	//news
	/*$(".expand_container").css("display","none");*/
	$(".collapse_container").click(function(){		
		var self = this;
		if ($(this).children(".expand_container").is(":hidden")) {
			$(this).children(".news_files_container").slideDown("slow")
			$(this).children(".expand_container").slideDown("fast", function() {							
				$(self).children(".expand").slideUp("fast", function() {
					$(self).children(".collapse").slideDown("fast");
				});
			});
		}
		else {
			$(this).children(".news_files_container").slideUp("slow")
			$(this).children(".expand_container").slideUp("fast", function() {							
				$(self).children(".collapse").slideUp("fast", function() {
					$(self).children(".expand").slideDown("fast");
				});
			});
		}
	})
							
	$(".collapse_container").hover(				
		function() {
			var self = this;
			$(self).children(".expand").css("background-image", "url(css/design/expand_hover.gif)");
			$(self).children(".collapse").css("background-image", "url(css/design/collapse_hover.gif)");
				$(self).children(".expand_container").children(".news_col1").children(".news_col1_thumb").hover(
					function() {;
						$(this).css("background-color","black");							
						$(this).children("a").children(".news_col1_thumb_text").css("color","white");																
						$(this).children("a").children("img").css("border-color","black");																		
						$(this).parent(".news_col1").parent(".expand_container").siblings(".collapse").css("background-image","url(css/design/collapse.gif)");
					}, 
					function() {
						$(this).css("background-color","#ececec");							
						$(this).children("a").children(".news_col1_thumb_text").css("color","black");															
						$(this).children("a").children("img").css("border-color","#c4c4c4");
						$(this).parent(".news_col1").parent(".expand_container").siblings(".collapse").css("background-image","url(css/design/collapse_hover.gif)");
					});											
				$(self).children(".news_files_container").hover(
					function() {;
						$(this).siblings(".collapse").css("background-image","url(css/design/collapse.gif)");
					}, 
					function() {
						$(this).siblings(".collapse").css("background-image","url(css/design/collapse_hover.gif)");
					});																			
		}, 
		function() {
			var self = this;
			$(self).children(".expand").css("background-image", "url(css/design/expand.gif)");
			$(self).children(".collapse").css("background-image", "url(css/design/collapse.gif)");
		}
	);					

	//gallery
	$(".expand_container_gallery").css("display","none");
	$(".collapse_container_gallery").click(function(){		
		var self = this;
		if ($(this).children(".expand_container_gallery").is(":hidden")) {
			$(this).children(".expand_container_gallery").slideDown("fast", function() {							
				$(self).children(".expand_gallery").slideUp("fast", function() {
					$(self).children(".collapse_gallery").slideDown("fast");
				});
			});
		}
		else {
			$(this).children(".expand_container_gallery").slideUp("fast", function() {							
				$(self).children(".collapse_gallery").slideUp("fast", function() {
					$(self).children(".expand_gallery").slideDown("fast");
				});
			});
		}
	})
							
	$(".collapse_container_gallery").hover(				
		function() {
			var self = this;
			$(self).children(".expand_gallery").css("background-image", "url(css/design/expand_hover.gif)");
			$(self).children(".collapse_gallery").css("background-image", "url(css/design/collapse_hover.gif)");																	
		}, 
		function() {
			var self = this;
			$(self).children(".expand_gallery").css("background-image", "url(css/design/expand.gif)");
			$(self).children(".collapse_gallery").css("background-image", "url(css/design/collapse.gif)");
		}
	);					


	$(".news_files_container").click(function(e){		
		e.stopPropagation()
		//e.preventDefault()
	});

	$("#login_fake_container").hover(
		function() {
			$("#login_fake").fadeTo("fast", 0.1);
		},
		function() {
			$("#login_fake").fadeTo("fast", 1);
		}										
	);		
					
	$(".col_1").hover(
		function(){
			$(this).children("a").children(".greeting").children(".more").css({background: "url(css/design/more_hover.gif) right top no-repeat"});
		},
		function(){
			$(this).children("a").children(".greeting").children(".more").css({background: "url(css/design/more.gif) right top no-repeat"});
		}
	);
			
	$(".col_2").find(".headliner").hover(
		function(){
			//$(".col_2").children("a").children(".more").css({background: "url(css/design/more_hover.gif) right top no-repeat"});
			$(".col_2").find(".more").css({background: "url(css/design/more_hover.gif) right top no-repeat"});
		},
		function(){
			//$(".col_2").children("a").children(".more").css({background: "url(css/design/more.gif) right top no-repeat"});
			$(".col_2").find(".more").css({background: "url(css/design/more.gif) right top no-repeat"});
		}
	);			
			
	$(".col_2").children("a").children(".more").hover(
		function(){
			$(".col_2").children("a").children(".more").css({background: "url(css/design/more_hover.gif) right top no-repeat"});
		},
		function(){
			$(".col_2").children("a").children(".more").css({background: "url(css/design/more.gif) right top no-repeat"});
		}
	);						
	
	$(".start_news").hover(
		function(){
			$(this).children(".sub_headliner").css("color","grey");
		},
		function(){
			$(this).children(".sub_headliner").css("color","black");
		}
	);																
});			

function thickboxDone() {
	TB_remove();
}		
