* {
	margin: 0;
	padding: 0;
}

img {
	border: 0;
}

abbr {
	border-bottom: 1px dotted;
}

dfn {
	font-style: italic;
}

abbr:hover, dfn:hover {
	color: #007700;
}

#maincontainer {
	min-width: 998px;
	background: url("http://www.kazandaemon.ru/img/logo.gif") 0px 15px no-repeat;
	margin: 0 13px;
}

#title {
	padding-top: 11px;
	padding-left: 263px;
}

#mainmenu, #mainmenu li,
#mainmenu li a, #mainmenu li a:link, #mainmenu li a:visited, #mainmenu li a:hover, #mainmenu li a:active {
	position: relative;
}

#mainmenu {
	list-style: none;
	padding-left: 299px;
	padding-top: 16px;
	height: 122px;
	-width: expression((document.body.parentNode.clientWidth<1024)?"699px":((document.body.parentNode.clientWidth-325)+"px"));
}

#mainmenu li {
	float: left;
	margin-right: 20px;
}

#mainmenu li a, #mainmenu li a:link, #mainmenu li a:visited, #mainmenu li a:hover, #mainmenu li a:active,
#mainmenu li a ins {
	height: 50px;
	display: block;
	background-image: url("http://www.kazandaemon.ru/img/menubg.png");
	background-repeat: no-repeat;
}


#mainmenu li a, #mainmenu li a:link, #mainmenu li a:visited, #mainmenu li a:hover, #mainmenu li a:active {
	line-height: 50px;
	font-family: Arial, sans-serif;
	font-size: 20px;
	color: black;
	text-decoration: none;
	background-position: -24px 50px;
	padding-right: 22px;
	padding-left: 22px;
	margin-bottom: 11px;
	float: left;
	outline: none;
}

#mainmenu li a ins {
	position: absolute;
	margin-left: 100%;
	left: -24px;
	top: 0;
	background-position: left top;
	width: 24px;
	-background-image: none;
	-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/img/menubg.png,sizingMethod=crop);	
	cursor: pointer;
	cursor: hand;
}

#mainmenu li a:hover, #mainmenu li a:focus {
	background-position: -24px 0px;
}

#mainmenu li a.selected, #mainmenu li a.selected:visited,
#mainmenu li a.selected:active, #mainmenu li a.selected:link, #mainmenu li a.selected:hover {
	background-position: -24px -50px;
	color: white;
}

#mainmenu li a.selected:hover, #mainmenu li a.selected:focus {
	color: green;
}

#mainmenu li a:active, #mainmenu li a.selected:active {
	color:red;
}

#topbar {
	margin-left: 273px;
	margin-bottom: 15px;
	-width: expression((document.body.parentNode.clientWidth<1024)?"725px":((document.body.parentNode.clientWidth-299)+"px"));
}

#bottombar {
	font-weight: bold;
	-width: expression((document.body.parentNode.clientWidth<1024)?"998px":((document.body.parentNode.clientWidth-26)+"px"));
}

#search, #searchbtn, #searchlabel {
	height: 27px;
} 

#search, #searchbtn {
	background-color: transparent;
	background-image: url("http://www.kazandaemon.ru/img/search.gif");
	background-repeat: no-repeat;
}

#search {
	position: absolute;
	top: 8px;
	left: -239px;
	width: 239px;
	margin-left: 100%;
	z-index: 2;
	background-position: left top;
}

#searchtext {
	border: none;
	width: 163px;
	font-family: Times, serif;
	font-size: 18px;
	background: none;
	margin-top: 4px;
	outline: none;
}

#searchlabel {
	width: 27px;
	display: block;
	float: left;
	cursor: text;
}

#searchbtn {
	vertical-align: top;
	width: 28px;
	border: none;
	font-size: 1px;
	line-height: 1px;
	background-position: left bottom;
	cursor: pointer;
	outline: none;
	cursor: hand;
}

#searchbtn:hover, #searchbtn:focus {
	background-position: -28px bottom;
}

