var aid = "leer";

function oQuickinfo(id) {
	document.getElementById(id).style.display = "block";
	if (aid != "leer") {
		document.getElementById(aid).style.display = "none";
	}
	if (aid != id) {
		aid = id
	}
	else {
		aid = "leer"
	}
}

function Quickinfo(text) {
	document.onmousemove = bQuickinfo;
	tt = document.getElementById("quickinfo");
	tt.innerHTML=text;
	tt.style.display = "block";
}

function zQuickinfo(text) {
	if(text=="") {
		text = "Text ist nicht definiert"
	}
		document.onmousemove = bQuickinfo;
		tt = document.getElementById("quickinfo");
		tt.innerHTML=text;
		qi = setTimeout("tt.style.display = 'block'",100);
}

function bQuickinfo(p) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : p.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : p.pageY;
	if (tt != null) {
		tt.style.left = (x + 10) + "px";
		tt.style.top 	= (y + 10) + "px";
	}
}

function vQuickinfo() {
	clearTimeout(qi);
	tt = document.getElementById("quickinfo");
	tt.style.display = "none"
}

function saveVorlage(){
	document.VorlageSpeichern.submit();
}
function Vorschau(){
	Change('1');
	Change('2');
	Change('3');
	Change('4');
	Change('5');
	Change('6');
}

function Change(Stelle) {
	var Vorschau= Stelle + "_Vorschau";
	var Select = Stelle + "_Select";
	if (document.CSV_Parser[Select].value == "Count") document.getElementById(Vorschau).innerHTML = document.CSV_Parser.Count_Prefix.value + document.CSV_Parser.Count_Value.value + document.CSV_Parser.Count_Suffix.value + ' ';
	if (document.CSV_Parser[Select].value == "Usagecount") document.getElementById(Vorschau).innerHTML = document.CSV_Parser.Usagecount_Prefix.value + document.CSV_Parser.Usagecount_Akt.value + document.CSV_Parser.Usagecount_Split.value + document.CSV_Parser.Usagecount_Max.value + document.CSV_Parser.Usagecount_Suffix.value + ' ';
	if (document.CSV_Parser[Select].value == "Name") document.getElementById(Vorschau).innerHTML = document.CSV_Parser.Name_Prefix.value + document.CSV_Parser.Name_Value.value + document.CSV_Parser.Name_Suffix.value + ' ';
	if (document.CSV_Parser[Select].value == "Hitpoints") document.getElementById(Vorschau).innerHTML = document.CSV_Parser.Hitpoints_Prefix.value + document.CSV_Parser.Hitpoints_Akt.value + document.CSV_Parser.Hitpoints_Split.value + document.CSV_Parser.Hitpoints_Max.value + document.CSV_Parser.Hitpoints_Suffix.value + ' ';
	if (document.CSV_Parser[Select].value == "UniqueType") document.getElementById(Vorschau).innerHTML = document.CSV_Parser.UniqueType_Held_Prefix.value + document.CSV_Parser.UniqueType_Held_Value.value + document.CSV_Parser.UniqueType_Held_Suffix.value + ' ';
	if (document.CSV_Parser[Select].value == "Found") document.getElementById(Vorschau).innerHTML = document.CSV_Parser.Found_Prefix.value + document.CSV_Parser.Found_Value.value + document.CSV_Parser.Found_Suffix.value + ' ';
	if (document.CSV_Parser[Select].value == "leer") document.getElementById(Vorschau).innerHTML = "" + ' ';
	document.getElementById(Vorschau).className = document.CSV_Parser[Select].value
}
