/*

Этот java script файл был напечатан на одном из компьютеров студии Corner 
http://corner.md

*/

// Запускаем функцию при загрзуке окна
window.onload = htmlconvert();

// Собственно функция
function htmlconvert(){

if(document.getElementById('footer')){
var footer = document.getElementById('footer');
footer.innerHTML = '<div id="footer1"><div id="footer2">' + footer.innerHTML + '</div></div>';
}

if(document.getElementById('logo')){
var logo = document.getElementById('logo');
var logoa = logo.getElementsByTagName('a');
logoa = logoa[0];

logoa.innerHTML = '<span>' + logoa.innerHTML + '</span>';


logoa.onmouseover = function () {
logoa.style.background = "url(/i/dasterum_hover.jpg)";
};

logoa.onmouseout = function () {
logoa.style.background = "url(/i/dasterum.jpg)";
};

}

if(document.getElementById('send_mail')){
var send_mail = document.getElementById('send_mail');
send_maila = send_mail.getElementsByTagName('a');
send_maila = send_maila[0];
send_maila.href = "./mail.php?height=500&width=686&KeepThis=true&TB_iframe=true";
send_maila.className = 'thickbox';
}


if(document.getElementById('selectors')){
var selectors = document.getElementById('selectors');
var selectorsli = selectors.getElementsByTagName('li');
var selectorsa = selectors.getElementsByTagName('a');

selectorsa[0].className = 'thickbox';
selectorsa[1].className = 'thickbox';

selectorsa[0].href = "./map.php?height=448&width=655";
selectorsa[1].href = "./mail.php?height=500&width=686&KeepThis=true&TB_iframe=true";

selectorsli = selectorsli[1];

selectorsli.className = 'phone';

}

if(document.getElementById('info_line')){
var info_line = document.getElementById('info_line');
info_line.innerHTML = '<div><div>' + info_line.innerHTML + '</div></div>';
}

if(document.getElementById('articles')){
var articles = document.getElementById('articles');
articles.innerHTML = '<div><div>' + articles.innerHTML + '</div></div>';
}

if(document.getElementById('wrapper')){
var wrapper = document.getElementById('wrapper');
wrapper.innerHTML = '<div style="position:absolute;top:194px;left:0px;display:block;"><a href="/gallery.html"><img src="/i/0.gif" style="border:0px;width:327px;height:187px;" onmouseover="this.src=\'/i/info_line_hover.jpg\';" onmouseout="this.src=\'/i/0.gif\';" /></a></div>' + wrapper.innerHTML;
}

if(document.getElementById('production')){
var production = document.getElementById('production');
productiondiv = production.getElementsByTagName('div');

for (var t=0; t<productiondiv.length; t++){

productiondiv[0].onclick = function() {window.location.href = "/c-15.html";};
productiondiv[1].onclick = function() {window.location.href = "/c-44.html";};
productiondiv[2].onclick = function() {window.location.href = "/h-57.html";};
productiondiv[3].onclick = function() {window.location.href = "/hc-35.html";};
productiondiv[4].onclick = function() {window.location.href = "/ps-20.html";};
productiondiv[5].onclick = function() {window.location.href = "/c-10.html";};
productiondiv[6].onclick = function() {window.location.href = "/c-8.html";};
productiondiv[7].onclick = function() {window.location.href = "/metall-tile.html";};

if(productiondiv[t].className == 'production'){

productiondiv[t].onmouseover = function(){
this.className = 'production_selected';
};

productiondiv[t].onmouseout = function(){
this.className = 'production';
};

}
}
}

if(document.getElementById('gost1')){
document.getElementById('gost1').onmouseover = function () {document.getElementById('gost1_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost1').onmouseout = function () {document.getElementById('gost1_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost2')){
document.getElementById('gost2').onmouseover = function () {document.getElementById('gost2_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost2').onmouseout = function () {document.getElementById('gost2_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost3')){
document.getElementById('gost3').onmouseover = function () {document.getElementById('gost3_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost3').onmouseout = function () {document.getElementById('gost3_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost4')){
document.getElementById('gost4').onmouseover = function () {document.getElementById('gost4_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost4').onmouseout = function () {document.getElementById('gost4_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost5')){
document.getElementById('gost5').onmouseover = function () {document.getElementById('gost5_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost5').onmouseout = function () {document.getElementById('gost5_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost6')){
document.getElementById('gost6').onmouseover = function () {document.getElementById('gost6_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost6').onmouseout = function () {document.getElementById('gost6_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost7')){
document.getElementById('gost7').onmouseover = function () {document.getElementById('gost7_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost7').onmouseout = function () {document.getElementById('gost7_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost8')){
document.getElementById('gost8').onmouseover = function () {document.getElementById('gost8_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost8').onmouseout = function () {document.getElementById('gost8_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost9')){
document.getElementById('gost9').onmouseover = function () {document.getElementById('gost9_demo').style.display = '';this.style.background = "none";}
document.getElementById('gost9').onmouseout = function () {document.getElementById('gost9_demo').style.display = 'none';this.style.background = "#F3F3F3";}
}

if(document.getElementById('gost1_demo')){document.getElementById('gost1_demo').style.display = 'none';}
if(document.getElementById('gost2_demo')){document.getElementById('gost2_demo').style.display = 'none';}
if(document.getElementById('gost3_demo')){document.getElementById('gost3_demo').style.display = 'none';}
if(document.getElementById('gost4_demo')){document.getElementById('gost4_demo').style.display = 'none';}
if(document.getElementById('gost5_demo')){document.getElementById('gost5_demo').style.display = 'none';}
if(document.getElementById('gost6_demo')){document.getElementById('gost6_demo').style.display = 'none';}
if(document.getElementById('gost7_demo')){document.getElementById('gost7_demo').style.display = 'none';}
if(document.getElementById('gost8_demo')){document.getElementById('gost8_demo').style.display = 'none';}
if(document.getElementById('gost9_demo')){document.getElementById('gost9_demo').style.display = 'none';}

if(document.getElementById('product_image')){
var product_image = document.getElementById('product_image');
product_image.align = "center";
}

if(document.getElementById('chertej')){
var chertej = document.getElementById('chertej');
chertej.align = "center";
}

if(document.getElementById('product')){
var product = document.getElementById('product');
product.align = "center";
}

if(document.getElementById('content2')){
var content2 = document.getElementById('content2');
content2.align = "center";
}

if(document.getElementById('gallery_c-15')){
document.getElementById('gallery_c-15').style.display = "";
document.getElementById('gallery_c-44').style.display = "none";
document.getElementById('gallery_h-57').style.display = "none";

}

if(document.getElementById('slide')){
var slide = document.getElementById('slide');
slidea = slide.getElementsByTagName('a');
slidea = slidea[0];
}

if($.cookie("slider") == 0){
document.getElementById('production').style.display = "none";
slidea.innerHTML = 'развернуть';
}else{
document.getElementById('production').style.display = "block";
slidea.innerHTML = 'свернуть';
}

if(document.getElementById('map')){}

}

function show_gallery(idd){

document.getElementById('gallery_c-15').style.display = "none";
document.getElementById('gallery_c-44').style.display = "none";
document.getElementById('gallery_h-57').style.display = "none";

document.getElementById('list_gallery_c-15').className = "";
document.getElementById('list_gallery_c-44').className = "";
document.getElementById('list_gallery_h-57').className = "";

document.getElementById(idd).style.display = "";
document.getElementById('list_' + idd).className = "selected";

}

function show_map_image (idd){
document.getElementById(idd).style.display = "block";
}
function hide_map_image (idd){
document.getElementById(idd).style.display = "none";
}

function slide() {


if(document.getElementById('slide')){
var slide = document.getElementById('slide');
slidea = slide.getElementsByTagName('a');
slidea = slidea[0];
}

if(slidea.innerHTML == 'свернуть'){
slidea.innerHTML = 'развернуть';
$("div#production").slideUp();

$.cookie("slider", "0");
document.getElementById('production').style.display = "block";

}else{
slidea.innerHTML = 'свернуть';
$("div#production").show("slow");

$.cookie("slider", "1");
document.getElementById('production').style.display = "none";

}

}
