//---------------------//

function openWind(a){window.open(a+".html", a, "width=500, height=450");}
function openW(a,b,c){
	var w = window.open("",a, "width=260, height=400");
	w.document.open();
	w.document.write('<html><head><title>'+b+'</title></head><body style="background:url( '+c+'/'+a+'_b.jpg) no-repeat center"></body></html>')
	w.document.close()
	}

function openW_h(a,b,c){
	var w = window.open("",a, "width=651, height=450");
	w.document.open();
	w.document.write('<html><head><title>'+b+'</title></head><body style="background:url('+c+'/'+a+'_B.jpg)"></body></html>')
	w.document.close()
	}
	
function openW_L(a,b){
	var w = window.open("",a, "width=620, height=450");
	w.document.open();
	w.document.write('<html><head><title>ламинированный паркет '+b+'</title><link rel="stylesheet" href="style.css"></head><body><center><h2>ламинированный паркет '+
						b+'</h2><img alt="ламинат '+b+' " border="1"  src="laminat/'+a+'_b.jpg">'+
						'<div id="www" style="position: absolute; top: 400; left: 400; z-index: 100;"><a  target="_blank" class="w" href="http://www.adamant-np.ru">www.adamant-np.ru</a></div></center></body></html>')
	w.document.close()
	}
	
	
function openW_EandF(a,b){
	var w = window.open("",a, "width=600, height=250");
	w.document.open();
	w.document.write('<html><head><title>ПАРКЕТНАЯ ДОСКА Earth & Fire '+b+'</title><link rel="stylesheet" href="style.css"></head><body><center><h2>ПАРКЕТНАЯ ДОСКА Earth & Fire '+
						b+'</h2><div id="img" class="imgDiv"><img alt="паркет '+b+' " border="1"  src="eandf/'+a+'_b.jpg" width="459" height="300"></div>'+
						'</center></body></html>')
	w.document.close()
	}
	
function openW_SandG(a,b){
	var w = window.open("",a, "width=600, height=250");
	w.document.open();
	w.document.write('<html><head><title>ПАРКЕТНАЯ ДОСКА Silver & Gold '+b+'</title><link rel="stylesheet" href="style.css"></head><body><center><h2>ПАРКЕТНАЯ ДОСКА Silver & Gold '+
						b+'</h2><div id="img" class="imgDiv"><img alt="паркет '+b+' " border="1"  src="s&g/'+a+'_b.jpg" width="459" height="300"></div>'+
						'</center></body></html>')
	w.document.close()
	}
	
function openW_BandW(a,b){
	var w = window.open("",a, "width=600, height=250");
	w.document.open();
	w.document.write('<html><head><title>ПАРКЕТНАЯ ДОСКА Black and White '+b+'</title><link rel="stylesheet" href="style.css"></head><body><center><h2>ПАРКЕТНАЯ ДОСКА Black and White '+
						b+'</h2><div id="img" class="imgDiv"><img alt="паркет '+b+' " border="1"  src="b&w/'+a+'_b.jpg" width="459" height="300"></div>'+
						'</center></body></html>')
	w.document.close()
	}
	
function openW_V(a,b){
	var w = window.open("",a, "width=620, height=550");
	w.document.open();
	w.document.write('<html><head><title>паркетная доска '+b+'</title><link rel="stylesheet" href="style.css"></head><body><center><h2>паркетная доска '+
						b+'</h2><img alt="паркетная доска '+b+' " border="1"  src="volunta_parquet/'+a+'_b.jpg">'+
						'<div id="www" style="position: absolute; top: 500; left: 400; z-index: 100;"><a  target="_blank" class="w" href="http://www.adamant-np.ru">www.adamant-np.ru</a></div></center></body></html>')
	w.document.close()
	}
	
function openW_V1(a,b){
	var w = window.open("",a, "width=620, height=550");
	w.document.open();
	w.document.write('<html><head><title>паркетная доска '+b+'</title><link rel="stylesheet" href="style.css"></head><body><center><h2>паркетная доска '+
						b+'</h2><img alt="паркетная доска '+b+' " border="1"  src="volunta_parquet/'+a+'_b.jpg">'+
						'<div id="www" style="position: absolute; top: 500; left: 400; z-index: 100;"><a  target="_blank" class="w1" href="http://www.adamant-np.ru">www.adamant-np.ru</a></div></center></body></html>')
	w.document.close()
	}

function openW_m(a,b){
	var w = window.open("",a, "width=570, height=340");
	w.document.open();
	w.document.write('<html><head><title>'+b+'</title></head><body bgcolor="#F9FADA"><img src=" i/'+a+'.gif"></body></html>');
	w.document.close()
	}	
	
function openW_m1(a,b){
	var w = window.open("",a, "width=320, height=300");
	w.document.open();
	w.document.write('<html><head><title>'+b+'</title></head><body style="background:url( i/'+a+'.gif) no-repeat center"></body></html>')
	w.document.close()
	}
