// JavaScript Document
// misc.js
// diverse Hilfs-Funktionen


function setCursor(cursorType) {
	if (xGetElementById("boxMap").style.cursor)	{
		xGetElementById("boxMap").style.cursor=cursorType;
	}
}

function trimSpace(inString) {
	var outString = inString.replace(/^\s+/, "");
	outString = outString.replace(/\s+$/, "");	
	return outString;
}

function showHelp() {
	//var url = proto + parent.UPGMainF.server + parent.UPGMainF.appURL + "help.htm";
	var url = appURL + "help/help.pdf";
	var f=window.open( url,"Hilfe","width=800,height=600,menubar=no,resizable=yes,status=no,toolbar=0");
	f.focus();
}

function showImprint() {
	var url = appURL + "impressum.htm";
	var f=window.open( url,"Impressum","width=480,height=300,top="+xClientHeight()/2.3+",left="+xClientWidth()/3+",menubar=no,resizable=yes,status=no,toolbar=0");
	f.focus();
}

function addTitlebox1() {
	var content='<div id="boxTitle1" align="left">';
	content += '<img src="images/' + logoTitlebox1 + '" style="width:100%;">';
	content += '</div>';
	document.writeln(content);
}

function addTitlebox2() {
	var content='<div id="boxTitle2" style="float:right;height:30px;">';
	content += '<img src="images/' + logoTitlebox2 + '" style="height:30px;">';
	content += '</div>';
	document.writeln(content);
}

function toggleDebug() {
	if (debug==1) {
		debug=0;
		alert("Debugmodus aus");
	} else {
		debug=1;
		alert("Debugmodus ein");
	}
}
