function set_infobox(action) {
	var Check = confirm("Wollen Sie die <?=$c_isp_name?> - InfoBox " + action + "?");
	if(Check){ 
		if(document.infobox.info_check.checked) {
			document.infobox.info_tag.value = "yes";
		}
		else{
			document.infobox.info_tag.value = "no";
		}
		document.infobox.submit();
	}
	else{
		if(action == 'einschalten'){
			document.infobox.info_check.checked = true;
		}
		else{
			document.infobox.info_check.checked = false;
		}
	}
}

function submit_html_navi(action) {
	document.html_navi.action = action;
	document.html_navi.submit();
}

function flip_info() {
	if(document.getElementById('infotext').style.display == 'none') {
		document.getElementById('infotext').style.display = "inline";
	}
	else{
		document.getElementById('infotext').style.display = "none";
	}
	return true;
}

function Info(id, action){
	info_id = id;
	info_action = action;
}

function paintit(visibly){
	if(visibly){
		if(document.getElementById(info_id)){
			document.getElementById(info_id).style.top		= tempY + "px";
			document.getElementById(info_id).style.left		= tempX + "px";
			document.getElementById(info_id).style.display	= "inline";
		}
	}
	else{
		document.getElementById(info_id).style.display	= "none";
	}
}

function set_it(){
	set_timeout = false;
	if(info_id == date_id){
		doit = true;
		if(document.getElementsByName(info_id)){
			paintit(true);
		}
	}
}

function getMouseXY(e) {
	if(info_id != ''){
		if (IE){ 
			tempX = event.clientX + document.body.scrollLeft;
			tempY = event.clientY + document.body.scrollTop;
		}
		else{
			tempX = e.pageX;
			tempY = e.pageY;
		}  
		tempY = tempY + 10;
		tempX = tempX + 10;
		if (tempX < 0){tempX = 0;}
		if (tempY < 0){tempY = 0;}  
		if(info_action == true){
			if(doit){
				if(document.getElementById(info_id)){
					paintit(true);
				}											
			}
			else{
				if(set_timeout == false){
					date_id = info_id;
					set_timeout = true;
					window.setTimeout("set_it();",1000);
				}
			}
		}
		else{
			if(document.getElementById(info_id)){
				paintit(false);
				info_id = '';
				doit = false;
			}
		}
	}
	return true;
}

var IE = document.all?true:false;
if(!IE)
	document.captureEvents(Event.MOUSEMOVE);

document.onmousemove = getMouseXY;

var tempX = 0;
var tempY = 0;
var info_id = '';
var info_action = false;
var date_id = false;
var doit = false;
var set_timeout = false;
