var node = document.getElementById('wrapper_content').childNodes;

for (var i=0; i<node.length; i++) {
	if (node[i].nodeType == 1) {
		if (node[i].className == 'wrapper_news') {
			var news_header = first_child(node[i]);
			var news_body = next_sibling(news_header);
			var news_body_p = first_child(news_body);

			news_body_p.style.display = 'none';
		}
	}
}

window.onload = function () {
									var node = document.getElementById('wrapper_content').childNodes;
									var news = 1;

									for (var i=0; i<node.length; i++) {
										if (node[i].nodeType == 1) {
											if (node[i].className == 'wrapper_news') {
												var news_header = first_child(node[i]);
												var news_body = next_sibling(news_header);

												switch (news_body.nodeName) {
													case 'DIV':
														var news_body_p = first_child(news_body);

														if (news_body_p.style.display == 'none') {
															news_body_p.setAttribute('id', 'news' + news);

															var div = document.createElement('div');
															var p = document.createElement('p');
															var a = document.createElement('a');
															a.setAttribute('href', '#');
															a.setAttribute('id', news);
															a.onclick = function () {
																						var parent = this.parentNode.parentNode.parentNode;	//div->news_header
																						var body_news_p = first_child(next_sibling(parent));

																						next_sibling(first_child(parent)).style.display = 'none';
																						new Effect.BlindDown(body_news_p.getAttribute('id'), {duration: 1});

																						body_news_p.appendChild(document.createElement('br'));

																						var span = document.createElement('span');
																						span.className = 'right';

																						var a = document.createElement('a');
																						a.setAttribute('href', '#');
																						a.onclick = function () {
																													var parent = previous_sibling(this.parentNode.parentNode.parentNode); //div->news_header
																													var news_body_p = this.parentNode.parentNode;

																													next_sibling(first_child(parent)).style.display = 'block';

																													new Effect.BlindUp(news_body_p.getAttribute('id'));

																													news_body_p.removeChild(previous_sibling(news_body_p.lastChild));
																													news_body_p.removeChild(news_body_p.lastChild);
																												}

																						var img = document.createElement('img');
																						img.setAttribute('alt', 'weniger...');
																						img.setAttribute('src', 'images/link_weniger.gif');
																						img.setAttribute('title', 'weniger...');

																						var div = document.createElement('div');
																						div.className = 'clear';

																						a.appendChild(img);
																						span.appendChild(a);
																						body_news_p.appendChild(span);
																						body_news_p.parentNode.appendChild(div);
																					}

															var img = document.createElement('img');
															img.setAttribute('alt', 'mehr...');
															img.setAttribute('class', 'arrow');
															img.setAttribute('src', 'images/link_mehr.gif');
															img.setAttribute('title', 'mehr...');

															a.appendChild(img);
															p.appendChild(a);
															div.appendChild(p);
															news_header.appendChild(div);

															news++;
															break;
														}

													case 'P':
														news_body.style.display = 'none';

														var news_body_a = first_child(news_body);

														var div = document.createElement('div');
														var p = document.createElement('p');
														var a = document.createElement('a');
														a.setAttribute('href', news_body_a.getAttribute('href'));

														var img = document.createElement('img');
														img.setAttribute('alt', 'mehr...');
														img.setAttribute('class', 'arrow');
														img.setAttribute('src', 'images/link_mehr.gif');
														img.setAttribute('title', 'mehr...');

														a.appendChild(img);
														p.appendChild(a);
														div.appendChild(p);
														news_header.appendChild(div);
														break;
												}
											}
										}
									}
								}