$(document).ready(init);
function init()
{
$('table.tbl_hl >> tr:odd, table.tbl_hl > tr:odd').addClass('RowEven');

$('table.anytext >> tr:odd, table.anytext > tr:odd').addClass('RowEven');

$('table.anytext >> tr, table.anytext > tr')
 .hover(
        function() { this.className = "RowHot"; return false }
	    , function() { if (this.ID%2 == 0) { this.className = "RowEven"; } else { this.className = ""; } return false }
       )
;

$('table.anytext >> tr, table.anytext > tr')
 .hover(
        function() { this.className = "RowHot"; return false }
	    , function() { if (this.ID%2 == 0) { this.className = "RowEven"; } else { this.className = ""; } return false }
       )
;
$('tabs-disabled').click(function () { 
      false; 
    });
/*
if(p_page_title!=''){
$('title').attr("text", "phyiuo");
}
*/
//---------------------------------------
// для дерева
//---------------------------------------
        
    // first example
    $("#navigation").treeview({
        collapsed: false,
        unique: false,
        persist: "location"
    });

    
    // second example
    $("#browser").treeview({
        animated:"normal",
        persist: "cookie"
    });

    $("#samplebutton").click(function(){
        var branches = $("<li><span class='folder'>New Sublist</span><ul>" + 
            "<li><span class='file'>Item1</span></li>" + 
            "<li><span class='file'>Item2</span></li></ul></li>").appendTo("#browser");
        $("#browser").treeview({
            add: branches
        });
    });


    // third example
    $("#red").treeview({
        animated: "fast",
        collapsed: true,
        control: "#treecontrol"
    });

//---------------------------------------

}



function TrHotRuler() {

/*$("title").attr("text", 'phyiuo');*/


/*
$('table.tbl_hl >> tr:odd, table.tbl_hl > tr:odd')
 .addClass('RowEven')
;

$('table.anytext >> tr:odd, table.anytext > tr:odd').addClass('RowEven');
*/

/*$('table.tbl_hl >> tr:odd').addClass('RowEven');*/
/*$("tr:nth-child(odd)").addClass("RowEven");*/
/*$("table[@class='tbl_hl'] > tr:odd").addClass("RowEven");*/
/*jQuery('table.tbl_hl tr:odd').addClass('RowEven');*/

/*
if (document.getElementById) { 
tables = document.getElementsByTagName("table")

for (i=0;i<tables.length;i++) 
{
if ((tables[i].className == "anytext") || (tables[i].className == "tbl_hl")) { 
 trs = tables[i].getElementsByTagName("tr")
 for (j=0;j<trs.length;j++) {
  if ( (trs[j].className != "header") && ((trs[j].parentNode.className == "anytext") || (trs[j].parentNode.parentNode.className == "tbl_hl"))) {
   trs[j].ID = j;
   if (trs[j].ID%2 == 0) { trs[j].className = "RowEven"; } else { trs[j].className = ""; }
  if (tables[i].className == "anytext") { 
   trs[j].onmouseover = function() { this.className = "RowHot"; return false }
   trs[j].onmouseout = function() { if (this.ID%2 == 0) { this.className = "RowEven"; } else { this.className = ""; } return false }
  }
} } } 
} 

}
*/
} 


/*window.onload = TrHotRuler;*/