var child_open = '';
var child_close = true;
var child_move = false;
var is_mouseover = new Array();
var layer_versatz = 30;
var layer_width = 180;

var min_left = 225;
var max_right = 760;
var mouse_x = 225;


document.onmousemove = movemenu;
if(document.captureEvents) {
	document.captureEvents(Event.MOUSEMOVE);
}


function csdlogin() {
	if(category_path == 'sarah-zuelow/mpW88/Nsh6o' && document.forms['autologinform']) {
		var f = document.forms['autologinform'];
		if(f.autologin.value == 1) {
			f.submit();
		}
	
		if(f.autologin.value == 2) {
			var lade = '../index.php?sid=' + sid + '&rubrikpath=sarah-zuelow/OaBiq/phQ8u';
			document.location.href = lade;
		}
	
	}
}


function wobinich() {
	if(category_path == 'sarah-zuelow/mpW88/Nsh6o') {
		csdlogin();
	} else {
		var lade = '../index.php?sid=' + sid + '&rubrikpath=' + category_path;
		if(parent.location.href.indexOf("public/services") != -1) {
			parent.location.href = lade;
		}
	}
}



function openHinweis() {
	window.open('../hinweis_de.htm', 'Hinweis', 'width=300,height=150,resizable=0');
}


function movemenu(e) {
	if(c2p_dhtml_support()) {
		
		mouse_x = mouse_x_koord(e) - layer_versatz;
		if(mouse_x < min_left) {
			mouse_x = min_left;
		}
		if((mouse_x + layer_width) > max_right) {
			mouse_x = max_right - layer_width;
		}
		
		if (child_open != '' && child_move == true) {
			if(c2p_get_dhtml_object(child_open)) {
				c2p_dhtml_setX(child_open, mouse_x);
			}
		}
	}
}


function open_child(id) {
	var id = id + '_child';
	if(c2p_dhtml_support()) {	
		if(child_open != '') {
			close_child(); }
		
		child_open = id;
		child_close = false;
		child_move = true;
		if(c2p_get_dhtml_object(id)) {
			mouse_x = mouse_x - layer_versatz;
			
			if(mouse_x < min_left) {
				mouse_x = min_left;
			}
			if((mouse_x + layer_width) > max_right) {
				mouse_x = max_right - layer_width;
			}
			

			c2p_dhtml_setX(id, mouse_x);
			c2p_dhtml_style(id).visibility = 'visible';
		}
	}
}

function close_child() {
	if(c2p_dhtml_support()) {
		if(child_open != '' && child_close == true) {
			if(c2p_get_dhtml_object(child_open)) {
				c2p_dhtml_style(child_open).visibility = 'hidden';
			}
			child_open = '';
			child_move = false;
		}
	}
}

function dclose() {
	if(c2p_dhtml_support()) {
		if(child_open != '') {
			child_close = true;
			child_move = false;
			setTimeout('close_child()',1300);
		}
	}
}


function set_bg_color(id, mouse) {
	if(c2p_dhtml_support()) {
		if(c2p_get_dhtml_object(id)) {
			if(mouse == 'over') {
				c2p_dhtml_style(id).backgroundColor = '#575757';
			} else {
				c2p_dhtml_style(id).backgroundColor = '';
			}
		}
	}
}



function reorganize_thumbnails() {
	if(c2p_dhtml_support()) {
		if(c2p_get_dhtml_object('diashow_overview') && c2p_get_dhtml_object('diashow_container')) {
			c2p_dhtml_set_innerHTML('diashow_container', c2p_dhtml_get_innerHTML('diashow_overview'));
			c2p_dhtml_style('diashow_container').visibility = 'visible';
		}
	}
}


