function getCateories() {
  conetnt = '<table border=0 width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%" style="border:1px solid #666666;padding-bottom:8px"><table border=0 width="100%" cellpadding="0" cellspacing="0"><tr><td style="padding-left:10px;padding-right:10px"><b style="font-size:15px">Fernkurse werden geladen.</b>&nbsp;<br><img src="/images/waiting.gif" width="32" height="32" hspace="5" vspace="4" alt=""></td></tr></table></td>    <td bgcolor="#c6c4c4" valign="top"><img src="/images/white-patch.gif" width="5" height="5" alt=""></td> </tr><tr><td colspan="2" bgcolor="#c6c4c4"><img src="/images/white-patch.gif" width="5" height="5" alt=""></td></tr></table>';
	document.getElementById('edu_category').innerHTML = conetnt;
	if(document.getElementById('edu_category').style.display !='block'){
     document.getElementById('edu_category').style.top=mouse_Y-15;
}
	document.getElementById('edu_category').style.display='block';
	x_ajax_display_education_partner_category(education_ad_shown, edu_ad_params);
}

function displayCategory(content) {
	document.getElementById('edu_category').innerHTML = content;
}

function showhide_data(id, sub_cat_cnt, sub_cat_start_cnt, a_start_cnt, total_cnt, total_sub_cnt) {
  var data_id = "data_" + id;
  var edu_id = "edu_category_" + id;
  if(document.getElementById(data_id).style.display == 'block') {
    document.getElementById(data_id).style.display = 'none';
    document.getElementById(edu_id).style.background = 'url(/images/plus.gif) no-repeat left top';
	for (i=0;i<sub_cat_cnt;i++) {
		var id = i + sub_cat_start_cnt;
		var ul_id = "ul_" + id;
		var s_id = i + a_start_cnt;
		var sub_id = "sub_category_" + s_id;
        document.getElementById(ul_id).style.display = 'none';
		document.getElementById(sub_id).style.background = 'url(/images/small-plus.gif) no-repeat left top';
	}
  }else if(document.getElementById(data_id).style.display == 'none') {
	hideAll(id, sub_cat_cnt, sub_cat_start_cnt, a_start_cnt, total_cnt, total_sub_cnt);
    document.getElementById(data_id).style.display = 'block';
    document.getElementById(edu_id).style.background = 'url(/images/minus.gif) no-repeat left top';
  }
}

function hideAll(id, sub_cat_cnt, sub_cat_start_cnt, a_start_cnt, total_cnt, total_sub_cnt) {
	for (i=1;i<=total_cnt;i++) {
		if(i != id) {
			var data_id = "data_" + i;
			var edu_id = "edu_category_" + i;
			document.getElementById(data_id).style.display = 'none';
			document.getElementById(edu_id).style.background = 'url(/images/plus.gif) no-repeat left top';
		}
	}
	ul_max_cnt = sub_cat_start_cnt + sub_cat_cnt;
	sub_max_cnt = a_start_cnt + sub_cat_cnt;
	for (i=1;i<total_sub_cnt;i++) {
		if((i < sub_cat_start_cnt) || (i >= ul_max_cnt)) {
			var ul_id = "ul_" + i;
	  	    document.getElementById(ul_id).style.display = 'none';
		}
		if((i < a_start_cnt) || (i >= sub_cat_cnt)) {
			var sub_id = "sub_category_" + i;
			document.getElementById(sub_id).style.background = 'url(/images/small-plus.gif) no-repeat left top';
		}
	}
}

function showhide_subdata(id, bgimg, ul_start_cnt, sub_cat_start_cnt, sub_cat_cnt) {
  if(document.getElementById("ul_"+id).style.display == 'block') {
    document.getElementById("ul_"+id).style.display = 'none';
    document.getElementById("sub_category_"+bgimg).style.background = 'url(/images/small-plus.gif) no-repeat left top';
  }else if(document.getElementById("ul_"+id).style.display == 'none') {
    document.getElementById("ul_"+id).style.display = 'block';
    document.getElementById("sub_category_"+bgimg).style.background = 'url(/images/small-minus.gif) no-repeat left top';
    for (i=0;i<sub_cat_cnt;i++) {
      var u_id = i + ul_start_cnt;
      var s_id = i + sub_cat_start_cnt;
      if (u_id != id) {
        var ul_id = "ul_" + u_id;
        document.getElementById(ul_id).style.display = 'none';
      }
      if (s_id != bgimg) {
        var sub_id = "sub_category_" + s_id;
        document.getElementById(sub_id).style.background = 'url(/images/small-plus.gif) no-repeat left top';
      }
    }
  }
}
