var _totalSites       = 25;
var _totalGraphDesign = 15;
var _totalAnimation   = 09;
var _totalInterface   = 10;
var _totalOther       = 40;

var CategoryCur;
var WorkCur;

var GraphMass = new Array (_totalGraphDesign)
GraphMass[15] = "../photorealty/photorealty.htm"
GraphMass[14] = "../automugia/automugia.htm"
GraphMass[13] = "../cover_irr/cover_irr.htm"
GraphMass[12] = "../job_new_forms/job_new_forms.htm"
GraphMass[11] = "../avtogid/avtogid.htm"
GraphMass[10] = "../comauto/comauto.htm"
GraphMass[09] = "../job_is/job_is.htm"
GraphMass[08] = "../try_new_job/try_new_job.htm"
GraphMass[07] = "../irr_new_year/irr_new_year.htm"
GraphMass[06] = "../serttest/serttest.htm"
GraphMass[05] = "../html/html.htm"
GraphMass[04] = "../automania/automania.htm"
GraphMass[03] = "../domania/domania.htm"
GraphMass[02] = "../irr/irr.htm"
GraphMass[01] = "../usabilitylab/usabilitylab.htm"

var SiteMass = new Array (_totalSites)
SiteMass[25] = "../astrapage/astrapage.htm"
SiteMass[24] = "../automania3/automania3.htm"
SiteMass[23] = "../domania2/domania2.htm"
SiteMass[22] = "../comauto2/comauto2.htm"
SiteMass[21] = "../children/children.htm"
SiteMass[20] = "../formula_taxi/formula_taxi.htm"
SiteMass[19] = "../domania/domania.htm"
SiteMass[18] = "../automania/automania.htm"
SiteMass[17] = "../comauto/comauto.htm"
SiteMass[16] = "../wedding_dm/wedding_dm.htm"
SiteMass[15] = "../i2i/i2i.htm"
SiteMass[14] = "../pronto_office/pronto_office.htm"
SiteMass[13] = "../torgmash/torgmash.htm"
SiteMass[12] = "../usabilitylab/usabilitylab.htm"
SiteMass[11] = "../poliset/poliset.htm"
SiteMass[10] = "../dk_project/dk_project.htm"
SiteMass[09] = "../mediamild/mediamild.htm"
SiteMass[08] = "../frunat/frunat.htm"
SiteMass[07] = "../vinalkotorg/vinalkotorg.htm"
SiteMass[06] = "../nextsite2/nextsite2.htm"
SiteMass[05] = "../vostok/vostok.htm"
SiteMass[04] = "../viamed/viamed.htm"
SiteMass[03] = "../mpsi/mpsi.htm"
SiteMass[02] = "../fotolider/fotolider.htm"
SiteMass[01] = "../examen/examen.htm"

var AnimMass = new Array (_totalAnimation)
AnimMass[09] = "../irr_truck/irr_truck.htm"
AnimMass[08] = "../fomula_taxi/formula_taxi.htm"
AnimMass[07] = "../wedding/wedding.htm"
AnimMass[06] = "../ecopark_butterfly/ecopark_butterfly.htm"
AnimMass[05] = "../artstand/artstand.htm"
AnimMass[04] = "../fotolider_flash/fotolider_flash.htm"
AnimMass[03] = "../artshowcenter/artshowcenter.htm"
AnimMass[02] = "../animap/animap.htm"
AnimMass[01] = "../nextsite_button/nextsite_button.htm"

var InterMass = new Array (_totalInterface)
InterMass[10] = "../domania_2/domania_2.htm"
InterMass[09] = "../irr_2/irr_2.htm"
InterMass[08] = "../show_ad/show_ad.htm"
InterMass[07] = "../irr_seo_link/irr_seo_link.htm"
InterMass[06] = "../irr_metro/irr_metro.htm"
InterMass[05] = "../background_check/background_check.htm"
InterMass[04] = "../rudate_cosmopolitan/rudate_cosmopolitan.htm"
InterMass[03] = "../flowers_delivery/flowers_delivery.htm"
InterMass[02] = "../scanna_gallery/scanna_gallery.htm"
InterMass[01] = "../anastasiaweb_survey/anastasiaweb_survey.htm"

