var target;

var j=25;
var l=10;

var Anum = 1;

function rotate(targetf){
	target = document.getElementById('pagepic');
	if (j == 0) {
	setTimeout("j++;rotate(folder);",50);
	}
	if (j > 0 && j<=11) {
	target.style.opacity= (l/10);
	target.style.filter = "alpha(opacity:"+ (l*10) +")";
	target.style.KHTMLOpacity= (l/10);
	target.style.MozOpacity= (l/10);
	l = l-1;
	setTimeout("j++;rotate(folder);",50);
	}
	if (j == 12) {
	l = 0;
	if (Anum == Atotal) {Anum=1;}
	else {Anum++;}
	target.style.opacity= (l/10);
	target.style.filter = "alpha(opacity:"+ (l*10) +")";
	target.style.KHTMLOpacity= (l/10);
	target.style.MozOpacity= (l/10);
	target.style.backgroundImage="url(/images/corner/"+targetf+"/photo"+Anum+".jpg)";
	setTimeout("j++;rotate(folder);",500);
	}
	if (j == 13) {
	setTimeout("j++;rotate(folder);",50);
	}
	if (j > 13 && j<=24) {
	target.style.opacity= (l/10);
	target.style.filter = "alpha(opacity:"+ (l*10) +")";
	target.style.KHTMLOpacity= (l/10);
	target.style.MozOpacity= (l/10);
	l++;
	setTimeout("j++;rotate(folder);",50);
	}
	if (j == 25) {
	l = 10;
	target.style.opacity= (l/10);
	target.style.filter = "alpha(opacity:"+ (l*10) +")";
	target.style.KHTMLOpacity= (l/10);
	target.style.MozOpacity= (l/10);
	setTimeout("j=0;rotate(folder);",4000);
	}
}