/*	e-sense Javascript Library
	Global Settings for Art-Square
	Author: Jan Graber
	Date: 2001-06-02
*/

/* Initialize variables */
var imagesDir='images/';
var screenWidth=0,screenHeight=0;
	/* Borders */
var screenBorderX=0;
var screenBorderY=0;
	/* Browser types */
var MS4=0, NS4=0, V4=0;
	/* diverse Variablen */
var descWidth=200; // Breite der Beschreibungsboxen Front
var descHeight=80; // Höhe
var pic=new Image();
var picName='';

// Check for browser version
bname=navigator.appName; 
V4=1;
if (document.getElementById) {
    Browser="W3C";
    }
else if (document.all) {
      Browser="MS4x";
}
else if (document.layers) {
      Browser="NS4x";
}
else { Browser="N/A"; V4=0; } 



function SetPositioningVariables() {
	with(Math) {
		w0=round(screenWidth/2);
		w1=round(screenHeight/2);
		w2=w0-400; if (w2<=0) {w2=0};
		w3=w1-300; if (w3<=0) {w3=0};
		w4=w0+400;
		w5=w1+300;
		w6=24; //border
		w7=36;
		w8=140; //blend-offset Y
	}
} // end of SetPositioningVariables()
// Constructor for BlockObjects



function RandomizeBild(directory,maxPic) {
var x=0;

x=Math.random()*100; 
for (i=x;i>maxPic;i=Math.round(i/4)) { }
x=Math.round(i); 
if(x==0) {x=1;}
picName='seitenbild-'+x+'.jpg';
pic=new Image();
pic.src=directory+picName; 

}



/* PosElement(block). Sets x and y of block and displays it */
function PosLogoElement(block) {
var index=block.name; 
	if(Browser=="NS4x") {
		with(document.layers[index]) {
			left=block.X;
			top=block.Y;
			zIndex=block.zInd;
		}
	 }
	 else if(Browser=="MS4x") { 
	 	with(document.all[index].style) {
			left=block.X;
			top=block.Y;
			zIndex=block.zInd;
		}
	}
	 else if(Browser=="W3C") { 
	 	with(document.getElementById(index).style) {
			left=block.X;
			top=block.Y;
			zIndex=block.zInd;
		}
	}
} //end of PosElement()


