function popupLichtblicke(_img,_tit){	
	var win = window.open('popup_image.php?img=../_images/_img/lichtblicke/' + _img + '&tit=' + _tit,'objImage','left='+((screen.width/2)-325)+',top='+((screen.height/2)-250)+',width=650,height=500');
}

function popupKompetenzen(_img,_tit){	
	var win = window.open('popup_image.php?img=../_images/_img/kompetenzen/' + _img + '&tit=' + _tit,'objImage','left='+((screen.width/2)-325)+',top='+((screen.height/2)-250)+',width=650,height=500');
}

function popupImpressum(){		
	var win = window.open('/popup_impressum.php','objImage','left='+((screen.width/2)-154)+',top='+((screen.height/2)-200)+',width=317,height=400');
}


var imgButton = new Array();

//initialize button
function imgButtonInit(_lyr){
	if(_lyr == null){
		_lyr = document
	}
	
	for(var i=0; i < _lyr.images.length;i++){
		if(_lyr.images[i].name.indexOf('but') != -1){
			imgButton[_lyr.images[i].name] = new ImgButton(_lyr.images[i]);
		}
	}
}

//button class
function ImgButton(_img) {	
	this.imgLo = new Image();
	this.imgOv = new Image();
	this.imgHi = new Image();
	
	this.imgLo.src = _img.src;
	this.imgOv.src = _img.src.replace('_lo','_ov');
	this.imgHi.src = _img.src.replace('_lo','_hi');
	
	this.locked = false;
	
	_img.button = this;
	this.img = _img;
	
	_img.lo = ImgButtonLo;
	_img.ov = ImgButtonOv;
	_img.hi = ImgButtonHi;
	
	_img.lock = ImgButtonLock;
	_img.unlock = ImgButtonUnlock;
}

function ImgButtonLo(){
	if(!this.button.locked) this.src = this.button.imgLo.src
}

function ImgButtonOv(){
	if(!this.button.locked) this.src = this.button.imgOv.src;
}

function ImgButtonHi(){
	if(!this.button.locked) this.src = this.button.imgHi.src;
}

function ImgButtonLock(){
	this.button.locked = true;
}

function ImgButtonUnlock(){
	this.button.locked = false;
}














