<!--
	var last_clicked_thumbnail=-1;


	// images and mousover-images
	dynimg_normal	= new Array();
	dynimg_over		= new Array();


	// the big images in "projects"
	dynimg_big		= new Array();

	// the text for big images in "projects"
	dynimg_txt		= new Array();
	
	// additional code to be executed on click/over/out
	dynimg_over_customcode	= new Array();
	dynimg_down_customcode	= new Array();
	dynimg_out_customcode	= new Array();


	// on projects page: list of thumbnails to highlight one
	thumbnail_ids = new Array();

	// rescue this on mouseover, restore on mouseout
	var original_thumbnailtext="";


	// DOM in an ugly world
	//
	function obj(name) {
		if(document.all) 	return eval("document.all."+name);
		else 				return document.getElementById(name);
	}


		
var ie_mac=0;
if( 	navigator.appName.indexOf('Explorer')!=-1 &&
		navigator.platform.indexOf('Mac')!=-1 ) {
	ie_mac=1;
}




	function menu_mouseover( id ) {
		if( dynimg_over[id] ) 		obj(id).src = dynimg_over[id].src;
		if ( dynimg_over_customcode[id] )	eval( dynimg_over_customcode[id] );
	}

	function menu_mouseout() {
		if( dynimg_normal[id] )		obj(id).src = dynimg_normal[id].src;
		if ( dynimg_out_customcode[id] )	eval( dynimg_out_customcode[id] );
	}
	
	function menu_mousedown( id ) {
		obj('output').innerHTML=dynimg_txt[id];
		if ( ie_mac) {
			swap_big_img( id );
		} else {
			fading_out.onend = function(){ swap_big_img_and_fade_in( id );	 }
			fading_out.start();
		}
		if ( dynimg_down_customcode[id] )	eval( dynimg_down_customcode[id] );
	}


	// Those are called as event.
	// since events do not accept parameters, we read the id from 'this'
	// and call a function with that parameter.
	//
	function new_menu_mouseover()	{	id=this.id; try{ menu_mouseover( id ); } catch(egal) {}}
	function new_menu_mousedown()	{	id=this.id;	try{ menu_mousedown( id ); } catch(egal) {}}
	function new_menu_mouseout()	{	id=this.id;	try{ menu_mouseout(  id ); } catch(egal) {} }






	
	// Good browsers
	function swap_big_img_and_fade_in( id ) {
		obj('big').src = dynimg_big[ id ].src;
		higlight_only_thumbnail( id );
		fading_in.start();
	}

	// Bad browsers
	function swap_big_img( id ) {
		obj('big').src = dynimg_big[ id ].src;
		higlight_only_thumbnail( id );
	}



	function preselect_thumbnail( id ) {
		higlight_only_thumbnail( id );
		obj('big').src = dynimg_big[ id ].src;
		obj('output').innerHTML=dynimg_txt[id];
	}
	
	/*
		Init an image as mouseover
	*/
	function auto_over_init( id ) {
		
		if( ! obj( id ) ) {
			alert( "Object "+id+" does not exist!");
		}
		// normal image
		dynimg_normal[id] = new Image(); dynimg_normal[id].src = obj( id ).src;
		
		// mouseover image
		overpath 		= obj( id ).getAttribute("ovr");
		dynimg_over[id] = new Image(); dynimg_over[id].src = overpath;

		// is image forced highlighted? Then set normal = over, so mouseover is done invisible.
		forceactive	= obj( id ).forceactive ? 1 : 0;
		if( forceactive ) {
			dynimg_normal[id].src = dynimg_over[id].src;
		}
		
		obj( id ).onmouseover	= new_menu_mouseover;
		obj( id ).onmouseout	= new_menu_mouseout;

		// Simulate one mouseout to actualize state
		obj(id).src = dynimg_normal[id].src;
	}


	function auto_down_init( id , text , img_big ) {
		dynimg_big[ id ] = new Image(); dynimg_big[id].src = img_big;
		dynimg_txt[ id ] = text;
		obj( id ).onmousedown	= new_menu_mousedown;
	}
	



	function higlight_only_thumbnail( this_id ) {
		var id;
		for( var i=0 ; i< thumbnail_ids.length ; i++ ) {
			id=thumbnail_ids[ i ];
			if( id != this_id ) {
			//	AlphaOpacity.set(obj(id), 100);
				obj(id).style.borderBottom="4px solid white";
			} else {
			//	AlphaOpacity.set(obj(id), 100);
				obj(id).style.borderBottom="4px solid #E27E4D";
			}
		}
	}
	
	function edit( table , id , field , areamode) {
		popup("../_admin/edit.php?table="+table+"&id="+id+"&field="+field+"&areamode="+areamode , 0 , 700 ,300 , 0 );
	}


	function popup(adress,forcenew, breit,hoch, show_elements ) {
		var frm;
		
		var newname;
		if( forcenew==1 ) {
			newname=Math.floor(1000*Math.random()); newname="window"+newname;
		} else {
			newname="popup";
		}
		if (adress.indexOf('?') < 0) {
			adress+="?";
		} else {
			adress+="&";
		}
		adress+="popup=1";
	
		var param="width="+breit+",height="+hoch;
		
		switch ( show_elements==1 ) {
			case 0:
				param+= ",directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0";
				break;
			case 1:
			default:
				param+= ",directories=1,fullscreen=0,location=1,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1";
				break;
		}			

		frm=window.open(adress,newname, param);
		frm.focus();
	}



	function set_mailto( id , who , where , subject , body ) {
		where = where.replace(/\*/g, ".");
		obj(id).href="mailto:"+who+"@"+where;
		if( obj(id).innerHTML == "mail") {
			obj(id).innerHTML=who+"@"+where;
		}
	}

//-->