function toogle(layerid){
displayType = ( document.getElementById( 'news_'+layerid ).style.display == 'none' ) ? 'block' : 'none';
    document.getElementById( 'news_'+layerid ).style.display = displayType;
}

im = new Array();
pics = new Array();

function pre(){

pics[0] = "/templates/ips/img/mnews.png";
pics[1] = "/templates/ips/img/mhnews.png";

pics[2] = "/templates/ips/img/mmembers.png";
pics[3] = "/templates/ips/img/mhmembers.png";

pics[4] = "/templates/ips/img/mclanwars.png";
pics[5] = "/templates/ips/img/mhclanwars.png";

pics[6] = "/templates/ips/img/mreplays.png";
pics[7] = "/templates/ips/img/mhreplays.png";

pics[8] = "/templates/ips/img/mcontact.png";
pics[9] = "/templates/ips/img/mhcontact.png";

pics[10] = "/templates/ips/img/mforum.png";
pics[11] = "/templates/ips/img/mhforum.png";

pics[12] = "/templates/ips/img/mintern.png";
pics[13] = "/templates/ips/img/mhintern.png";

pics[14] = "/templates/ips/img/mgalleries.png";
pics[15] = "/templates/ips/img/mhgalleries.png";

pics[16] = "/templates/ips/img/mfiles.png";
pics[17] = "/templates/ips/img/mhfiles.png";

for (var i = 0; i < pics.length; i++){
	im[i] = new Image();
	im[i].src = pics[i];
	}
}

function mark(num,name) {
	for (var i = 0; i < pics.length; i++){
	im[i] = new Image();
	im[i].src = pics[i];
	}
name.src = im[num].src;
}

function screenpic(bild,w,h){
	window.open('/showpiconly.php?img='+bild, 'asdf', 'width='+w+',height='+h+',scrollbars=no');
}

function openwd(wdurl,titel,w,h){
	window.open('/'+wdurl,'asdf','width='+w+',height='+h+',scrollbars=yes');
}

function yesnoBox(boxtitle, text, yesURL){
	Modalbox.show("<div class=\"warning\"><p>"+text+"</p><input type=\"button\" value=\"Yes!\" class=\"yes_button\" onclick=\"location.href='"+yesURL+"'\" /> or <input type=\"button\" value=\"No\" class=\"no_button\" onclick=\"Modalbox.hide()\" /></div>", {title: boxtitle, width: 300}); return false
}