function openBrWindow(theURL,winName,b,h,features) 
{ 			
	var eigenschaft,fenster02;
	x = (screen.width-b)/2;
	y = (screen.height-h)/2;
	var eigenschaften="left="+x+",top="+y+",screenX="+x+",screenY="+y;
	
	eigenschaften= eigenschaften + ",width="+b+",height="+h+","+features;		
	fenster02=window.open(theURL,winName,eigenschaften);			
}

function switchView(obj_id)
{                                                                                                      
	if(document.getElementById(obj_id).style.display == '')
	{
		document.getElementById(obj_id).style.display = 'none';     
	} else {
		document.getElementById(obj_id).style.display = '';
	}		                                                                                                                          
}

function doLogin(loginform) {
	if (document.getElementById(loginform).email.value == "") {
		alert("Bitte geben Sie Ihre E-Mail-Adresse ein.");
		return false;
	}
	
	if (document.getElementById(loginform).password.value == "") {
		alert("Bitte geben Sie Ihr Passwort ein.");
		return false;
	}				
	
	//Login durchführen
	xajax_loginUser(xajax.getFormValues(loginform));
}

function popup(adresse, name, params) {
	if(params=="") {
		popupwindow = window.open(adresse, name, "width=800,height=600,left=100,top=200,scrollbars=yes");
	}
	else popupwindow = window.open(adresse, name, params);
}

$.noConflict();
jQuery(document).ready(function(){
	xpngFix({
		gif: '/js/xpngFix/spacer.gif',
		method: 'crop',
		elms: [['div_content_top'], ['div_content_bottom'], ['div_navi_bottom']]
	});
	xpngFix({
		method: 'scale',
		elms: [['div_content_middle']]
	});
	
	//jQuery("#div_galerie a[@rel*=lightbox]").tinyLightbox();
	jQuery("#div_galerie, #div_content_middle").tinyLightbox({item:"a[@rel*=lightbox]"});
});

