// JavaScript Document
//version detection
var Browser = {
  Version: function() {
    var version = 999; // we assume a sane browser
    if (navigator.appVersion.indexOf("MSIE") != -1)
      // bah, IE again, lets downgrade version number
      version = parseFloat(navigator.appVersion.split("MSIE")[1]);
    return version;
  }
}

function res()
{
	var adiv = document.getElementById('content');
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		
		//alert(adiv.offsetHeight + '---------------' + Math.floor(adiv.offsetHeight/5));
		adiv.style.pixelHeight = (((Math.floor(adiv.offsetHeight/5))*5 + 3) > 400)?((Math.floor(adiv.offsetHeight/5)+1)*5 + 3):(400);
		//alert(adiv.offsetHeight);
	}
	else
	{
		//alert(adiv.offsetHeight + '---------------' + Math.floor(adiv.offsetHeight/5));
		adiv.style.height = ((((Math.floor(adiv.offsetHeight/5))*5 + 3) > 400)?((Math.floor(adiv.offsetHeight/5)+1)*5 + 3):(400)) + "px";
		//alert(adiv.offsetHeight);
	}
}
function res_table()
{
	var adiv = document.getElementById('contable');
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		
		//alert(adiv.offsetHeight + '---------------' + Math.floor(adiv.offsetHeight/5));
		adiv.style.pixelHeight = (adiv.offsetHeight > 400)?(adiv.offsetHeight):(400);
		//alert(adiv.offsetHeight);
	}
	else
	{
		//alert(adiv.offsetHeight + '---------------' + Math.floor(adiv.offsetHeight/5));
		adiv.style.height = ((adiv.offsetHeight > 400)?(adiv.offsetHeight):(400)) + "px";
		//alert(adiv.offsetHeight);
	}
}
//FORRES!!!
var count = 0;

function getright_old()
{
	count++;
	var tb = document.getElementById('contable');
	var dv = document.getElementById('content');
	//alert(tb.offsetHeight + 'tb-----' + dv.offsetHeight + 'dv');
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		if ((tb.offsetHeight) > dv.offsetHeight)
		{
			dv.style.pixelHeight = tb.offsetHeight + 10;
			res();
		}
	}
	else
	{
		if ((tb.offsetHeight) > dv.offsetHeight)
		{
			dv.style.height = tb.offsetHeight + 10 + "px";
			res();
		}
	}
	if (count < 20) window.setTimeout("getright()",500*count);
}
