/* random pic */

function RotatePic() {
var ImageTDTagID = "random";
var Images = new Array(
"images/p_1.jpg",
"images/p_2.jpg",
"images/p_3.jpg",
"images/p_4.jpg",
"images/p_5.jpg",
"images/p_6.jpg"
); 
RandImage = Math.round(Math.random()*Images.length);
if( Images.length == RandImage ) RandImage = 0; 
ri = Images[RandImage]; 
if (document.images) {
document.images[ImageTDTagID].src=ri; 
} 
} 


/* visu galerie öffner  */

function img_gallery(img_id){

xpos=100;
ypos=100;
width=10;
height=10;

if (xpos == -1 && ypos == -1) {
	xcenter=(screen.width/2)-(width/2);
	ycenter=(screen.height/2)-(height/2);
	window.open("pop_visu.asp?img="+img_id,1,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=50,height=50,left="+xcenter+",top="+ycenter+"")
}
else {
	window.open("pop_visu.asp?img="+img_id,1,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=50,height=50,left="+xpos+",top="+ypos+"") } 
}


function img_gallery2(img_id){

xpos=100;
ypos=100;
width=10;
height=10;

if (xpos == -1 && ypos == -1) {
	xcenter=(screen.width/2)-(width/2);
	ycenter=(screen.height/2)-(height/2);
	window.open("pop_pic.asp?img="+img_id,1,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=50,height=50,left="+xcenter+",top="+ycenter+"")
}
else {
	window.open("pop_pic.asp?img="+img_id,1,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=50,height=50,left="+xpos+",top="+ypos+"") } 
}


/* openpic */

function OpenNewWindow(Picture,Breit,Hoch)
{
xsize = Breit+60;
ysize = Hoch+100;
    
ScreenWidth = screen.width;
ScreenHeight = screen.height;

xpos = (ScreenWidth/3)-(xsize/3);
ypos = (ScreenHeight/3)-(ysize/3);
	
NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
NewWindow.document.write ("<html><head><title> ROSENHOF MOLLIS &hearts; ");
NewWindow.document.write ("</title><link rel='stylesheet' type='text/css' media='all' href='styles/style.css' /></head>");
NewWindow.document.write ("<body class='bg_pop'>");
NewWindow.document.write ("<div class='box_visu'>");
NewWindow.document.write ("<img src=");
NewWindow.document.write (Picture);
NewWindow.document.write (" class='pibo'></div>");
NewWindow.document.write ("<div class='box_unten'><a href='javascript:top.window.close()' class='box'>Fenster schliessen</a></div>");
NewWindow.document.write ("</body></html>");
NewWindow.document.close();
}