/* Drop-down */
function togglecmsblock(id) {				
	
	if (document.getElementById(id).style.display == 'block'){
		document.getElementById(id + "_link").style.backgroundImage = "url(images/dropdown.gif)";
		jQuery('#' + id).hide();

	}
	else {
		jQuery('#' + id).slideDown('fast',function(){  if (jQuery.browser.msie) { this.style.removeAttribute("filter");}});	
		document.getElementById(id + "_link").style.backgroundImage = "url(images/dropdownup.gif)";
	}	
			
}

/* Drop-down */
function toggleblock(id) {				
	
	if (document.getElementById(id).style.display == 'block'){
		jQuery('#' + id).hide();

	}
	else {
		jQuery('#' + id).slideDown('fast',function(){  if (jQuery.browser.msie) { this.style.removeAttribute("filter");}});	
	}	
			
}

function showdaten(skigebiet) {				
	var options = {};

	if (document.getElementById("daten_" + skigebiet).style.display == 'block'){
		hidedaten(skigebiet);
	}
	else {
		document.getElementById("more_" + skigebiet).style.backgroundImage = "url(images/dropdownup.gif)";
		jQuery("#daten_" + skigebiet).slideDown('slow',function(){  if (jQuery.browser.msie) { this.style.removeAttribute("filter");}});	
	}			
}
	
function hidedaten(skigebiet) {				
	var options = {};
	document.getElementById("more_" + skigebiet).style.backgroundImage = "url(images/dropdown.gif)";
	jQuery("#daten_" + skigebiet).slideUp('slow',function(){  if (jQuery.browser.msie) { this.style.removeAttribute("filter");}});	
}

function togglesearch(){
	
	jQuery(".kontextborder").removeShadow();
	
	if (document.getElementById("searchoptions").style.display == 'block'){
		//document.getElementById("searchoptionslink").style.backgroundImage = "url(images/point-blue.gif)";
		jQuery("#searchoptions").slideUp('fast',function(){ 
			if (jQuery.browser.msie) { this.style.removeAttribute("filter");}
			jQuery(".kontextborder").redrawShadow();
		});
	} else {
		
		//document.getElementById("searchoptionslink").style.backgroundImage = "url(images/point-blue-down.gif)";
		jQuery("#searchoptions").slideDown('fast',function(){ 
			if (jQuery.browser.msie) { this.style.removeAttribute("filter");}
			jQuery(".kontextborder").redrawShadow();
		});
		
	}	

}

function countlink(id, language, db){
	
	var xmlhttp=null;
	var url = 'http://www.kitzalps.com/'+ language +'/golink.asp?ID=' + id + '&DB=' + db;		
	
	if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();} else if (window.ActiveXObject) {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
	  
	if (xmlhttp!=null)
	  {
	 		xmlhttp.open("GET",url,true);	
	 		xmlhttp.send(null); 	  		
	  }	
	
}
