var lastMode = 1;
var lastUpdate = "24.01.2002";
var lastPicArr = "telo", lastPicN = 1;
var allowPopup = true;


//#### projects arrays ####
telo = new Array ("Telo",
			"Published as movement and<br>participation of <b>PornoEsthetica</b> mission.",
			"photografers:<br>Anton Nefedov<br>Arkady Turchenko<br><br>models:<br>Anton Nefedov<br>Arkady Turchenko<br><br>Release date: 24.01.2002",
					"telo/1/1-.jpg", "telo/1/index.html", "[1]", 349, 480,
					"telo/2/2-.jpg", "telo/2/index.html", "[2]", 335, 512,
					"telo/3/3-.jpg", "telo/3/index.html", "[3]", 640, 369,
					"telo/4/4-.jpg", "telo/4/index.html", "[4]", 689, 431,
					"telo/5/5-.jpg", "telo/5/index.html", "[5]", 297, 512,
					"telo/6/6-.jpg", "telo/6/index.html", "[6]", 640, 418,
					"telo/7/7-.jpg", "telo/7/index.html", "[7]", 390, 512
					);

n14 = new Array ("N.14", " ", "photografer:<br>Anton Nefedov<br><br>model:<br>Anna Durneva<br><br>Release date: 24.01.2002",
					"n14/1/1-.jpg", "n14/1/index.html", "[1]", 594, 373,
					"n14/2/2-.jpg", "n14/2/index.html", "[2]", 596, 388,
					"n14/3/3-.jpg", "n14/3/index.html", "[3]", 592, 390,
					"n14/4/4-.jpg", "n14/4/index.html", "[4]", 580, 386,
					"n14/5/5-.jpg", "n14/5/index.html", "[5]", 391, 564,
					"n14/6/6-.jpg", "n14/6/index.html", "[6]", 640, 418
					);

nju = new Array ("nju", " ", "photografer:<br>Anton Nefedov<br><br>model:<br>Anna Durneva<br><br>Release date: 26.01.2002",
					"nju/2/2-.jpg", "nju/2/index.html", "[2]", 336, 512
					);


div = new Array ("Diversity", "Contains shots<br>published as singles.", "photograhers: Anton Nefedov<br>Arkady Turchenko<br><br>Last update: " + lastUpdate,
					"div/howtostopworryingandliveforever/howtostopworryingandliveforever-.jpg", "div/howtostopworryingandliveforever/index.html", "How To Stop Worrying And Live Forever", 372, 580,
					"div/myneighbor/myneighbor-.jpg", "div/myneighbor/index.html", "My Neighbor", 384, 580

);

all = new Array ("All", " ","Last update: "+ lastUpdate);
all = all.concat(nju.slice(3));
all = all.concat(div.slice(3));
all = all.concat(telo.slice(3));
all = all.concat(n14.slice(3));

//#### displaing chronicles of photo publishing ####
cronicle = new Array (
			"<b>Nju: session pre:presentation #</b>", 	"22.01.2002 MCh Sgl", 	"nju", 		1,
			"<b>How to Stop Worrying And Live Forever #</b>", 	"22.01.2002 MCh Sgl", 	"div", 		1,
			"<b>My Neighbor </b>",					"20.01.2002 Mch Sgl",	"div",		2,
			"<b>Telo project posted</b>", 				"19.01.2002 Mch Prj", 	"telo", 	0,
			"<b>N.14 project posted</b>",				"18.01.2002 Clr Prj",	"n14",		0,
			"<b>Taganrog Nova project posted @</b>",		"15.01.2002 Clr Prj",	"nova/index.html", "@"
);

function openWin(file, title, params){
	a = window.open(file, title, params);
}

function nullLink(){}

