function tableruler()
{
    if (document.getElementById && document.createTextNode)
    {
        var tables=document.getElementsByTagName('table');
        for (var i=0;i<tables.length;i++)
        {
            if(tables[i].className=='table')
            {
                var trs=tables[i].getElementsByTagName('tr');
                for(var j=0;j<trs.length;j++)
                {
                    if(trs[j].parentNode.nodeName=='TBODY')
                    {
                        trs[j].onmouseover=function(){this.className='ruled';return false}
                        trs[j].onmouseout=function(){this.className='';return false}
                    }
                }
            }
        }
    }
}
window.onload=function(){tableruler();}
jQuery(document).ready(function(){
	
	$(".seblock p").hide();

	$(".seblock em").click(function(){
		$(this).next("p").slideToggle("slow")
		.siblings("p:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("em").removeClass("active");
	});
	
	if($('.hover').length || $('.lhover').length) {
	    $('.hover').lightbox();
	    $('.lhover').lightbox();
   	}
   	$('.block_img').hover(
      function () {  
        if ($('#p'+this.id).is(":hidden")) {
        $('#p'+this.id).show();
        } else {
        $('#p'+this.id).hide();
        }        
      }, 
      function () {      	 
        $('#p'+this.id).hide();
      }
    );

	$('a.link_order, .close').click(function(){
		
		$('div#form_order').slideToggle();
		return false;
	});

});

function heightContent() {
	var height=0; var width=0;
	if (self.screen) {
		width = screen.width;
		height = screen.height;
	}
	else if (self.java) {
		var jkit = java.awt.Toolkit.getDefaultToolkit();
		var scrsize = jkit.getScreenSize();
		width = scrsize.width;
		height = scrsize.height;
	}

	if (width <= 1024 ) {
		document.getElementById("content").style.minHeight = 1250 + "px"; 
	}
}