var OtherMass = new Array (_totalOther)
OtherMass[40] = "../automania_04/automania_04.htm"
OtherMass[39] = "../job_newforms/job_newforms.htm"
OtherMass[38] = "../automania_03/automania_03.htm"
OtherMass[37] = "../ipoteka2/ipoteka2.htm"
OtherMass[36] = "../try_new_job/try_new_job.htm"
OtherMass[35] = "../comauto/comauto.htm"
OtherMass[34] = "../beuniq/beuniq.htm"
OtherMass[33] = "../ipoteka/ipoteka.htm"
OtherMass[32] = "../new_address_x3/new_address_x3.htm"
OtherMass[31] = "../new_address_x2/new_address_x2.htm"
OtherMass[30] = "../game_01/game_01.htm"
OtherMass[29] = "../automania_wallpaper/automania_wallpaper.htm"
OtherMass[28] = "../test_drive/test_drive.htm"
OtherMass[27] = "../irr_pushup/irr_pushup.htm"
OtherMass[26] = "../jobru_pushup/jobru_pushup.htm"
OtherMass[25] = "../jobru_2/jobru_2.htm"
OtherMass[24] = "../irr_avto_2/irr_avto_2.htm"
OtherMass[23] = "../new_address/new_address.htm"
OtherMass[22] = "../aw_tours/aw_tours.htm"
OtherMass[21] = "../viskarta/vizkarta.htm"
OtherMass[20] = "../anastasiaweb_video/anastasiaweb_video.htm"
OtherMass[19] = "../maket_1/maket_1.htm"
OtherMass[18] = "../loveplanet/loveplanet.htm"
OtherMass[17] = "../domiki/domiki.htm"
OtherMass[16] = "../maxisport/maxisport.htm"
OtherMass[15] = "../noname_01/noname_01.htm"
OtherMass[14] = "../evacuation24/evacuation24.htm"
OtherMass[13] = "../ecar/ecar.htm"
OtherMass[12] = "../automania_messages/automania_messages.htm"
OtherMass[11] = "../irr/irr.htm"
OtherMass[10] = "../rudate/rudate.htm"
OtherMass[09] = "../rudate2/rudate2.htm"
OtherMass[08] = "../anastasia_web/anastasia_web.htm"
OtherMass[07] = "../scanna/scanna.htm"
OtherMass[06] = "../toppersonal/toppersonal.htm"
OtherMass[05] = "../hfree/hfree.htm"
OtherMass[04] = "../4aff/4aff.htm"
OtherMass[03] = "../mazda/mazda.htm"
OtherMass[02] = "../usabilitylab_logo/usabilitylab_logo.htm"
OtherMass[01] = "../long_ago/long_ago.htm"

document.onkeydown = NavigateThrough;

function update_Counters()
{
	total_sites.innerHTML = _totalSites;
	total_graphdesign.innerHTML = _totalGraphDesign;
	total_animation.innerHTML = _totalAnimation;
	total_interface.innerHTML = _totalInterface;
	total_other.innerHTML = _totalOther;
}

function update_totalSites()
{
	total_sites.innerHTML = _totalSites;
}

function update_totalGraphDesign()
{
	total_graphdesign.innerHTML = _totalGraphDesign;
}

function update_totalAnimation()
{
	total_animation.innerHTML = _totalAnimation;
}

function update_totalInterface()
{
	total_interface.innerHTML = _totalInterface;
}

function update_totalOther()
{
	total_other.innerHTML = _totalOther;
}

function NavigateThrough(e)
{
	if (!e) e = window.event;
	var k = e.keyCode;
	
	if (e.ctrlKey)
	{	
		if (CategoryCur == "GrafDis")
		{
			if (k == 39)
			{
			   WorkCur--;
			   if (WorkCur<1) {WorkCur=_totalGraphDesign}
			   document.location = GraphMass[WorkCur];
			}
			if (k == 37)
			{	
				WorkCur++;
				if (WorkCur>_totalGraphDesign) {document.location="../../graphdesign.htm"}
				else {document.location = GraphMass[WorkCur];}
			}
			
		}
		
		if (CategoryCur == "Sites")
		{
			if (k == 39)
			{
			   WorkCur--;
			   if (WorkCur<1) {WorkCur=_totalSites}
			   document.location = SiteMass[WorkCur];
			}
			if (k == 37)
			{	
				WorkCur++;
				if (WorkCur>_totalSites) {document.location="../../sites.htm"}
				else {document.location = SiteMass[WorkCur];}
			}	
		}
		
		if (CategoryCur == "Animation")
		{
			if (k == 39)
			{
			   WorkCur--;
			   if (WorkCur<1) {WorkCur=_totalAnimation}
			   document.location = AnimMass[WorkCur];
			}
			if (k == 37)
			{	
				WorkCur++;
				if (WorkCur>_totalAnimation) {document.location="../../animation.htm"}
				else {document.location = AnimMass[WorkCur];}
			}	
		}
		
		if (CategoryCur == "Interface")
		{
			if (k == 39)
			{
			   WorkCur--;
			   if (WorkCur<1) {WorkCur=_totalInterface}
			   document.location = InterMass[WorkCur];
			}
			if (k == 37)
			{	
				WorkCur++;
				if (WorkCur>_totalInterface) {document.location="../../interface.htm"}
				else {document.location = InterMass[WorkCur];}
			}	
		}		
		
		if (CategoryCur == "Other")
		{
			if (k == 39)
			{
			   WorkCur--;
			   if (WorkCur<1) {WorkCur=_totalOther}
			   document.location = OtherMass[WorkCur];
			}
			if (k == 37)
			{	
				WorkCur++;
				if (WorkCur>_totalOther) {document.location="../../other.htm"}
				else {document.location = OtherMass[WorkCur];}
			}	
		}		
	}
}

function NavigateForward()
{
	link = document.getElementById ('NextLink');
	if (link && link.href) document.location = link.href;	
}
