function showDiv(divid){
	document.getElementById(divid).style.display = 'inline';
}
function hideDiv(divid){
	document.getElementById(divid).style.display = 'none';
}

function changePhotoContent(folder,totpics){
	var Photos = "<center>";
	for(i=1;i<(totpics+1);i++){
		Photos += "<img src='images_new/fotosnews_images/" + folder + "/" + i + ".jpg'><br><br>"
	}
	var backlink = "fotos_content.html?#" + folder;
	Photos += "<a href=\"Javascript:showDiv('PhotosNews');hideDiv('PhotosPreview');\">zurück</a></center><br><br>";
	document.getElementById('PhotosNews').style.display = 'none';
	document.getElementById('PhotosPreview').style.display = 'inline';
	document.getElementById('PhotosPreview').innerHTML = Photos;
	//window.scrollTo(0,0);
}

function createFotoGallery(div,EventDate,totImgs){
	var Gallery = "";
	for(i=1; i<totImgs+1;i++) {
		Gallery += "<img src='images_new/fotosnews_images/" + EventDate + "/" + i + ".jpg'><br><br>"
	}
	var NewWindow=window.open('','','toolbar=no,location=no,status=no,directories=no,menubar=no,scrollbars=yes,resizable=no,height=500,width=470');
	var Gallerycontent;
	Gallerycontent = "<html>";
	Gallerycontent = Gallerycontent + "<head>";
	Gallerycontent = Gallerycontent + "<link rel=\"stylesheet\" href=\"style/fonts.css\" type=\"text/css\">";
	Gallerycontent = Gallerycontent + "<link rel=\"stylesheet\" href=\"style/content_iframe.css\" type=\"text/css\">";
	Gallerycontent = Gallerycontent + "<link rel=\"stylesheet\" href=\"style/Fotos.css\" type=\"text/css\">";
	Gallerycontent = Gallerycontent + "</head>";
	Gallerycontent = Gallerycontent + "<body>";
	Gallerycontent = Gallerycontent + "<body style=\"margin-top:10px; margin-right:10px; margin-left:10px; margin-bottom:10px;\">";
	Gallerycontent = Gallerycontent + "<div id=\"ImgBox\" class=\"grey10\"></div>";
	Gallerycontent = Gallerycontent + Gallery;
	Gallerycontent = Gallerycontent + "</body></html>";
	NewWindow.document.write(Gallerycontent);
}

function createGallery(div,SubjectName,totImgs){
	var Gallery = "";
	for(i=1; i<totImgs+1;i++) {
		Gallery += "<a id='" + SubjectName + i + "' href=Javascript:chgImg('" + div + "','" + SubjectName + "'," + i + "," + totImgs + ");><img src='images_new/" + SubjectName + "_gallery/"+ SubjectName + i + "_tn.jpg'></a>&nbsp;"
	}
	document.getElementById(div).innerHTML = Gallery;
}

function chgImg(div,SubjectName,ImgNum,totImgs){
	if (ImgNum != 1){
		BackStr = "<<  <a href=javascript:chgImg('" + div + "','" + SubjectName + "'," + (ImgNum - 1) + "," + totImgs + ");>zurück</a>";
	}else{
		BackStr = " ";
	}
	if ((totImgs) != ImgNum){
		NextStr = "<a href=javascript:chgImg('" + div + "','" + SubjectName + "'," + (ImgNum + 1) + "," + totImgs + ");>weiter</a>  >>";
	}else{
		NextStr = " ";
	}
	document.getElementById(div).innerHTML = "<a href=javascript:location.reload();><img src=images_new/" + SubjectName + "_gallery/" + SubjectName + ImgNum + ".jpg></a><div id=GalleryNav>" + BackStr + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + NextStr + "</div>";
}

function chgNavImg(img,status){
	document.getElementById(img).src='/images_new/images_navigator/' + img + '_' + status + '.gif';
}

function getNav(currpage){

	var navpoints = new Array();
		navpoints[0] = "band";
		navpoints[1] = "musiker";
		navpoints[2] = "termine";
		navpoints[3] = "fotos";
		navpoints[4] = "playlist";
		navpoints[5] = "referenzen";
		navpoints[6] = "mp3";
		navpoints[7] = "veranstalter";
		navpoints[8] = "kontakt";

	for(i=0;i<navpoints.length;i++){
		if (navpoints[i] == "kontakt"){
			link = "mailto:downvillage@rolmail.net";
		}else{
			link = navpoints[i] + ".html";
		}
		if (navigation){
			if (currpage == navpoints[i]){
				var navigation = navigation + "<a href=" + link + "><img id=" + navpoints[i] + " class=navigationpointx src=images_new/images_navigator/" + navpoints[i] + "_sel.gif border=0></a>"
			}else{
				var navigation = navigation + "<a href=" + link + "><img id=" + navpoints[i] + " class=navigationpointx src=images_new/images_navigator/" + navpoints[i] + "_unsel.gif border=0 onmouseover=chgNavImg(this.id,'sel'); onmouseout=chgNavImg(this.id,'unsel');></a>"
			}
		}else{
			if (currpage == navpoints[i]){
				var navigation = "<a href=" + link + "><img id=" + navpoints[i] + " class=navigationpointx src=images_new/images_navigator/" + navpoints[i] + "_sel.gif border=0></a>"
			}else{
				var navigation = "<a href=" + link + "><img id=" + navpoints[i] + " class=navigationpointx src=images_new/images_navigator/" + navpoints[i] + "_unsel.gif border=0 onmouseover=chgNavImg(this.id,'sel'); onmouseout=chgNavImg(this.id,'unsel');></a>"
			}
		}
	}
	document.getElementById('navigation1').innerHTML = navigation;
}

function NewWin(sUrl,iWidth,iHeight,scroll) {	
	window.open(sUrl,'','toolbar=no,location=no,status=no,directories=no,menubar=no,scrollbars='+scroll+',resizable=no,height='+iHeight+',width='+iWidth);
}
 
var flagmover=true;

