
function Show(id) {
	if(navigator.appName == 'Microsoft Internet Explorer'){
		$('#'+id).slideDown('normal');
	}else{
		$('#'+id).fadeIn('slow');
	}
}
function ShowFast(id) {
    obj = document.getElementById(id);
    obj.style.display = 'block';
}
function Hide(id) {
	$('#'+id).fadeOut('slow');
}
function HideFast(id) {
    obj = document.getElementById(id);
    obj.style.display = 'none';
}
function ShowHide(id, emp){
	if(emp!=null){
		id = '#' + id;
	}
	if ($(id).is(":hidden")) {
			$(id).slideDown();
		} else {
			$(id).slideUp();
		}
}
function loadContentSelect(where, url, selectid){
			$.ajaxSettings.cache = false;
			var toLoad = url + document.getElementById(selectid).options[document.getElementById(selectid).selectedIndex].value;
			$(where).load(toLoad);			
			$(where).show('normal');
}
function loadContentJ(where, url){
			var randomnumber=Math.floor(Math.random()*100000001)
			var toLoad = url;
			$(where).load(toLoad+randomnumber);			
			$(where).show();
}
function loadContent(url, wo, was)
{
	var randomnumber= '/'+Math.floor(Math.random()*100000001)
	var toLoad = url;
	var where = '#' + wo;
	$(where).load(toLoad+randomnumber, { 'id': was });			
	$(where).show();
}
function loadContent2(url, wo, was)
{
	var randomnumber= '/'+Math.floor(Math.random()*100000001)
	var toLoad = url;
	var where = '#' + wo;
    
	$.ajaxSetup({ scriptCharset: "utf-8" ,contentType: "application/x-www-form-urlencoded; charset=UTF-8" });
	$.ajax({
	    type: "POST",
	    url: url,
	    data: { 'id': was },
	    cache: false,
	    success: function(html)
	    {
	     
	     $(where).html(html).show('slow');
	    }
	   });
}
function sendRequest(url, wo, woher, variable)
{
	var randomnumber= '/'+Math.floor(Math.random()*100000001)
	var toLoad = url;
	var where = '#' + wo;
	var id = $('#'+woher).val();
    if(variable == 'feld1='){ 
    	$.ajaxSetup({ scriptCharset: "utf-8" ,contentType: "application/x-www-form-urlencoded; charset=UTF-8" });
    	$.ajax({
    	    type: "POST",
    	    url: url,
    	    data: { 'feld1' : id },
    	    cache: false,
    	    success: function(html)
    	    {
    	     
    	     $(where).html(html).show('slow');
    	    }
    	   });
    }else{ 
    	$.ajaxSetup({ scriptCharset: "utf-8" ,contentType: "application/x-www-form-urlencoded; charset=UTF-8" });
    	$.ajax({
    	    type: "POST",
    	    url: url,
    	    data: { 'id' : id },
    	    cache: false,
    	    success: function(html)
    	    {
    	     
    	     $(where).html(html).show('slow');
    	    }
    	   }); 
    }
    

}



function sendRequest3(url, wo, woher, id)
{
	var randomnumber= '/'+Math.floor(Math.random()*100000001)
	var toLoad = url;
	var where = '#' + wo;
    
	$.ajaxSetup({ scriptCharset: "utf-8" ,contentType: "application/x-www-form-urlencoded; charset=UTF-8" });
	$.ajax({
	    type: "POST",
	    url: url,
	    data: { 'feld1': id +  $('#'+woher).val() },
	    cache: false,
	    success: function(html)
	    {
	     
	     $(where).html(html).show('slow');
	    }
	   });
}	

function submitContent(where, url, form){
	$.ajaxSettings.cache = false;
	$(where).load(url,  $(form).serialize());	
	
}
function submitPost(where, url, form){
	$.ajaxSetup({ scriptCharset: "utf-8" ,contentType: "application/x-www-form-urlencoded; charset=UTF-8" });
	$.ajax({
	    type: "POST",
	    url: url,
	    data: $(form).serialize(),
	    cache: false,
	    success: function(html)
	    {
	     
	     $(where).html(html).show('slow');
	    }
	   });
	
}


function lContentSelect(where, url, selectid){
	$.ajaxSettings.cache = false;
	var toLoad = url + document.getElementById(selectid).options[document.getElementById(selectid).selectedIndex].value;
	$(where).load(toLoad);			
	$(where).show('normal');
}
function lContent(where, url){
	var toLoad = url + '/' + new Date().getTime();
	$(where).load(toLoad);			
	$(where).show('normal');
}
