function showHeading(headingId){
if (jQuery('#heading'+headingId).html() == ''){
//Needs a error if the connection drops or the output is fatal.
jQuery.ajax({
type: "POST",
url: "/ajax/getHeading.php",
data: "headingId="+headingId,
beforeSend: function(XMLHttpRequest){
jQuery('#heading'+headingId).css('display','block');
jQuery('#heading'+headingId).html('

<\/div>');
},
success: function(msg){
jQuery('#heading'+headingId).html(msg);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
jQuery('#heading'+headingId).html('
Der skete en fejl, du bedes opdatere dit browser vindue og prøve igen.<\/p>');
}
});
} else {
jQuery('#heading'+headingId).show('slow');
}
}
function showSubHeading(subHeadingId)
{
if (jQuery('#showinfo'+subHeadingId).css('display')=='block'){
divShow('info'+subHeadingId,'1');
jQuery('#hideinfo'+subHeadingId).css('display','block');
jQuery('#showinfo'+subHeadingId).css('display','none');
} else {
divShow('info'+subHeadingId,'0');
jQuery('#showinfo'+subHeadingId).css('display','block');
jQuery('#hideinfo'+subHeadingId).css('display','none');
}
}
function showThis(headingId) {
if (jQuery('#showheading'+headingId).css('display')=='block'){
jQuery('.headings').hide('slow');
jQuery('.hideheadings').css('display','none');
jQuery('.showheadings').css('display','block');
jQuery('#hideheading'+headingId).css('display','block');
jQuery('#showheading'+headingId).css('display','none');
showHeading(headingId);
} else {
jQuery('#hideheading'+headingId).css('display','none');
jQuery('#showheading'+headingId).css('display','block');
hideHeading(headingId);
}
}
function hideHeading(headingId){
jQuery('#heading'+headingId).hide('slow');
}