/*
// 2005-03-05
// Copyright (c) Art. Lebedev | http://www.artlebedev.ru/
// Author - Vladimir Tokmakov
*/

*
{
font-size: 100%;
}

body
{
margin: 0; padding: 0;
font-size: 80%;
background-color: white; color: black;
height: 100%;
}

a:hover
{
color: gray;
}

@media screen, handheld {
	body
	{
	font-family: Arial, sans-serif;
	}
}

/* common html elements */

h1, h2, h3, h4, h5, h6
{
margin: 2em 0 1em 0; padding: 0;
font-weight: normal;
}
h1         { font-size: 1.4em; }
h2, h3     { font-size: 1.2em; }
h4, h5     { font-size: 1.1em; }
h2, h4, h6 { font-weight: bold; }

p, ul, ol, dl, address
{
margin: 0em 0 1em 0; padding: 0;
}
ul, ol
{
padding-left: 2em;
}
li
{
margin: 0.5em 0; padding: 0;
}
ul li
{
list-style-type: none;
padding-left: 20px;
background: url("li.gif") no-repeat 0 0.6em;
}
ul.navigation li
{
padding-left: 0;
background-image: none;
}
ol li
{
margin-left: 20px;
}
dl
{
margin-top: 0;
}
dt
{
margin: 1em 0 0.5em 0; padding: 0;
}
dd
{
margin: 0 0 1em 2em;
}
blockquote
{
margin: 0 0 0 3em; padding: 0;
}
img
{
margin: 0; padding: 0;
border-width: 0;
}

/* tables */

table, td, th
{
//border-collapse: collapse; border-spacing: 0; border: 0 hidden black;
}
table
{
border-top-width:  1px; border-top-style:  solid;
border-left-width: 1px; border-left-style: solid;
margin: 0 0 1em 0;
}
td, th
{
padding: 0.5em 1em;
border-right-width:  1px; border-right-style:  solid;
border-bottom-width: 1px; border-bottom-style: solid;
}

/* layout tables */

table.layout, td.layout, th.layout
{
margin: 0; padding: 0;
text-align: left; vertical-align: top;
border-width: 0; border-style: hidden;
font-weight: normal;
}

/* main layout */

div#layout, div#content { position: relative; }

#layout
{
margin: 0; padding: 0;
width: 100%;
width: expression(
	(
		document.getElementById('measurer')
		/* min-width in em * 0.8 */
		&& document.getElementById('measurer').clientWidth < document.getElementById('measurer').clientHeight * 40
	)
	?	document.getElementById('measurer').clientHeight * 40 + 'px'
	:	(
			document.getElementById('measurer')
			/* max-width in em * 0.8 */
			&& document.getElementById('measurer').clientWidth < document.getElementById('measurer').clientHeight * 80
		)
		?	'100%'
		:	( document.getElementById('measurer') )
			?	document.getElementById('measurer').clientHeight * 80 + 'px'
			:	'auto'
);
min-width: 50em; max-width: 100em;
min-height: 100%;
height: 100%;
}
div#layout
{
height: auto;
//height: 100%;
}
#measurer
{
position: absolute;
left: 0;
bottom: 0;
visibility: hidden; 
width: 100%; height: 1em;
line-height: 1em;
background: white;
background-image: expression( window.onresize = window.scrollTo );
}

@media print, handheld {
	#layout
	{
	width: auto ! important; height: auto ! important;
	min-width: 0 ! important;
	}
}

@media handheld {
	table.layout,
	table.layout td.layout,
	table.layout th.layout
	{
	display: block;
	width: auto;
	}
}

/* common classes */

.nowrap, .phone { white-space: nowrap; }
.for_media_print { display: none; }
@media print {
	.not_for_media_print { display: none; }
}
.small { font-size: 0.89em; }
.clear { clear: both; }

