//<![CDATA[

var p, obj, re_exec, alpha, working;

function post_review(){
	if(!document.all)
		reviewbox = document.getElementById("reviewbox");
	
	if(working || obj==reviewbox)
		return;

	re_exec='';

	if(p>141 && obj!=reviewbox){
		p = 141;
		re_exec = 'post_review()';
		hide_box();
	}
	else{
		reviewbox.style.display = 'block';
		
		p=-309;
		obj = reviewbox;
		alpha = 0;
		show_box();
	}
}

function rate(){
	if(!document.all)
		ratebox = document.getElementById("ratebox");

	if(working || obj==ratebox)
		return;

	re_exec='';

	if(p>141 && obj!=ratebox){
		p = 141;
		re_exec = 'rate()';
		hide_box();
	}
	else{
		ratebox.style.display='block';

		p=-309;
		obj = ratebox;
		alpha = 0;
		show_box();
	}
}

function tellfriend(){
	if(!document.all)
		tellfriendbox = document.getElementById("tellfriendbox");

	if(working || obj==tellfriendbox)
		return;

	re_exec='';

	if(p>141 && obj!=tellfriendbox){
		p = 141;
		re_exec = 'tellfriend()';
		hide_box();
	}
	else{
		tellfriendbox.style.display='block';

		p=-309;
		obj = tellfriendbox;
		alpha = 0;
		show_box();
	}
}

function favorite(){
	if(!document.all)
		favbox = document.getElementById("favbox");

	if(working || obj==favbox)
		return;

	re_exec='';

	if(p>141 && obj!=favbox){
		p = 141;
		re_exec = 'favorite()';
		hide_box();
	}
	else{
		favbox.style.display='block';

		p=-309;
		obj = favbox;
		alpha = 0;
		show_box();
	}
}

function flag(){
	if(!document.all)
		flagbox = document.getElementById("flagbox");

	if(working || obj==flagbox)
		return;

	re_exec='';

	if(p>141 && obj!=flagbox){
		p = 141;
		re_exec = 'flag()';
		hide_box();
	}
	else{
		flagbox.style.display='block';

		p=-309;
		obj = flagbox;
		alpha = 0;
		show_box();
	}
}

function show_box(){
	obj.style.top = p+'px';
	p = p+30;
	
	alpha = alpha+7;
	obj.style.filter = 'alpha(opacity='+alpha+')';

	working = true;
	t=setTimeout(show_box, 1);

	if(p>141){
		clearTimeout(t);
		working = false;
		alpha = 100;
		obj.style.filter = 'alpha(opacity=100)';
	}
}

function hide_box(){
	obj.style.top = p+'px';
	p = p-30;
	
	alpha = alpha-7;
	obj.style.filter = 'alpha(opacity='+alpha+')';

	working = true;
	t=setTimeout(hide_box, 1);

	if(p<-309){
		clearTimeout(t);
		working = false;
		obj.style.display='none';
		p=obj='';

		if(re_exec)
			eval(re_exec);
	}
}

//]]>