// hp scripts

hp = new rollOver( "/img", "hp", 1,7 );
hp.preloadImages();
hp.preloadImages("ovr");

hp1 = new rollOver ( "/img", "hp_1_menu", 0,4 );
hp1.preloadImages();

hp2 = new rollOver ( "/img", "hp_2_menu", 0,4 );
hp2.preloadImages();
hp2.preloadImages("hp3");	// menu 3 on menu 2 pos

hp4 = new rollOver ( "/img", "hp_4_menu", 0,4);
hp4.preloadImages();
hp4.preloadImages("hp5");	// menu 5 on menu 4 pos

hp6 = new rollOver ( "/img", "hp_6_menu", 0,2 );
hp6.preloadImages();

hp7 = new rollOver ( "/img", "hp_7_menu", 0,2 );
hp7.preloadImages();

function menu (item,num,ext)	{
	menuClearActive();
	var nameOver = (null != ext)?",'"+ext+"'":"";
	switch (ext)	{
		case "hp3":
			menuActive = 3;
			break;
		case "hp5":
			menuActive = 5;
			break;
		default:
			menuActive = item;
		break;
	}
	for (i=1; i<=num; i++) {
		eval ( 'hp' +item+ '.roll( ' +i+nameOver+ ')' );
	}
}

function menuClear (item,num,ext)	{
	var nameOver = (null != ext)?ext:'';
	for (i=1; i<=num; i++) {
		eval ( 'hp' +item+ '.roll( 0,"' +nameOver+ '",' +i+ ')' );
	}
	menuActive = 0;
}

function menuClearActive()	{
	switch (menuActive)	{
		case 1:
			menuClear( 1,4 );			break;
		case 2:
			menuClear( 2,4 );			break;
		case 3:
			menuClear( 2,4,'hp3' );		break;
		case 4:
			menuClear( 4,4 );			break;
		case 5:
			menuClear( 4,4,'hp5' );		break;
		case 6:
			menuClear( 6,2 );			break;
		case 7:
			menuClear( 7,2 );			break;
	}
}

function menuClick (sect,item)	{
	if ( (sect == 2 && menuActive == 3) || (sect == 4 && menuActive == 5) )	{
		// merged section
	}	else if ( sect != menuActive )	{
		return false;
	}

	switch (menuActive)	{
		case 1:
			switch(item) {
				case 1:
					location.href='/cgi/f.cgi?s=onas_profil';
					break;
				case 2:
					location.href='/cgi/f.cgi?s=onas_historie';
					break;
				case 3:
					location.href='/cgi/f.cgi?s=onas_lide';
					break;
				case 4:
					location.href='/cgi/f.cgi?s=onas_obchodnipartneri';
					break;
			}
			break;
		case 2:
			switch(item) {
				case 1:
					location.href='/cgi/f.cgi?s=nasesluzby_siteservery';
					break;
				case 2:
					location.href='/cgi/f.cgi?s=nasesluzby_systemovymanagement';
					break;
				case 3:
					location.href='/cgi/f.cgi?s=nasesluzby_systemovymanagement';
					break;
				case 4:
					location.href='/cgi/f.cgi?s=nasesluzby_servis';
					break;
			}
			break;
		case 3:
			switch(item) {
				case 1:
					location.href='/cgi/f.cgi?s=reference_systemovymanagement';
					break;
				case 2:
					location.href='/cgi/f.cgi?s=reference_systemovymanagement';
					break;
				case 3:
					location.href='/cgi/f.cgi?s=reference_siteservery';
					break;
				case 4:
					location.href='/cgi/f.cgi?s=reference_siteservery';
					break;
			}
			break;
		case 4:
			switch(item) {
				case 1:
					location.href='/cgi/f.cgi?s=kariera_hledame';
					break;
				case 2:
					location.href='/cgi/f.cgi?s=kariera_hledame';
					break;
				case 3:
					location.href='/cgi/f.cgi?s=kariera_pozice';
					break;
				case 4:
					location.href='/cgi/f.cgi?s=kariera_pozice';
					break;
			}
			break;
		case 5:
			switch(item) {
				case 1:
					location.href='/cgi/f.cgi?s=zakaznickasekce_helpdesk';
					break;
				case 2:
					location.href='/cgi/f.cgi?s=zakaznickasekce_infotivolihpov';
					break;
				case 3:
					location.href='/cgi/f.cgi?s=zakaznickasekce_infotivolihpov';
					break;
				case 4:
					location.href='/cgi/f.cgi?s=zakaznickasekce_infositepc';
					break;
			}
			break;			
		case 6:
			switch(item) {
				case 1:
					location.href='/cgi/f.cgi?s=kontakt_adresy';
					break;
				case 2:
					location.href='/cgi/f.cgi?s=kontakt_kdenasnajdete';
					break;
			}
			break;
		case 7:
			switch(item) {
				case 1:
					location.href='/cgi/f.cgi?s=aktuality_nova';
					break;
				case 2:
					location.href='/cgi/f.cgi?s=aktuality_obsah';
					break;
			}
			break;
		default:
			//alert (menuActive+"-"+item);
			break;
	}	
}

menuActive = 0;

