
/* write gallery */
var rsgalleryprint = '<div id="rsbigpic" onmouseover="rsclose(1)" onmouseout="rsclose(0)"></div>';

rsgalleryprint += '<link rel="stylesheet" href="rsgallery/rsgallerystyle.css" type="text/css">';
rsgalleryprint += '<!--[if IE 6]>';
rsgalleryprint += '<style type="text/css">';
rsgalleryprint += '#rsgallery .photoframe { background-image: none;';
rsgalleryprint += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/photos/photoframe.png, sizingMethod=scale)';    
rsgalleryprint += '} </style>';
rsgalleryprint += '<![endif]-->';

rsgalleryprint += '<div id="rsgallery">';
rsgalleryprint += '<div onclick="rsshowpics(-8)" class="pfeill"> </div>';
rsgalleryprint += '<img src="'+imagesource[0][0]+'" width=100 height=100 alt="" border="0" id="pic1">';
rsgalleryprint += '<img src="'+imagesource[1][0]+'" width=100 height=100 alt="" border="0" id="pic2">';
rsgalleryprint += '<img src="'+imagesource[2][0]+'" width=100 height=100 alt="" border="0" id="pic3">';
rsgalleryprint += '<img src="'+imagesource[3][0]+'" width=100 height=100 alt="" border="0" id="pic4">';
rsgalleryprint += '<div onclick="rsshowpics(0)" class="pfeilr"> </div>';
rsgalleryprint += '<span class="photoframe"></span>';
rsgalleryprint += '<div onclick="rsshowbigpic(1)" class="link1"> </div>';
rsgalleryprint += '<div onclick="rsshowbigpic(2)" class="link2"> </div>';
rsgalleryprint += '<div onclick="rsshowbigpic(3)" class="link3"> </div>';
rsgalleryprint += '<div onclick="rsshowbigpic(4)" class="link4"> </div>';
rsgalleryprint += '</div>';
document.write(rsgalleryprint);
/* write gallery */

var actimages = new Array("");
var bigpic = document.getElementById("rsbigpic");
var start = 0;

function rsshowpics(sp) {	
	start = start + sp;	
	for(i=1;i<=4;i++) {
		if(start >= imagesource.length) start = 0; 
		if(start < 0) start = imagesource.length + start; 
		document.getElementById("pic"+i).src = imagesource[start][0];
		actimages[i] = start;
		start++;
	}		
}

function rsshowbigpic(num) {
	num = actimages[num];
	var content = "<a href='javascript:rsclose(2)' id='rsclosebut'>X schliessen</a>";
	content += "<img src='"+imagesource[num][1]+"' border='0'><br>";
	content += "<span class='imagetext'>"+imagesource[num][2]+"</span>";
	content += "<span class='copytext'>"+imagesource[num][3]+"</span>";	
	bigpic.innerHTML = content;
	size = 10;
	rsopenbigpic(imagesource[num][4]);
	bigpic.style.display = "block";
}	

var size = 10;

function rsopenbigpic(stop) {
	if(size <= (stop + 60)) {
		bigpic.style.height = size + "px";
		size = size + 10;
		setTimeout("rsopenbigpic("+stop+")",0);
	} 
}
	
function rsclosebigpic() {
	if(size >= 10) {
		bigpic.style.height = size + "px";
		size = size - 10;
		setTimeout("rsclosebigpic()",0);
	} else {
		bigpic.style.display = "none";
	}
}

function rsclose(func) {
	closebut = document.getElementById("rsclosebut").style;
	if(func == 1) { closebut.display = "block"; }
	if(func == 0) { closebut.display = "none"; }
	if(func == 2) { 
		closebut.display = "none"; 
		rsclosebigpic()		
	}
}

