<!-- Empex interne Scripts
// copyright by Empex Medien GmbH 2005

function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function GP_DisableSubmitButton(el) { //v1.0
  el.disabled=true;
}

function Empex_image_change(imageXP) {
document.largePicture.src=imageXP;
}

// Mousescript 2001
   var ie4=document.all; //&&navigator.userAgent.indexOf("Opera")==-1
   var ns6=document.getElementById&&!document.all
   var ns4=document.layers

   var MAUS_ZEIGER = 'hand';
       if (ns6) MAUS_ZEIGER='pointer';

function zeiger(ID){
  document.getElementById(ID).style.cursor = MAUS_ZEIGER;
}

function navzeiger(ID){
  document.getElementById(ID).style.backgroundColor = '';
  document.getElementById(ID).style.cursor = MAUS_ZEIGER;
}

function zeigeraus(ID){
  document.getElementById(ID).style.backgroundColor = '';
}

function curserOver(cell){
  if (!cell.contains(event.fromElement))
{
  cell.style.cursor = 'hand';
  cell.bgColor = '#EFEFEF';
	}
}

function curserOut(cell){
  if (!cell.contains(event.toElement))
  {
  cell.style.cursor = 'default';
  cell.bgColor = ''; //backroundcolor
  }
}

function curserClick(cell){
  if(event.srcElement.tagName=='TD')
	  {
  if (cell.children.tags('A')[0] != null)
	  cell.children.tags('A')[0].click();
	   }
	}

// LoadingPage
function pageLoaded(gk) {
if (document.getElementById) {
var pageLoading = document.getElementById('loadingPage');
if (pageLoading) {
pageLoading.style.visibility = gk?'hidden':'visible';
				}
			}
		}


// Korrektur der Einträge mit Trim und Groß und Kleinschreibung
function Trim(text)
		{while(text.value.charAt(0)==' ')
		text.value=text.value.substring
(1,text.value.length )
		while(text.value.charAt
(text.value.length-1)==' ')
		text.value=text.value.substring
(0,text.value.length-1)

}

function TM_UpperCase(strInput,words){//1.1
    var theString = strInput.value;
    var strOutput = "";// Our temporary string used to build the function's output
    var sp = " ";
    var small = false;
    var smallWords = words.split(",") //words that shouldn't be  capitalized
    theString = theString.replace(/(\s*)([^\s])/,"$2")//remove leading spaces
    theString = theString.toLowerCase();  
    var inputArray = theString.split(sp);
    strOutput = inputArray[0].slice(0,1).toUpperCase()+inputArray[0].slice(1);
    for (i = 1; i < inputArray.length; i++){ 
        small=false;
        for (ii=0;ii<smallWords.length;ii++){
           if(inputArray[i] == smallWords[ii]) small = true;
           }
        if(!small) inputArray[i] = inputArray[i].slice(0,1).toUpperCase()+inputArray[i].slice(1);
        strOutput = strOutput + sp + inputArray[i];  
        }
    strInput.value = strOutput;
}

// disable mouseclick
var msg="empex.net";
function disableIE() {if (document.all) {return false;}
}
function disableNS(e) {
  if (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {return false;}
  }
}
if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;
} else {
  document.onmouseup=disableNS;document.oncontextmenu=disableIE;
}
document.oncontextmenu=new Function("return false")
//-->
