// JavaScript Document

function menuTable(element, mystyle, row_menu_clicked) {

	if (element.id != row_menu_clicked) {	
		if (element.style) {
			element.style.borderTopStyle = mystyle;
			element.style.borderBottomStyle = mystyle;
		}
	}
}

//function menuTable(element, mystyle) {
//
//		if (element.style) {
//			element.style.borderTopStyle = mystyle;
//			element.style.borderBottomStyle = mystyle;
//		}
//}

function togleShowSubmenu(ShownRowId, ShowId, count) {
var i;

	document.getElementById(ShownRowId).style.borderTopStyle = 'solid';
	document.getElementById(ShownRowId).style.borderBottomStyle = 'solid';

	for (i=1; i<=count; i++) {
		document.getElementById(ShowId + i).style.display = 'block';	
	}
}



function togleShowSubmenu(ShownRowId, row_menu_clicked, set_clicked, hide_submenu, how_many_items) {
	
	if (row_menu_clicked == set_clicked) {
			for (i=1; i<=how_many_items; i++) {
				document.getElementById(hide_submenu + i).style.display = 'none';	
			}
			document.getElementById(ShownRowId).style.borderTopStyle = 'none';
			document.getElementById(ShownRowId).style.borderBottomStyle = 'none';				
			row_menu_clicked = 'nic';
	}
	else {
			for (i=1; i<=how_many_items; i++) {
				document.getElementById(hide_submenu + i).style.display = 'block';	
			}
			document.getElementById(ShownRowId).style.borderTopStyle = 'solid';
			document.getElementById(ShownRowId).style.borderBottomStyle = 'solid';				
			row_menu_clicked = set_clicked;
	}
return row_menu_clicked;	
}

function Display(elementID, maxID) {

var id;
var i;

     for (i=1; i<=maxID; i++) {
          if (i != elementID) {
               id = "Text" + i;
               if (document.all.item(id)) {
               		document.all.item(id).style.display = "none"; 
               }
          }
     }
       
    id = "Text" + elementID;
    document.all.item(id).style.display = "block";
}
























function chLinkColorUp()
{
    //if (window.event.srcElement.tagName == "A") 
    //if (window.event.srcElement.ID == "menulink1")
        //window.event.srcElement.style.color = "rgb(83,169,255)";
     //document.getElementById("menulink1").style.color = "rgb(83,169,255)";
     
     //if (window.event.srcElement.id == "menulink1")
     if (window.event.srcElement.id != "pneu008" && window.event.srcElement.id != "pneu009")     
          document.getElementById(window.event.srcElement.id).style.color = "rgb(255,255,102)";
          
          document.getElementById(window.event.srcElement.id).style.cursor = "hand";
      //    document.getElementById(window.event.srcElement.id).style.font = "";

}

function chLinkColorDown()
{
    // if (window.event.srcElement.id == "menulink1")
    if (window.event.srcElement.id != "pneu008" && window.event.srcElement.id != "pneu009")       
          document.getElementById(window.event.srcElement.id).style.color = "rgb(83,169,255)";

}






function b_Up(element)
{
	if (element.style) {
		element.style.backgroundColor='#004682';
		element.style.color='rgb(210,233,255)';
		element.style.cursor='hand';		
	}

}

function b_Down(element)
{
	if (element.style) {
		element.style.backgroundColor='rgb(210,233,255)';
		element.style.color='#004682';
		element.style.cursor='hand';		
	}
}



function Undisplay(elementID)
{
var id;
    
    id = "Msg" + elementID;
    document.all.item(id).style.display = "none";

}

function DisableOtherThan(element) {
	if (element.name != 'sirka') {document.sel_form.sirka.disabled = true;}
	if (element.name != 'prof') {document.sel_form.prof.disabled = true;}
	if (element.name != 'rafik') {document.sel_form.rafik.disabled = true;}
	if (element.name != 'znacka') {document.sel_form.znacka.disabled = true;}
}
