/* ======================================================================
Div positionieren
Aufruf:				moveDiv('LAYER_ID', X_POS, Y_POS);
X/Y-Position können durch 'hold' ersetzet werden
====================================================================== */

var xpos = "";
var ypos = "";
var name = "";

function moveDiv(name, xpos, ypos){
	if(xpos != "hold") xpos += "px";
	if(ypos != "hold") ypos += "px";

	if(document.getElementById){
		if(xpos == "hold") xpos = document.getElementById(name).style.left;
		if(ypos == "hold") ypos = document.getElementById(name).style.top;
		document.getElementById(name).style.top = ypos;
		document.getElementById(name).style.left = xpos;
	}
	if(document.layers){
		if(xpos == "hold") xpos = document.layers[name].left;
		if(ypos == "hold") ypos = document.layers[name].top;
		document.layers[name].top = ypos;
		document.layers[name].left = xpos;
		window.document.layers[name].moveTo(xpos, ypos);
	}
	if(document.all){
		if(xpos == "hold") xpos = window.document.all[name].pageX;
		if(ypos == "hold") ypos = window.document.all[name].pageY;
		document.all[name].style.top = ypos;
		document.all[name].style.left = xpos;
	}
}
