document.write ("<style type=\"text/css\">");
document.write (".dvFormblock div.dvHelptext {display:none;}");
document.write (".dvFormblock div.dvPopupHelptext {display:none;}");
document.write ("<\/style>");


function dispHelptext(idHelptext){
	if (document.getElementById(idHelptext).style.display == "block")
		document.getElementById(idHelptext).style.display = "none";
	else
		document.getElementById(idHelptext).style.display = "block";
}

function dispPopupHelptext(idHelptext){
	var helptexts = getElementsByClassName(document, "dvPopupHelptext");
	var helptextToShow = null;
	if (document.getElementById(idHelptext).style.display != "block")
		helptextToShow = idHelptext;

	for (var i=0;i<helptexts.length;i++){
		helptexts[i].style.display = "none";
	}

	if (helptextToShow)
		document.getElementById(idHelptext).style.display = "block";
}


/*BLZ suche START*/
function openBLZ(){
    var PopWindow = window.open("/Services/BLZsuche.aspx", "blz", "width=385,height=480");
	try {
		PopWindow.creator = self;
		PopWindow.focus();
	} catch(e) {
		// if window is opened on a foreign site, security settings prohibit setting the creator...
	}
}

function setBLZ(newBlz){
	var el = getElementsByClassName(document, "BankleitzahlValue")[0];
	el.value = newBlz;
}
/*BLZ suche END*/

function openZaehlerInfo(location){
    var PopWindow = window.open(location, "ZaehlerInfo", "width=470,height=475");
	try {
		PopWindow.creator = self;
		PopWindow.focus();
	} catch(e) {
		// if window is opened on a foreign site, security settings prohibit setting the creator...
	}
}

function preventCopyPaste(e) //prevent copy paste
{
    var evt = typeof window.event != 'undefined' ? window.event : e;
    var val = evt.keyCode == 86;
    if (evt.ctrlKey && val) 
    {
        if (evt.stopPropagation) 
        {
            evt.preventDefault();
            evt.stopPropagation();
        } 
        else 
        {
            evt.cancleBubble = true;
            evt.returnValue = false;
        }
    }
}

function debounceButton(inputElem, timeout) {
	if (inputElem.className.indexOf("debounced") >= 0)
	{
		return false;
	}
	else
	{
		inputElem.className = inputElem.className + " debounced";

		window.setTimeout(
			function(){
				var idx = inputElem.className.indexOf(" debounced");
				inputElem.className = inputElem.className.substring(0, idx);
			}, timeout
		);

		return true;
	}
}


 