

////////////////////////////////////////
////////////////////////////////////////
// WORKER
////////////////////////////////////////
////////////////////////////////////////

////////////////////////////////////////
// Contentgroesse
////////////////////////////////////////
SCREEN_SIZE_WIDTH  = screen.width;
SCREEN_SIZE_HEIGHT = screen.height;

////////////////////////////////////////
// MousePosition
////////////////////////////////////////
//Aktuelle Mouseposition
var MOUSE_POS_X = 0;
var MOUSE_POS_Y = 0;

// Mouse-Position:
function handleMouseMove(Ereignis) {
   MOUSE_POS_X = (MS) ? window.event.clientX : Ereignis.pageX;
	MOUSE_POS_Y = (MS) ? window.event.clientY : Ereignis.pageY;
}

document.onmousemove = handleMouseMove;


function getElementSize(el) {
	var r = { x: el.offsetLeft, y: el.offsetTop, w:el.offsetWidth, h:el.offsetHeight };
	if (el.offsetParent) {
		var tmp = this.getElementSize(el.offsetParent);
		r.x += tmp.x;
		r.y += tmp.y;
	}
	return r;
};

////////////////////////////////////////
// OnloadScripts
////////////////////////////////////////
var onLoadScriptArray = null;
function registerOnLoadScript(sCode){
	if(onLoadScriptArray==null) onLoadScriptArray = new Array();
	onLoadScriptArray[onLoadScriptArray.length] = sCode;
}
function startOnLoadScripts(){
	if(onLoadScriptArray!=null){
		for(var i = 0; i<onLoadScriptArray.length;i++) eval(onLoadScriptArray[i]);
	}
}


// -------------------------------------------------
// --- openImageWindow -----------------------------
// -------------------------------------------------
// Funktion zum Zoomen von bildern
function openImageWindow(nWidth, nHeight, sImgUrl) {
	var features = 'width='+(nWidth+25)+', height='+(nHeight+30);
	var win = window.open('','',features);
	win.document.open();
	win.document.writeln("<html><head><title></title></head><body>");
	win.document.writeln("<table height='100%' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td><a href=\"javascript:window.close()\"><img src=\""+sImgUrl+"\" border=\"0\" alt=\"\"></a></td></tr></table>");
	win.document.writeln("</body></html>");
	win.document.close();
}

function openWindowAfterBody(nWidth, nHeight, sText) {
	var features = 'width='+(nWidth+25)+', height='+(nHeight+30);
	var win = window.open('','',features);
	win.document.open();
	win.document.writeln("<html><head><title></title></head><body>");
	win.document.writeln(sText);
	win.document.writeln("</body></html>");
	win.document.close();
}

// -------------------------------------------------
// --- openImageWindow -----------------------------
// -------------------------------------------------