function openW_l(a,b){
	var w = window.open("",a, "width=425, height=600");
	w.document.open();
	w.document.write('<html><head><title>'+b+'</title></head><body style="background:url( i/'+a+'.jpg) no-repeat center"></body></html>')
	w.document.close()
	}
function Ch_k(a,f){
		if (f == 1)	
			{document.images[a].src="krishke/softClose.gif";	}
		else{
			 document.images[a].src="krishke/softClose_1.gif";	}
	}

function Ch(a,f,n){
		if (f == 1)	
			{document.images[a].src="camaro/camaro_"+n+".gif";	}
		else{
			 document.images[a].src="camaro/camaro_"+n+"s.gif";	}
	}
	
function F(){
		oncopy="return false"
	}
	
//---------------------//

imgs=new Array(22);
imgs[1]="i/logo_haro.gif";
imgs[2]="i/logo_volunta.gif";
imgs[3]="i/logo_solidfloor_1.gif";
imgs[4]="i/logo_weiss.gif";
imgs[5]="i/logo_mh.gif";
imgs[6]="i/logo_panmar_1.gif";
imgs[7]="i/arbiton.gif";
imgs[8]="i/logo_tiange.gif";
imgs[9]="i/logo_veneto1.gif";
imgs[10]="i/logo_bostik_1.gif";
imgs[21]="i/logo_signatur_1.gif";

imgs[11]="i/logo_haro_1.gif";
imgs[12]="i/logo_volunta1.gif";
imgs[13]="i/logo_solidfloor.gif";
imgs[14]="i/logo_weiss_1.gif";
imgs[15]="i/logo_mh_1.gif";
imgs[16]="i/logo_panmar.gif";
imgs[17]="i/arbiton_1.gif";
imgs[18]="i/logo_tiange_1.gif";
imgs[19]="i/logo_veneto.gif";
imgs[110]="i/logo_bostik.gif";
imgs[210]="i/logo_signatur.gif";
function pinap(name,number){
    document.images[name].src = imgs[number];
}


//----------------------//
var menuCount=8, menuArray, activeMenu=1, menuOpen=false, activeColor='../../i/button_3M_on.gif', inactiveColor='../../i/button_3M.gif', labelExtension=1;
function windowOnload()
{ 
  var i, menuLabel, menuX=0, menuY=130;
  menuArray = new Array();
  for (i = 1; i <= menuCount; ++i) {
    menuLabel = document.getElementById('menuLabel'+i).cbe;
    menuLabel.sizeTo(160,28);
    menuLabel.moveTo(menuX, menuY);
    menuLabel.show();
    menuArray[i] = document.getElementById('menu'+i).cbe;
    menuArray[i].moveTo(menuLabel.left() + menuLabel.width() + labelExtension, menuLabel.top());
    menuArray[i].menuLabel = menuLabel;
    menuArray[i].zIndex(3);
    menuY += menuLabel.height();
  }
  document.cbe.addEventListener("mousemove", menuHide);
}

function menuShow(e,mn)
{
  if (mn == activeMenu && menuOpen) return;
  menuArray[activeMenu].hide()
  for (i = 1; i <= menuCount; ++i) {
    menuArray[i].menuLabel.background('',inactiveColor);
  }
  menuArray[mn].menuLabel.resizeBy(labelExtension, 0);
  menuArray[mn].show();
  menuArray[mn].menuLabel.background('',activeColor);
  activeMenu = mn;
  menuOpen = true;
}

function menuHide(e)
{
  if (!menuOpen) return;
  var x = e.pageX;
  var y = e.pageY;
  if (!menuArray[activeMenu].contains(x,y,-2,0,0,0) && !menuArray[activeMenu].menuLabel.contains(x,y)) {
    menuArray[activeMenu].hide();
    menuArray[activeMenu].menuLabel.background('',inactiveColor);
    menuArray[activeMenu].menuLabel.resizeBy(-labelExtension, 0);
    menuOpen = false;
  }
}
//---------------------смена картинок---------------------------------------//

var imgArray = new Array("massiv/parkett_N2.jpg", "massiv/parkett_N3.jpg",  "massiv/parkett_N5.jpg");
var descArray = new Array( "бук", "дуб дымчатый выбеленный",  "дуб Шоколад рустик" );
var imgDir = "";
var pos = 0;

if (document.images) {
    for (i=0; i<imgArray.length; i++) {
        eval("imgObj" + i + "= new Image()");
        eval("imgObj" + i + ".src = '" + imgDir + imgArray[i] + "'");
    }
}


function toPrevious() {

if (pos == 0) { pos = imgArray.length - 1; }
else { pos = pos - 1 };

 eval("document.vvr.src = imgObj"+pos+".src");
 document.theForm.desc.value = descArray[pos];
}

function toNext() {

if (pos == imgArray.length - 1) { pos = 0; }
else { pos = pos + 1; }

    eval("document.vvr.src = imgObj"+pos+".src");
    document.theForm.desc.value = descArray[pos];
}


//---------------------смена картинок---------------------------------------//
