window.onload=init;window.onresize=do_layout;comments_active=false;function init(){	var picture = $('picture');	if (picture != null) {		if ($('noborder') != null)			picture.setStyle('border','0px');					picture.onmouseover=show_comment;		picture.onmouseout=hide_comment;				var comment = document.getElementById('comment');		comment.onmouseover=show_comment;		comment.onmouseout=hide_comment;		comment_fade = new Fx.Tween('comment',{property:'opacity',duration: 300,transition: Fx.Transitions.linear,link:'cancel',fps:30});		comment_fade.start(0,0);				do_layout();		new Fx.Tween('picture',{property:'opacity',duration:1000,transition:Fx.Transitions.linear,link:'cancel',fps:30}).start(0,1);	}}function do_layout(){	var picture = document.getElementById('picture');	if (picture != null) {		var x = (document.body.clientWidth-picture.width)/2; if (x<0) x=0;		var y = (document.documentElement.clientHeight-picture.height)/2; if (y<40) y=40;				var picture_panel = document.getElementById('picture_panel');		picture_panel.style.left=x+"px";		picture_panel.style.top=y+"px";				var comment = document.getElementById('comment');		comment.style.left=(x+1)+"px";		comment.style.top=(y+picture.height-140-23)+"px";	}}function show_comment(){ comment_fade.start(0.8); }function hide_comment(){ comment_fade.start(0); }function toggle_comments(){	if (!comments_active) {		comments_active = true;		new Fx.Tween('usercomments',{property:'left',duration:300,transition:Fx.Transitions.linear,link:'cancel',fps:30}).start(-600,4);	} else {		comments_active = false;		new Fx.Tween('usercomments',{property:'left',duration:300,transition:Fx.Transitions.linear,link:'cancel',fps:30}).start(4,-600);	}}function open_comments(){	comments_active = true;	document.getElementById('usercomments').style.left="4px";}
