function style_on(item) 
{	item.style.background = "#666666";
	item.style.cursor = "pointer";}
function style_off(item) 
{ item.style.background = "#999999";}

function on(theID) {
var a="img/"+theID+"_on.png";
document.getElementById(theID).src=a}
function off(theID) {
var b="img/"+theID+".png";
document.getElementById(theID).src=b;
second()}
function first(){
var loc=window.location;
if (loc == 'http://gbsteel.ru/') {document.getElementById('unit_prod').style.display = "block"}//else{unit_prod.style.display = "none"}
if (loc == 'http://gbsteel.ru/#_about') {document.getElementById('unit_about').style.display = "block"}//else{unit_about.style.display = "none"}
if (loc == 'http://gbsteel.ru/#_prod') {document.getElementById('unit_prod').style.display = "block"}//else{unit_prod.style.display = "none"}
if (loc == 'http://gbsteel.ru/#_servis') {document.getElementById('unit_servis').style.display = "block"}//else{unit_servis.style.display = "none"}
if (loc == 'http://gbsteel.ru/#_price') {document.getElementById('unit_price').style.display = "block"}//else{unit_price.style.display = "none"}
if (loc == 'http://gbsteel.ru/#_vacancy') {document.getElementById('unit_vacancy').style.display = "block"}//else{unit_vacancy.style.display = "none"}
if (loc == 'http://gbsteel.ru/#_contakt') {document.getElementById('unit_contakt').style.display = "block"}//else{unit_contakt.style.display = "none"}
}

function second(){
if (document.getElementById('unit_about').style.display == "block") {document.getElementById('about').src="http://gbsteel.ru/img/about_on.png"; document.getElementById('menu_about').style.display = "block"}else{document.getElementById('about').src="http://gbsteel.ru/img/about.png"; document.getElementById('menu_about').style.display = "none"}
if (document.getElementById('unit_prod').style.display == "block") {document.getElementById('production').src="http://gbsteel.ru/img/production_on.png"; document.getElementById('menu_prod').style.display = "block"}else{document.getElementById('production').src="http://gbsteel.ru/img/production.png"; document.getElementById('menu_prod').style.display = "none"}
if (document.getElementById('unit_servis').style.display == "block") {document.getElementById('services').src="http://gbsteel.ru/img/services_on.png"; document.getElementById('menu_servis').style.display = "block"}else{document.getElementById('services').src="http://gbsteel.ru/img/services.png"; document.getElementById('menu_servis').style.display = "none"}
if (document.getElementById('unit_price').style.display == "block") {document.getElementById('price').src="http://gbsteel.ru/img/price_on.png"; document.getElementById('menu_price').style.display = "block"}else{document.getElementById('price').src="http://gbsteel.ru/img/price.png"; document.getElementById('menu_price').style.display = "none"; }
if (document.getElementById('unit_vacancy').style.display == "block") {document.getElementById('vacancy').src="http://gbsteel.ru/img/vacancy_on.png"; document.getElementById('menu_vacancy').style.display = "block"}else{document.getElementById('vacancy').src="http://gbsteel.ru/img/vacancy.png"; document.getElementById('menu_vacancy').style.display = "none"}
if (document.getElementById('unit_contakt').style.display == "block") {document.getElementById('contact').src="http://gbsteel.ru/img/contact_on.png"; document.getElementById('menu_contakt').style.display = "block"}else{document.getElementById('contact').src="http://gbsteel.ru/img/contact.png"; document.getElementById('menu_contakt').style.display = "none"}
}

function onner(item) 
{ item.className = "bottom_on";}
function offer(item) 
{ item.className = "bottom";}
function sub_on(item) 
{ item.className = "subbot_on";}
function sub_off(item) 
{ item.className = "subbot";}

function shadow_pre_on(item) 
{ item.className = "shadow_pre_on";}
function shadow_pre_off(item) 
{ item.className = "shadow_pre";}
function shadow_det_on(item) 
{ item.className = "shadow_det_on";}
function shadow_det_off(item) 
{ item.className = "shadow_det";}

function shadow_port_on(item) 
{ item.className = "shadow_port_on";}
function shadow_port_off(item) 
{ item.className = "shadow_port";}

function detail_on(item) 
{ item.src = "img/detail_on.png";}
function detail_off(item) 
{ item.src = "img/detail.png";}
function order_on(item) 
{ item.src = "img/order_on.png";}
function order_off(item) 
{ item.src = "img/order.png";}

function menu(theID) {
if (document.getElementById(theID).style.display == "none") {document.getElementById(theID).style.display = "block";}
else {document.getElementById(theID).style.display = "none"; } }

function show(theID){
document.getElementById('unit_about').style.display = "none";
document.getElementById('unit_prod').style.display = "none";
document.getElementById('unit_servis').style.display = "none";
document.getElementById('unit_price').style.display = "none";
document.getElementById('unit_vacancy').style.display = "none";
document.getElementById('unit_contakt').style.display = "none";
document.getElementById("unit"+theID).style.display = "block";
second()
}

function imager() {
var im = Math.floor(Math.random() * 8);
var cat = Math.floor(Math.random() * 3);
var e="galery/"+cat+"/pic_"+im+".png";
// var path="galery/"+cat+"/";
var path="/";
document.getElementById('heres').href=path;
document.getElementById('galery').src=e;
var timer=setTimeout("imager()",4000)}

var serone=0;
var sertwo=1;
function serter() {
serone=serone+1;
sertwo=sertwo+1;
if (serone==3) {serone=0}
if (sertwo==3) {sertwo=0}
document.getElementById('sert_one').src="img/sertificat_"+serone+".png";
document.getElementById('sert_two').src="img/sertificat_"+sertwo+".png";
var timer=setTimeout("serter()",5000)}
