// Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use

//Specify rate of display (1/freq)
var freq=1

var random_num=Math.floor(Math.random()*freq)
if (random_num==0)
var ie=document.all
var dom=document.getElementById
var ns4=document.layers

function initbox(){
bouncelimit=40 //(must be divisible by 8)
direction="up"

if (!dom&&!ie&&!ns4)

return
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
crossobj.top=scroll_top-250
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",20)
}

function dropin(){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<100+scroll_top)
crossobj.top=parseInt(crossobj.top)+40
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",20)
}
}

function generateWindow(URL, Fenstername) {

Url = unescape(URL);
Fenstername = "ROOR";

	var PositionX = 0; //XPosition des Fensters
	var PositionY = 0; //YPosition des Fensters

	var Fensterbreite = screen.availWidth; //die Fensterbreite entspricht der verfügbaren Monitorbreite
	var Fensterhoehe = screen.availHeight; //die Fensterhöhe entspricht der verfügbaren Monitorhöhe
	window.moveTo(PositionX, PositionY);
	window.resizeTo(Fensterbreite, Fensterhoehe);

	if (!window.outerWidth) {
	Optionen = 'channelMode=no,directories=no,fullscreen=no,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,height=' + Fensterhoehe + ',left=' + PositionX + ',top=' + PositionY + ',width=' + Fensterbreite + '' //Fensteroptionen für Explorer
	var w = window.open(URL, Fenstername, Optionen);
	w.resizeTo(Fensterbreite, Fensterhoehe); }

	else if (window.outerWidth) {
	Optionen = 'dependent=yes,directories=no,hotkeys=yes,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,outerHeight=' + Fensterhoehe + ',outerWidth=' + Fensterbreite + ',screenX=' + PositionX + ',screenY=' + PositionY + '' //Fensteroptionen für Netscape
	var w = window.open(URL, Fenstername, Optionen);
	w.resizeTo(Fensterbreite, Fensterhoehe); }	
	
// alert(URL + " und " + Fenstername);	

if (w && URL) {
window.opener = 0;
self.close(); }
}


function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function functionlessWindow(URL, Fenstername) {
	var PositionX = 0 //XPosition des Fensters
	var PositionY = 0 //YPosition des Fensters
	var Fensterhoehe = screen.availHeight//die Fensterhšhe entspricht der verfŸgbaren Monitorhšhe
	var Fensterbreite = 450 //die Fensterbreite entspricht der verfŸgbaren Monitorbreite
	if (!window.outerWidth) {
	Optionen = 'channelMode=no,directories=no,fullscreen=no,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,height=' + Fensterhoehe + ',left=' + PositionX + ',top=' + PositionY + ',width=' + Fensterbreite + '' //Fensteroptionen fŸr Explorer
	var w = window.open(URL, Fenstername, Optionen);
	w.resizeTo(Fensterbreite, Fensterhoehe); }
	else if (window.outerWidth) {
	Optionen = 'dependent=yes,directories=no,hotkeys=yes,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,outerHeight=' + Fensterhoehe + ',outerWidth=' + Fensterbreite + ',screenX=' + PositionX + ',screenY=' + PositionY + '' //Fensteroptionen fŸr Netscape
	var w = window.open(URL, Fenstername, Optionen); }	
}

function ImagePreview(Picture,Breit,Hoch) {
xsize = Breit+35;// Zusatz fuer Rand rechts und links
ysize = Hoch+85; //Zusatz fuer Rand oben und unten - damit Button angezeit werden kann 
    
ScreenWidth = screen.width;
ScreenHeight = screen.height;

xpos = (ScreenWidth/2)-(xsize/2);
ypos = (ScreenHeight/2)-(ysize/2);
	
	NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>ROOR");
	NewWindow.document.write ("</title></head>");
	NewWindow.document.write ("<body bgcolor='#cccccc'>");
	NewWindow.document.write ("<table align='center'><tr>");
	NewWindow.document.write ("<td align='center' valign='top'>");
	NewWindow.document.write ("<table border='1' bgcolor='#000000' cellpadding='0' cellspacing='1'><tr><td align='center'>");
	NewWindow.document.write ("<img src=");
	NewWindow.document.write (Picture);
	NewWindow.document.write (">");
	NewWindow.document.write ("</tr></table>");
	NewWindow.document.write ("</td></tr><tr>");
	NewWindow.document.write ("<td align='center' valign='bottom'>");
	NewWindow.document.write ("<br><center><form><input type='button' value='Vorschau schliessen' style='font-family: Verdana; font-size: 10px' onClick='self.close()'>");
	NewWindow.document.write ("</td></tr></table>");
	NewWindow.document.write ("</form></body></html>");
	NewWindow.document.close();
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