#searchbtn:active {
	background-position: -56px bottom;
}

#rblock {
	float: right;
	width: 300px;
	margin-left: 10px;
}

#im {
	width: 300px;
	height: 390px;
	background: url("http://www.kazandaemon.ru/img/im.gif") left top no-repeat;
	margin-bottom: 5px;
}

#im .cont {
	width: 252px;
	margin-left: 21px;
}

#im .title {
	font-family: Times, serif;
	font-size: 26px;
	color: #6B3A00;
	text-align: center;
	font-weight: bold;
	margin-bottom: 5px;
	padding-top: 10px;
}

#im .text {
	font-family: Arial, sans-serif;
	font-size: 12px;
	text-align: justify;
	margin-bottom: 5px;
}

#im label, .contacts_form label {
	font-weight: bold;
	cursor: pointer;
	cursor: hand;
}

#im .itext, #im .iselect, #im textarea {
	width: 250px;
	border: 1px solid #444444;
}

#im textarea {
	height: 100px;
}

#im .isubmit, #im .ireset, .contacts_form .isubmit, .contacts_form .ireset {
	margin-top: 3px;
	border: 1px solid black;
	font-family: Times, serif;
	font-size: 16px;
	height: 25px;
	line-height: 20px;
	cursor: pointer;
	cursor: hand;
}

#im .isubmit, .contacts_form .isubmit {
	width: 100px;
}

#im .ireset, .contacts_form .ireset {
	width: 90px;
}

#im .isubmit:hover, #im .ireset:hover, .contacts_form .isubmit:hover, .contacts_form .ireset:hover {
	background: #94D1B7;
}

#contactswin {
	width: 300px;
	height: 131px;
	background: url("http://www.kazandaemon.ru/img/contacts.gif") left top no-repeat;
	margin-bottom: 5px;
}

#contactswin .cont {
	width: 264px;
	margin-left: 15px;
}

#contactswin .title {
	font-family: Times, serif;
	font-size: 26px;
	color: #4D6B27;
	text-align: center;
	font-weight: bold;
	margin-bottom: 5px;
	padding-top: 10px;
}

#contactswin .text {
	font-family: Arial, sans-serif;
	font-size: 13px;
	text-align: left;
	margin-bottom: 3px;
}

#contactswinemail, #contactswinemail:visited, 
#contactspageemail, #contactspageemail:visited {
	color: blue;
}

#contactswinemail:hover, #contactspageemail:hover {
	color: red;
}

#pagecontainer {
	padding-left: 10px;
	padding-right: 10px;
}

#pagecontainer p {
	margin-top: 0.5em;
	margin-bottom: 1em;
	text-align: justify;
}

h2 {
	margin-top: 0.5em;
}

.clear {
	clear: both;
}

.bar, .bar div.borderleft, .bar div.borderright, .bar div.bartext {
	height: 51px;
}

.bar, .bar div.borderleft, .bar div.borderright {
	background-image: url("http://www.kazandaemon.ru/img/barbg.gif");
}

.bar {
	position: relative;
	background-position: left top;
	background-repeat: repeat-x;
}

.bar div.borderleft, .bar div.borderright {
	background-repeat: no-repeat;	
}

.bar div.borderleft {
	background-position: right -51px;
	width: 27px;
}

.bar div.borderright, .bar div.bartext {
	position: absolute;
	top: 0;
}

.bar div.borderright {
	background-position: left -51px;
	width: 28px;
	margin-left: 100%;
	left: -28px;
	z-index: 1;
}

.bar div.bartext {
	left: 0;
	z-index: 2;
	padding-left: 24px;
	line-height: 42px;
	font-family: Arial, sans-serif;
	font-size: 18px;
}

a.why, a.why:visited, a.why:hover, a.why:active,
a.faq, a.faq:visited, a.faq:hover, a.faq:active,
ul.services a, ul.services a:visited, ul.services a:hover, ul.services a:active,
a.library, a.library:visited, a.library:hover, a.library:active {
	color: #555555;
	text-decoration: none;
	border-bottom: 1px dashed #555555;
}

