var bild_obj;
var weg_slv =wwHeight('sldiv',{});
addLoadEvent(function()
{
	bild_obj=wwInit_element("imgdi",{duration:1000});
});

var slshow = new ww_slide(
{
	gen_click: true,
	show_titel: true,
	play_imgon: 'grafiken/slideshow/play_03.gif',
	play_imgoff: 'grafiken/slideshow/pause_03.gif',
	play_imgid: 'slpause',
	head_div: 'slidehdl',
	head_msg: '',
	array: myShow,
	numimg: _MO_UAFOTO_INUM,
	slimg1: 'aaaim',
	slimg2: 'aaaim1',
	fade_id: 'fadeid',
	fade_off: false,
	loading_img: 'loadings',
	loading_imgsrc: 'grafiken/loading-old.gif',
	zoom_div: 'zoomimg',
	zoom_img: 'zoomimgi',
	zoom_offset: 10,
	numimgs: 11,
	prev_ext: '_4.jpg',
	img_ext: '_3.jpg',
	img_ids: 'im',
	prev_class: 'imgsm',
	prev_aclass: 'imgsmon',
	prev_lclass: 'imgslast',
	on_play: function(state)
	{
		if(state)
		{
			ww_set_height(weg_slv,30);
		}
		else
		{
			ww_set_height(weg_slv,0);
		}
	},
	show_time: 5,
	imgheight: 450,
	imgwidth: 450
});

ww_set_click('mod_del',function()
{
	if(confirm('Diese Bild wirklich löschen?\nBei bestätigen werden Bild,Kommentare,Tags und Votes unwiederruflich gelöscht!'))
	{
		new ajax(PPATH+'ajax/foto_del.html', {postBody: 'PUID='+TCONTUID+'&MID='+this.id.substr(3), onComplete:reload_page});
	}
});

var sslider = new ww_sslider(
{
	sl_div: 'slm',
	sl_left: 0,
	sl_max: 133,
	sl_width: 11,
	sl_minv: 2,
	sl_maxv: 30,
	sl_akt: 5,
	sl_move: function(val)
	{
		slshow.show_time=parseInt(val);
		setInnerHTML('slv',parseInt(val)+' Sekunden');
	}
});

//slshow.auto_stst(false);
function diclick()
{
	if(this.toggleNum==0)
	{
		slshow.auto_stst(true);
	}
	else
	{
		slshow.auto_stst(false);
	}
}
//wwStretcher('disl', {cursor: 'pointer',duration: 400,to_open: 1,mtyp: 2,clickOpen: diclick});


var is_slon=0;
setClick('imgidoff',function()
{
	if(is_slon==0)
	{
		is_slon=1;
		setInnerHTML('imgidoff','&rsaquo; als Bild&uuml;bersicht ansehen');
		ww_set_close('imgdi');
		ww_set_open('slidediv');
		slshow.auto_stst(true);
	}
	else
	{
		is_slon=0;
		setInnerHTML('imgidoff','&rsaquo; als Slideshow ansehen');
		ww_set_close('slidediv');
		ww_set_open('imgdi');
		slshow.auto_stst(false);
	}
});

function reload_page()
{
	window.location.href=window.location.href;
}


