function popup(url, width, height, name){
  pop = window.open(url,name,'width=' + width + ',height=' + height + ',status=yes,resizable=yes,menubar=no,locationbar=no,scrollbars=yes,dependent=yes' );
}
function popup_centered(url, width, height, name)
{
    var sWidth   = screen.width;
    var sHeight  = screen.height;
        
    // Center Popup
    var posX    =  (sWidth/2) - (width/2);
    var posY    =  (sHeight/2) - (height/2);
	  pop = window.open(url,name,'width=' + width + ',height=' + height + ',left=' + posX + ',top=' + posY + ',status=no,resizable=yes,menubar=no,locationbar=no,scrollbars=no,dependent=yes' );
    pop.focus();
}

function popup_resize(width, height) {
    window.resizeTo(width+60, height+100);
    // Center Popup
    var sWidth   = screen.width;
    var sHeight  = screen.height;
    var posX    =  (sWidth/2) - (width/2);
    var posY    =  (sHeight/2) - (height/2);
    moveTo(posX,posY);
}

// 2006 Werb'Office http://www.werboffice.de/ for topex-systems.de
//-------------------------------------------------------------------------

// Rollover-Steuerung

pix = new Array();

function initImageObjects(){
for(i=0;i<initImageObjects.arguments.length;i++) {
	pix[i] = new Image();
	pix[i].src = initImageObjects.arguments[i];
	}	
}

function bW(bName, bObjekt, x) {
	if(x != 0){myName = bName; myImg = document.getElementById(bName).src;}
    if (eval(bObjekt)){ 
    	document.getElementById(bName).src = eval(bObjekt + '.src');
		}
}

function imgRestore(){
	if (eval('document.images.' + myName)){
		document.getElementById(myName).src = myImg; }
}

// Pop-up Fenster
function PopWin(theURL,winName,features) {
  nWindow = window.open(theURL,winName,features);
  nWindow.focus();
}

//	Dekodierung 
var refA="29805DqSEFGB634MNXßYZO1HImnorJAPRVW";
var refB="+: -ibjkTUlvw7CKLxp.acQhyzds@tuefg";
var refC = Array(4,3,2,5,7,6,9,8,1);

function dc(text,val) {
    ref=refA+refB;
    nStr="";

    for(i=0; i<text.length; i++) {
        sStr=text.substring(i, i+1);
        num=ref.indexOf(sStr);

		if((num-val)<0){
			nVal = num - val;
			aStr = ref.substring(ref.length+nVal, (ref.length+nVal)+1);
        }else{
			aStr=ref.substring(num -val,num-val+1);
		}
       	nStr += aStr;
     }
	return nStr;
}