a.why, a.why:visited, a.why:hover, a.why:active,
a.faq, a.faq:visited, a.faq:hover, a.faq:active,
a.library, a.library:visited, a.library:hover, a.library:active {
	font-size: small;
	outline: none;
}

a.why:visited, a.library:visited {
	color: #AAAAAA;
	border-bottom: 1px dashed #AAAAAA;
}

a.why:hover, a.library:hover, a.faq:hover, ul.services a:hover,
a.why:focus, a.library:focus, a.faq:focus, ul.services a:focus {
	color: #007700;
	border-bottom: 1px dashed #007700;
}

a.why:active, a.library:active, a.faq:active, ul.services a:active {
	border-bottom: 1px solid #FF0000;
}

ul.why, ul.services, ul.library, ul.faq {
	padding-left: 15px;
}

ul.why a, ul.why a:hover, ul.why a:visited, ul.why a:active,
ul.faq a, ul.faq a:hover, ul.faq a:visited, ul.faq a:active,
ul.library a, ul.library a:hover, ul.library a:visited, ul.library a:active {
	font-size: medium;
}

.contacts_form {
	margin-bottom: 15px;
	width: 402px;
	border: 1px dashed #808080;
	padding: 10px;
}

.contacts_form .field {
	margin-top: 7px;
}

.contacts_form .itext, .contacts_form .iselect, .contacts_form textarea {
	width: 400px;
	border: 1px solid #444444;
}

.contacts_form textarea {
	height: 200px;
}

.contacts_error {
	color: #BA2601;
}

.contacts_success {
	color: #006F00;
}

.portfolio {
	margin-top: 20px;
	margin-right: 300px;
}

.portfolio a, .portfolio a:link, .portfolio a:visited, .portfolio a:hover, .portfolio a:active {
	position: relative;
	display: block;
	text-decoration: none;
	float: left;
	margin: 0 10px 10px 0;
	padding: 5px;
	width: 400px;
	height: 78px;
	outline: none;
	color: black;
}

.portfolio a, .portfolio a:link {
	border: 1px dashed #808080;
}

.portfolio a:visited {
	border: 1px dashed #AAAAAA;
}

.portfolio a:hover, .portfolio a:focus {
	background: #FFE2B1;
}

.portfolio a:active {
	background: #FFE2B1;
	border: 1px solid red;
}

.portfolio a img {
	position: relative;
	float: left;
	margin-right: 10px;
}

.portfolio a span {
	display: block;
	color: black;
	margin-top: 3px;
}	

.portfolio a span.title {
	font-weight: bold;
}

div.portfolioresult {
	margin-bottom: 1em;
}

dl.faq {
	margin-bottom: 1em;
}

dl.faq dt {
	font-weight: bold;
	margin-top: 5px;
}

div.libsample {
	padding: 5px 10px 10px 5px;
	float: left;	
	border: 1px inset;
	background: #FBFBFB;
}

div.libsamplecaption {
	font-weight: bold;
	font-size: 12px;
}

div.libsample code {
	font-size: 12px;
}
div.libsample div.libsamplesub {
	float: left; 
	border: 1px dashed black; 
	padding: 5px;
	margin: 5px 0 0 5px;
}

div.libsample div.libsamplesub:hover {
	border: 1px dashed red; 
	background: #FFF6F6;
}

a.onow, a.onow:link, a.onow:visited, a.onow:hover, a.onow:active {
	text-decoration: none;
	font-weight: bold;
	font-size: larger;
	color: green;
	outline: none;
}

a.onow:hover, a.onow:focus {
	color: red;
}

a.domonow, a.domonow:link, a.domonow:visited, a.domonow:hover, a.domonow:active {
	text-decoration: underline;
	font-weight: bold;
	font-size: larger;
	color: red;
	outline: none;
}

a.domonow:hover, a.domonow:focus {
	text-decoration: underline;
	color: #A40000;
}

div.libsense {
	margin: 1em 0;
}