function butOn(button, pref, ext)
{ 
	if (document.images && button.length > 0) 	
	{
		document.images[button].src = '/images/' + pref + '_' + button + '_on.' + ext; 		
	}
} 

function butOff(button, pref, ext)
{ 
	if (document.images) 
	{
		 document.images[button].src = '/images/' + pref + '_' + button + '_off.' + ext; 
	}
}


	
var bilder = new Array('/images/bt_praxis_on.jpg',  '/images/bt_service_on.jpg', '/images/bt_team_on.jpg', '/images/bt_kinder_on.jpg', '/images/bt_behandlung_on.jpg', '/images/bt_extras_on.jpg', '/images/bt_prophylaxe_on.jpg', '/images/bt_wecareyousmile_on.jpg');
	
for (i in bilder)
	{
		img = new Image();
		img.src = bilder[i];
	}
	

 function liam(rev) 
 {
 	s = "";
 	for ( var i = rev.length - 1; i > -1; i-- ) 
 	{
 		s +=  rev.charAt( i ) == "#" ? "@" : rev.charAt( i );
 	}
	document.write( s );
 }
 
 function mailto(rev) 
 {
 	s = "";
 	for ( var i = rev.length - 1; i > -1; i-- ) 
 	{
 		s +=  rev.charAt( i ) == "#" ? "@" : rev.charAt( i );
 	}
	location.href = "mailto:" + s;
 }

var win;
function openWin(url,width,height,scrollbars)
	{
		var posx = screen.width/2 - width/2;  
		var posy = screen.height/2 - height/2;
		var propsZ=(document.all)?('top=' + posy + ',left=' + posx):('screenX=' + posx + ',screenY=' + posy);
		var props = 'width=' + width + ',height=' + height + ',scrollbars=' +scrollbars + ',' + propsZ;
		
		if ( win && !win.closed )
			alert( 'Ein Bearbeitungsfenster ist bereits offen.\nSchliessen Sie bitte das Fenster bevor Sie fortfahren.' );
		else
		{
			win = window.open(url, "", props);			
		}
	}	

function writeSubnav(pos)
{
	if ( document.layers && document.submenu_ns )
	{
		document.submenu_ns.top = 110;
		document.submenu_ns.left = findLeft(450);
		with(document.submenu_ns.document)
		{
			open();
			write('<span class="txtSmallBlack">');
			write(cats[pos]);
			write('</span>');
			close();
		}
	}
	
	else if ( document.all && document.all.submenu )
	{
		document.all.submenu.innerHTML = cats[pos];
	}
	
	else if ( document.documentElement && document.getElementById('submenu') )
	{
		document.getElementById('submenu').innerHTML = cats[pos];
	}
}
function writeHint( txt )
{	
	if ( document.all && document.all.submenu )
	{
		document.all.submenu.innerHTML = faq[txt];
	}
	
	else if ( document.documentElement && document.getElementById('submenu') )
	{
		document.getElementById('submenu').innerHTML = faq[txt];
	}
	eval( "document.images.frage" + activeQ ).src='/images/fragen.gif';
	eval( "document.images.frage" + txt ).src='/images/fragen_on.gif';
	activeQ = txt;
}
