document.write("<style type=\"text/css\">.box_cul{position:absolute;width:84px;border:1px solid #ccc;padding:83px 0px 3px 0px;margin:-83px 0px 0px -3px;font-family:Verdana;font-size:10px;display:none;background:#fff;z-index:15}.close_btn{float:right;display:block;width:14px;border:1px solid #fff;text-align:center;line-height:14px;text-decoration:none}.close_btn:hover{border:1px solid #666;background:#ccc}.img_box{display:inline}.box_cul a{font-size:10px;color:#000;text-decoration:none}.box_cul a:hover{text-decoration:underline}</style>");
var allPageTags = new Array();

function hideclass(theClass){
	//Populate the array with all the page tags
	var allPageTags=document.getElementsByTagName("*");
	//Cycle through the tags using a for loop
	for (i=0; i<allPageTags.length; i++) {
		//Pick out the tags with our class name
		if (allPageTags[i].className==theClass) {
			//Manipulate this in whatever way you want
			if (allPageTags[i].style.display=='block'){
				allPageTags[i].style.display='none';
			}
		}
	}
}

function restoreZIndex(theClass){
	//Populate the array with all the page tags
	var allPageTags=document.getElementsByTagName("*");
	//Cycle through the tags using a for loop
	for (i=0; i<allPageTags.length; i++) {
		//Pick out the tags with our class name
		if (allPageTags[i].className==theClass) {
			//Manipulate this in whatever way you want
			allPageTags[i].style.zIndex=10;
		}
	}
}

var idDeschis = '';
function clickImg(cod){
	//hideclass('box_cul');
	//restoreZIndex('img-box');
	if (document.getElementById(idDeschis)){
		document.getElementById(idDeschis).style.display = 'none';
		document.getElementById('img-'+idDeschis).style.zIndex = 10;
	}
	if (cod!=idDeschis){

		document.getElementById(cod).style.display = 'block';
		document.getElementById('img-'+cod).style.zIndex=20;
		idDeschis = cod;
	}
	else{
		idDeschis='';
	}

}

/*calc_1
1-pereti interior
2-pereti exterior
3-lemn
4-metal
*/
var gama = new Array();
gama[1] = new Array();
gama[1][0]='Spirit of Color';
gama[1][1]='Super Coloris';
gama[1][2]='Danke! Baie si Bucatarie';
gama[1][3]='Danke! Stergere frecventa';

gama[2] = new Array();
gama[2][0]='Spirit of Color';

gama[3] = new Array();
gama[3][0]='Danke! Utilizare in gradina';
gama[3][1]='Danke! Utilizare in casa';
gama[3][2]='Super Bait';
gama[3][3]='Super lac colorat';

gama[4] = new Array();
gama[4][0]='Danke! Utilizare in gradina';
gama[4][1]='Danke! Utilizare in casa';

/*
modificare 16.12.2008
randament[32], randament[33] de la 12 la 13
*/
/*randament mp/l*/
var randament = new Array();
randament[10] = 10;
randament[11] = 10;
randament[12] = 10;
randament[13] = 10;
randament[20] = 10;
randament[30] = 11;
randament[31] = 11;
randament[32] = 13;
randament[33] = 13;
randament[40] = 11;
randament[41] = 11;

/*cantitate vopsea*/
var cant_vopsea = new Array();

cant_vopsea[10] = new Array();
cant_vopsea[10][0] = 2.5;
cant_vopsea[10][1] = 10;
cant_vopsea[11] = new Array();
cant_vopsea[11][0] = 5;
cant_vopsea[12] = new Array();
cant_vopsea[12][0] = 5;
cant_vopsea[13] = new Array();
cant_vopsea[13][0] = 2.5;
cant_vopsea[13][1] = 10;
cant_vopsea[20] = new Array();
cant_vopsea[20][0] = 2.5;
cant_vopsea[20][1] = 10;
cant_vopsea[30] = new Array();
cant_vopsea[30][0] = 0.75;
cant_vopsea[30][1] = 2.5;
cant_vopsea[30][2] = 4;
cant_vopsea[31] = new Array();
cant_vopsea[31][0] = 0.75;
cant_vopsea[31][1] = 2.5;
cant_vopsea[31][2] = 4;
cant_vopsea[32] = new Array();
cant_vopsea[32][0] = 0.75;
cant_vopsea[32][1] = 2.5;
cant_vopsea[33] = new Array();
cant_vopsea[33][0] = 0.75;
cant_vopsea[33][1] = 2.5;
cant_vopsea[40] = new Array();
cant_vopsea[40][0] = 0.75;
cant_vopsea[40][1] = 2.5;
cant_vopsea[40][2] = 4;
cant_vopsea[41] = new Array();
cant_vopsea[41][0] = 0.75;
cant_vopsea[41][1] = 2.5;
cant_vopsea[41][2] = 4;

function calc_1(id){

	document.getElementById('gama').innerHTML = '';
	var option=document.createElement('option');
	option.innerHTML = 'Selecteaza';
	option.value = '0';
	document.getElementById('gama').appendChild(option);


	for (i=0;i<gama[id].length;i++){
		var option=document.createElement('option');
		option.innerHTML = gama[id][i];
		option.value = id+''+i;
		document.getElementById('gama').appendChild(option);
	}
}

function calc_2(id){
	document.getElementById('randament').innerHTML = '';

	var option=document.createElement('option');
	option.innerHTML = randament[id];
	option.value = id;
	document.getElementById('randament').appendChild(option);

	//cantitate vopsea
	document.getElementById('cant_vopsea').innerHTML = '';
	var option=document.createElement('option');
	option.innerHTML = 'Selecteaza';
	option.value = '0';
	document.getElementById('cant_vopsea').appendChild(option);


	for (i=0;i<cant_vopsea[id].length;i++){
		var option=document.createElement('option');
		option.innerHTML = cant_vopsea[id][i];
		option.value = cant_vopsea[id][i];
		document.getElementById('cant_vopsea').appendChild(option);
	}
}

function getAjaxRez(id){
	
	new Ajax.Request('http://www.vreauculoare.ro/php/getContact.php',
	{
		method:'post',
		parameters:{'id':id},
		onSuccess: function(transport){
			var response = transport.responseText || "Selectati o zona";
			$('ajxCont').innerHTML=response;

			//alert("Success! \n\n" + response);
		},
		onFailure: function(){ alert('Eroare') }
	});
}