var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;


function oxNumericKeyPress(e, boxAllowDecimal, boxAllowNegative, bIE){
    var code;
    if (!e) var e = window.event;
    if (e.keyCode) code = e.keyCode;
    else if (e.which) code = e.which;


    if(code < 48 || code > 57)
    {
       //Alles andere ausser Zahlen
        // backspace, Tab, esc, del, Cursor-left, Cursor-right, CR zulassen
        if(code == 8 || code == 9 || code == 27 || code == 127 || code == 37 || code == 39 || code == 13)
        {return true}


        //Punkt oder Komma nicht zulassen
        if(boxAllowDecimal==true && (code == 46 || code == 44))
        {return true}

        //Minus nicht zulassen
        if(boxAllowNegative==true && (code == 45))
        {return true}

        //Alles andere nicht zulassen
        return false;
        
    }
    {
        //Zahlen von 0-9
        {return true}
 
    }

}


function oxDateKeyPress(e, ioxDateFormat){
    var code;
    if (!e) var e = window.event;
    if (e.keyCode) code = e.keyCode;
    else if (e.which) code = e.which;


    if(code < 48 || code > 57)
    {
       //Alles andere ausser Zahlen
        // backspace, Tab, esc, del, Cursor-left, Cursor-right, CR zulassen
        if(code == 8 || code == 9 || code == 27 || code == 127 || code == 37 || code == 39 || code == 13)
        {return true}


        //0=oxFormatDate  / und . zulassen
        if(ioxDateFormat==0 && (code == 47 || code == 46))
        {return true}


        //0=oxFormatTime   : zulassen
        if(ioxDateFormat==1 && (code == 58))
        {return true}


        //0=oxFormatDateTime  :  / und . zulassen
        if(ioxDateFormat==2 && (code == 47 || code == 46 || code == 58))
        {return true}


        //Alles andere nicht zulassen
        return false;
        
    }
    {
        //Zahlen von 0-9
        {return true}
 
    }

}




function toggleDiv(divid)
{
	mydiv = document.getElementById(divid);

	if (mydiv.style.display=="block")
	{
		mydiv.style.display="none";
	} else {
		mydiv.style.display="block";
	}
}

function showDocPopup(path, title, myWidth, myHeight) {
	var myWindow = window.open(path, title, 'scrollbars=1, width=' + myWidth + ', height=' + myHeight);
	myWindow.focus();
}

function showPopup(path, title, myWidth, myHeight) {
	var myWindow = window.open(path, title, 'scrollbars=0, width=' + myWidth + ', height=' + myHeight);
	myWindow.focus();
}

function showPopup3(path, title, myWidth, myHeight) {
	var myWindow = window.open(path, title, 'scrollbars=0, width=' + myWidth + ', height=' + myHeight);
	myWindow.focus();
}

function showDataFormPopup(path, title, myWidth, myHeight) {
	var myWindow = window.open(path, title, 'scrollbars=1, width=' + myWidth + ', height=' + myHeight);
	myWindow.focus();
}

function showListFormPopup(path, title) {
	var myWindow = window.open(path, title, 'scrollbars=1, width=1024, height=768');
	myWindow.focus();
}

function showUDFormPopup(path, title) {
	var myWindow = window.open(path, title, 'scrollbars=1, width=1024, height=768');
	myWindow.focus();
}

function showReportsFormPopup(path, title) {
	var myWindow = window.open(path, title, 'scrollbars=1, width=1024, height=768');
	myWindow.focus();
}


function sendYellowpayForm(){
	var myForm = document.Form1;
	document.Form1.submit();
}


function printdiv()
 {
 	window.print();
 }

function GetUrlValue(Entry)
{
  urlText=location.search;
  fc=urlText.slice(0,1);
  if(fc=="?")
  {
    l=urlText.length;
    urlText=urlText.slice(1,l);
    ArgSet=urlText.split("&");
    for(i=0;i<ArgSet.length;i++)
    {
      as=ArgSet[i].split("=");
      if(as[0]==Entry)
      {
        var result=as[1].split("%26");
        alert(result[0]);
        return (result[0]);
      }
    }
    ArgSet=urlText.split("%26");
    return ("");
  }
}

function doConfirm(sQuestion) 
{
    Check = confirm(sQuestion);
    if (Check == true) {
        return true;
    }
    else {
        return false;
    }
}


sfHover = function() {
				if (document.getElementById("nav")) {
					var sfEls = document.getElementById("nav").getElementsByTagName("LI");
				}
				if (document.getElementById("boxWKBInfo")) {
					var sfWKB = document.getElementById("boxWKBInfo").getElementsByTagName("DIV");
				}
				if (sfEls) {
					for (var i=0; i<sfEls.length; i++) {
						sfEls[i].onmouseover=function() {
							this.className+=" sfhover";
						}
						sfEls[i].onmouseout=function() {
							this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
						}
					}
				}
				if (sfWKB) {
					for (var i=0; i<sfWKB.length; i++) {			
						sfWKB[i].onmouseover=function() {
							//alert('gotcha!');
							this.className+=" sfhover";
						}
						sfWKB[i].onmouseout=function() {
							//alert('gone -.-');
							this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
						}
					}
				}
			}
if (window.attachEvent) window.attachEvent("onload", sfHover);
