// JavaScript Document

function expandBox(n,r,c,main,syno,cd){

	document.getElementById('expBoxMainTitle').innerHTML = "";
	document.getElementById('expBoxMainTitle').innerHTML = main;
	document.getElementById('expBoxSynopsis').innerHTML = "";
	document.getElementById('expBoxSynopsis').innerHTML = syno;
	document.getElementById('link').href = "film.php?cod="+cd;

	initTop = -951;
    initLeft = 0;

	currTop = initTop + (r-1)*110;
	currLeft = initLeft + (c-1)*196;

	if (c>3) {

		currLeft = currLeft - 196;

		document.getElementById('expBoxMainPict').style.cssFloat="right";
		document.getElementById('expBoxMainPict').style.styleFloat="right";

		document.getElementById('expBoxMainTitle').style.cssFloat="left";
		document.getElementById('expBoxMainTitle').style.styleFloat="left";

		document.getElementById('play').style.left="196px";

	} else {

		document.getElementById('expBoxMainPict').style.cssFloat="left";
		document.getElementById('expBoxMainPict').style.styleFloat="left";

		document.getElementById('expBoxMainTitle').style.cssFloat="right";
		document.getElementById('expBoxMainTitle').style.styleFloat="right";

		document.getElementById('play').style.left="0";

	}

	if (r>3) {

		currTop = currTop + 71;

	}

	if ((r==3)||(r==8)){

		currTop = currTop - 110;

		document.getElementById('expBoxSynopsis').style.top="0";
		document.getElementById('expBoxMain').style.top="110px";

	} else {

		document.getElementById('expBoxSynopsis').style.top="110px";
		document.getElementById('expBoxMain').style.top="0";

	}

	document.getElementById('pict').src = "_imgs/_picts/2010/"+n+".jpg";

	box = document.getElementById('expBox');
	box.style.top = currTop+"px";
	box.style.left = currLeft+"px";

}