function shineP (prjN){

	if (Llist.style.visibility == "hidden") lastMode = 1
		else lastMode = 2;

	packt.style.visibility = "hidden";
	Llist.style.visibility = "hidden";
	Clist.style.visibility = "hidden";
	Plastica.style.visibility = "visible";
	comms.style.visibility = "visible";


	strN = "("+prjN+".length-3)/5";
	N = eval (strN);
	strL = "";
	for (i=1; i<=N; i++) {
		tN=((i-1)*5)+3;
		strL += '<a href="';
		strL += "javascript:openWin('img/";
		strN = prjN + "[tN+1]";
		strL += eval (strN) + "','popup" + i + "','width=";
		strN = prjN + "[tN+3]";
		strL += eval (strN) + ",left="+(screen.availWidth/2-eval(strN)/2)+",height=";
		strN = prjN + "[tN+4]";
		strL += eval (strN) + ",top="+(screen.availHeight/2-eval(strN)/2)+"')";
		strL += '"><img width="99" height="73" border="0" src="img/'
		strN = prjN + "[tN]";
		strL += eval (strN) + '" alt="';
		strN = prjN + "[tN+2]";
		strL += eval (strN) + '"></a>&nbsp;';
	}

	crees.innerHTML = strL;

	strN = prjN+"[0]";
	bonehead.innerHTML = eval (strN);

	strN = prjN+"[1]";
	bonebody.innerHTML = eval (strN);

	strN = prjN+"[2]";
	bonecrust.innerHTML = eval (strN);

	Plastica.doScroll("scrollbarPageLeft");

}

function fadeP () {
	packt.style.visibility = "visible";
	if (lastMode==2)	Llist.style.visibility = "visible"
		else Clist.style.visibility = "visible";
	Plastica.style.visibility = "hidden";
	comms.style.visibility = "hidden";

}

function showCronicles() {
	cronicles.style.fontWeight ='bold';
	projects.style.fontWeight ='normal';
	about.style.fontWeight ='normal';

	Llist.style.visibility = "hidden";
	Clist.style.visibility = "visible";

	strL = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
	n = cronicle.length;
	for (i=0; i<n; i+=4){
		strL += '<tr valign="top" align="left"><td width="250" class="content">';
		if (cronicle[i+3]!="@" && cronicle[i+3]!=0){
			pN = (cronicle[i+3]-1)*5+3; 
			strL += '<a href="javascript:openWin(';
			strL += "'";
			strN = cronicle[i+2] + "[pN+1]";
			strL += "img/" + eval(strN) + "','popup" + cronicle[i+2] + i + "','width=";
			strN = cronicle[i+2] + "[pN+3]";
			strL += eval (strN) + ",left=" + (screen.availWidth/2-eval(strN)/2)+ ",height=";
			strN = cronicle[i+2] + "[pN+4]";
			strL += eval (strN) + ",top="+(screen.availHeight/2-eval(strN)/2)+"')";
			strL += '">';
		};

		if (cronicle[i+3]==0){
			strL += '<a href="javascript:shineP(';
			strL += "'" + cronicle[i+2] + "');";
			strL += '">';
		};

		if (cronicle[i+3]=="@"){
			strL += '<a href="' + cronicle[i+2] + '" target="_blank">';
		};

		strL += cronicle[i];

		strL += '</a></td><td class="content" align="right">' + cronicle[i+1] + '<br><br></td></tr>';
	};

	strL += '<tr valign="top" align="left"><td class="content" colspan="2"><br><br># - new publication or has new publications; @ - refers to outer project;</td></tr></table>';

//	alert (strL);
	Clist.innerHTML = strL;
}

function showProjects() {
	cronicles.style.fontWeight ='normal';
	projects.style.fontWeight ='bold';
	about.style.fontWeight ='normal';

	Llist.style.visibility = "visible";
	Clist.style.visibility = "hidden";
}

function showAll() {
//	cronicles.style.fontWeight ='normal';
//	projects.style.fontWeight ='normal';
//	about.style.fontWeight ='bold';

//	Llist.style.visibility = "hidden";
//	Clist.style.visibility = "visible";

	shineP("all");

}

function showLast(){

	if (allowPopup) {
		strL = "openWin('";
		strN = lastPicArr+"[([lastPicN]-1)*5+4]";
		strL += "img/"+eval(strN)+"','popuplast','width=";
		strN = lastPicArr+"[([lastPicN]-1)*5+6]";
		strL += eval(strN)+",left="+(screen.availWidth-eval(strN)-10)+",height=";
		strN = lastPicArr+"[([lastPicN]-1)*5+7]";
		strL += eval(strN)+",top=5');";
		eval (strL);
	};

//	alert (strL);
}



