var agt = navigator.userAgent.toLowerCase ();
var is_major = parseInt (navigator.appVersion);
var is_minor = parseFloat (navigator.appVersion);

var is_nav  = ((agt.indexOf ('mozilla') != -1) && (agt.indexOf ('spoofer') == -1) && (agt.indexOf ('compatible') == -1) && (agt.indexOf ('opera') == -1) && (agt.indexOf ('webtv') == -1) && (agt.indexOf ('hotjava') == -1) && (agt.indexOf ('safari') == -1));
var is_nav6 = (is_nav && (is_major == 5) && (agt.indexOf ("netscape") != -1) && (agt.indexOf ("netscape/7") == -1));
var is_nav6up = ((is_nav && (is_major >= 5)) || (is_nav && (agt.indexOf ('netscape/7') != -1)));
var is_ie      = ((agt.indexOf ("msie") != -1) && (agt.indexOf ("opera") == -1) && (agt.indexOf ("safari") == -1));
var is_ie3     = (is_ie && (is_major < 4));
var is_ie4     = (is_ie && (is_major == 4) && (agt.indexOf ("msie 4")!=-1));
var is_ie4up   = (is_ie && (is_major >= 4));
var is_ie5     = (is_ie && (is_major == 4) && (agt.indexOf ("msie 5.0") != -1));
var is_ie5_5   = (is_ie && (is_major == 4) && (agt.indexOf ("msie 5.5") != -1));
var is_ie5up   = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5)
var is_ie7     = ((agt.indexOf ("msie 7.0") != -1));
var is_firefox = ((agt.indexOf ("firefox") != -1) && (agt.indexOf ("opera") == -1) && (agt.indexOf ("safari") == -1));
var is_opera = (agt.indexOf ("opera") != -1);
var is_nn = ((is_nav6 || is_nav6up) ? true : false);




if (!is_ie5_5up && is_ie) {
	document.write ('<style>');
	document.write ('.p_right {margin-left: 0px; position: absolute; min-width: 550px; top: 260px; padding-left: 30%; width: 100%; float: left; z-Index: 1}');
	document.write ('.pb_right {white-space : nowrap;margin-left: 0px;   min-width: 550px; font-size: 90%;  top:0px; position: absolute; display: none; padding-bottom: 8px; padding-left: 30%; width: 100%; float: left; border-bottom: solid 5px #708323; z-Index: 1}');
	document.write ('.bl_search {font-size: 11px; margin-right: 2%; clear: both; float: right; width: 347px; height: 35px; background: url(/templates/pic/bg_search.gif) no-repeat }');
	document.write ('.bl_search .text {padding: 10px 0px 0px 7px}');
	document.write ('.p_right .title {width: 94%; height: 27px; padding-bottom:2px; background: url(/templates/pic/bg_title.gif) 0% 100% repeat-x; font-size: 20px; font-weight: bold; color: #5C7204; font-family: Arial Narrow}');
	document.write ('</style>');
}

if (is_ie7) {
	document.write ('<style>');
	document.write ('.pb_right {white-space : nowrap;margin-left: 0px;   min-width: 550px; font-size: 90%;  top:0px; position: absolute; display: none; padding-bottom: 8px; padding-left: 30%; width: 100%; float: left; border-bottom: solid 5px #708323; z-Index: 1}');
	document.write ('.bl_search {font-size: 11px; margin-right: 2%; clear: both; float: right; width: 347px; height: 35px; background: url(/templates/pic/bg_search.gif) no-repeat }');
	document.write ('.bl_search .text {padding: 10px 0px 0px 7px}');
	document.write ('.p_right .title {width: 94%; height: 27px; padding-bottom:2px; background: url(/templates/pic/bg_title.gif) 0% 100% repeat-x; font-size: 20px; font-weight: bold; color: #5C7204; font-family: Arial Narrow}');
	document.write ('</style>');
}


if (is_firefox) {

	document.write ('<style>');
	document.write ('.p_right {position: static; top: 0px}');
	document.write ('</style>');
}

if (is_ie7) {
	document.write ('<style>');
	document.write ('.p_right {margin-left: expression((document.body.clientWidth>800)?"30%":"240px")}');
	document.write ('</style>');
}

resizePage = function() {
	h=document.getElementById("p_right").clientHeight;
	if (h==0) h=document.getElementById("p_right").offsetHeight;
	h2 = document.getElementById("p_left").clientHeight;
	if (h2==0) h2=document.getElementById("p_left").offsetHeight;
	if (h2>h) h=h2;
	h=Number(h)+280;
	if (document.getElementById("hidden").offsetTop+10>h+25)
		h = document.getElementById("hidden").offsetTop-15
//	alert (h+"!"+document.getElementById("hidden").offsetTop);
	document.getElementById("pb_left").style.display="block";
	document.getElementById("pb_left").style.top=h+"px";
	document.getElementById("pb_right").style.display="block";
	document.getElementById("pb_right").style.top=h+"px";
}


startList = function() { 
resizePage();
if (is_ie || is_opera){
var nodes = document.getElementById("nav").getElementsByTagName("DIV"); 
for (var i=0; i<nodes.length; i++) { 
if (nodes[i].className=="menu1" || nodes[i].className=="m3"){
nodes[i].onmouseover = function() { 
this.className += "_over"; 
} 
nodes[i].onmouseout = function() { 
//window.status = "out";
this.className = this.className.replace(new RegExp("_over\\b"), ""); 
}
} 
} 
}
} 


window.onload=startList;
window.onresize=resizePage;