

CurrentScreen = 0;

var Screens = new Array();

Screens[0] = new Image();

Screens[1] = new Image();

Screens[2] = new Image();

Screens[3] = new Image();


Screens[0].src = '/img/index/screens/0.jpg';

Screens[1].src = '/img/index/screens/1.jpg';

Screens[2].src = '/img/index/screens/2.jpg';

Screens[3].src = '/img/index/screens/3.jpg';



CurrentAction = 1;

var Actions = new Array();
Actions[0] = new Image();
Actions[1] = new Image();
Actions[2] = new Image();
Actions[3] = new Image();
Actions[4] = new Image();



Actions[0].src = '/img/actions/heresy1.jpg';
Actions[1].src = '/img/actions/dark-soul.jpg';
Actions[2].src = '/img/actions/3v.jpg';
Actions[3].src = '/img/actions/hunter2.jpg';
Actions[4].src = '/img/actions/l5.jpg';

var ActionsURL = new Array();

ActionsURL[0] = 'heresy.php';
ActionsURL[1] = 'dark-soul.php';
ActionsURL[2] = 'http://forum.darkswords.ru/showthread.php/34146-%D0%9A%D0%BE%D1%80%D0%BE%D0%BB%D0%B5%D0%B2%D0%B0-%D0%9B%D0%B5%D1%82%D0%B0';
ActionsURL[3] = 'hunter.php';
ActionsURL[4] = 'leagueoffive.php';


var actionHtml='<center>';

function generateActions(){


var i=0;

while(ActionsURL[i]) {
	if(i!=0) actionHtml+="<img src='pic/1.gif' width='25' height='1'>";
//	if(i==2) actionHtml+="&nbsp;";
	actionHtml+="<a href='"+ActionsURL[i]+"'><img id='action"+i+"' src='"+Actions[i].src+"' border=0 width=96 height=64></a>";
//	if(i==2) actionHtml+="&nbsp;";
	i++;
}

actionHtml+='</center>';

//alert(actionHtml);

document.getElementById('divActions').innerHTML=actionHtml;
document.getElementById('divActions').style.visibility='visible';

//alert(document.getElementById('divActions').innerHTML);
}

function screenRotate()
{
    if (CurrentScreen == 4) CurrentScreen = 0;

    document.getElementById('screen').src = Screens[CurrentScreen].src;

    CurrentScreen++;
}

function actionRotate()


{
//.........  if (CurrentAction == maxActions ) 




    if (CurrentAction == 5) CurrentAction = 0;

    document.getElementById('action').src = Actions[CurrentAction].src;

    CurrentAction++;
}

function actionClick()
{
    //open(ActionsURL[CurrentAction-1], '');

	location=ActionsURL[CurrentAction-1];
    return false;
}