// 
// GeVauO Homepage
//

// NO FRAME-IN-FRAME
if (top != self)
  top.location = self.location;
  
var pushobjects = new Object();
var pushpositions = new Object();
var autoinfo = new Object();
var timers = new Object();

function autopath(pref, tail, coun)
{
   var pfad = new Array();
   var num;
   for (var i = 1; i <= coun; i++)
   { 
   	if (i < 10) { num = "0" + i; } else { num =  i; }
   	pfad.push(pref + num + tail);
   }
   return pfad;
}
   	
function newpushme(pfade, name)
{
   pushobjects[name] = pfade;
   pushpositions[name] = 1;
   autoinfo[name] = 0;
}

function pushme(name)
{
	aktuell = pushpositions[name];
	count = pushobjects[name].length;
	
	if (aktuell >= count) { aktuell = 1; } else { aktuell++; };
	pushpositions[name] = aktuell;
	pushimage = pushobjects[name][aktuell - 1];
	
	document.images[name].src = pushimage;
}

function _autopush(name, time)
{
	timers[name] = window.setInterval("pushme('"+name+"')", time);
	autoinfo[name] = time;
}

function autopush(name, time)
{
	timers[name] = 0;
	autoinfo[name] = -time;
}

function pushauto(name)
{
	aktuell = autoinfo[name];
	autoinfo[name] = -aktuell;
	if (aktuell > 0) { 
		window.clearInterval(timers[name]);
	} else {
		_autopush(name, -aktuell);
	}
}

function resizeclass(classname)
{
   var x;
   x = document.width - 115 - 16;
   if (x < 600) {
      x = 600;
   }
   if (x > 1500) {
      x = 1500;
   }
   classname.width = x+"px";
}

function changedynamicframe()
{
//  resizeclass(f_bar);
   Rules = document.styleSheets[0].cssRules;
   resizeclass(Rules[16].style);
}
function pushall(name)
{
   var x, y;
//   var width = 276, height=200;
	var width = 309; height=200;
	count = pushobjects[name].length;
	imgs = pushobjects[name];
   
   x = Math.round(screen.width / 2) - 250;
   y = Math.round(screen.height / 2) - 190;
   newwindow = window.open('about:blank','previewwindow', 'dependent=yes,height=600,width='+(20+width)+',hotkeys=no,location=no,menubar=no,left=16,top=16,statusbar=no,resizeable=no,scrollbars=yes');
   newwindow.document.open();
   newwindow.document.writeln('<html>');
   newwindow.document.writeln('<head><title>GeVauO - Fotoalbum</title>');
   newwindow.document.writeln('<link rel="stylesheet" href="/default.css" /></head>');
   newwindow.document.writeln('<body leftmargin=1 topmargin=1 marginheight=1 marginwidth=1 style="background-image:url()">');
   newwindow.document.writeln('<br/><div align="center"><a href="javascript:close();">-- Fenster schließen --</a></div><br/><br/>');
   newwindow.document.writeln('<div align="center"><table cellspacing="0" cellpadding="0">');
	for (i = 0; i<count; i++) {
		newwindow.document.writeln('<tr><td align="center"><img src="'+imgs[i]+'" alt="'+imgs[i]+'"></td></tr><tr><td>&nbsp;</td></tr>');
	}
   newwindow.document.writeln('</table></div>');
   newwindow.document.writeln('<br/><br/><div align="center"><a href="javascript:close();">-- Fenster schließen --</a></div><br/>');
   newwindow.document.writeln('</body></html>');
   newwindow.document.close();
   newwindow.focus();
}



