n4 = (document.layers)? true:false
ie = (document.all)? true:false
n6 = (!document.all && document.getElementById)? true:false
function objekt(id) {
   if (n6) var obj = document.getElementById(id).style;
   else if (n4) var obj = document.layers[id];
   else if (ie) var obj = document.all[id].style;
   return obj;
}
function disp(id){
	obj = objekt(id);
   if (n6) obj.display = "block";
   else if (n4) obj.display = "block";
   else if (ie) obj.display = "block";
}
function nondisp(id){
	obj = objekt(id);
   if (n6) obj.display = "none";
   else if (n4) obj.display = "none";
   else if (ie) obj.display = "none";
}
function dispMenu(id,id2,w,noc){
	w_id = "w" + id;
	w_id2 = "w" + id2;
	disp(w_id);
	obj2 = objekt(w_id2);
	obj2.width = w;
	var ciag = "<a href='javascript://' onClick='menuVert(" + id + "," + id2 + "," + noc + ",0);' class='textZolty' style='cursor: pointer;'>";
	ciag += "<span style='position: absolute; top: 93px; left: 11px;'><img src='grafika/strz_dol_bial_tlosel.gif' width='13' height='14' border='0' alt='' /></span>";
	ciag += "<span style='position: absolute; top: 93px; left: 30px;'>";
	ciag += "<span class='textZolty'>Moje menu </span><span class='textSzaryRoll'>(zwiń)</span>";
	ciag += "</span>";
	ciag += "</a>";
	document.getElementById("mojemenu").innerHTML = ciag;
	
//	document.getElementById("mojemenu").innerHTML = "<a href='javascript:menuVert(" + id + "," + id2 + "," + noc + ",0);' class='textSzaryRoll'>(zwiń)</a>";
//	document.getElementById("mojemenuGr").innerHTML = "<img src='grafika/strz_dol_bial_tlosel.gif' width='13' height='14' border='0' alt='' />";
//	if (noc == 3) for (i = 0; i < 4; i++) eval ('document.getElementById("inputTextSearch' + (i + 1) + '").style.width = "120";');
}
function nondispMenu(id,id2,w,noc){
	w_id = "w" + id;
	w_id2 = "w" + id2;
	nondisp(w_id);
	obj2 = objekt(w_id2);
	obj2.width = w;

	var ciag = "<a href='javascript://' onClick='menuVert(" + id + "," + id2 + "," + noc + ",1);' class='textZolty' style='cursor: pointer;'>";
	ciag += "<span style='position: absolute; top: 93px; left: 11px;'><img src='grafika/strz_pr_bial_tlosel.gif' width='14' height='13' border='0' alt='' /></span>";
	ciag += "<span style='position: absolute; top: 93px; left: 30px;'>";
	ciag += "<span class='textZolty'>Moje menu </span><span class='textSzaryRoll'>(rozwiń)</span>";
	ciag += "</span>";
	ciag += "</a>";
	document.getElementById("mojemenu").innerHTML = ciag;

//	document.getElementById("mojemenu").innerHTML = "<a href='javascript:menuVert(" + id + "," + id2 + "," + noc + ",1);' class='textSzaryRoll'>(rozwiń)</a>";	
//	document.getElementById("mojemenuGr").innerHTML = "<img src='grafika/strz_pr_bial_tlosel.gif' width='14' height='13' border='0' alt='' />";
//	if (noc == 3) for (i = 0; i < 4; i++) eval ('document.getElementById("inputTextSearch' + (i + 1) + '").style.width = "150";');
}

function menuVert(id,id2,noc, x){
	if (noc == 3){
		if (x == 1)
			dispMenu(id,id2,441,noc);
		else if (x == 0)
			nondispMenu(id,id2,596,noc);
	}
	if (noc == 2){
		if (x == 1)
			dispMenu(id,id2,688,noc);
		else if (x == 0)
			nondispMenu(id,id2,843,noc);
	}
	if (noc == 1){
		if (x == 1)
			dispMenu(id,id2,845,noc);
		else if (x == 0)
			nondispMenu(id,id2,1000,noc);
	}
}

function searchPanel(x){
	if (x == "1"){
		id = "search";
		disp(id);
		document.getElementById("searchMenu").innerHTML = "<a href='javascript://' onClick='searchPanel(0);' class='textSzaryRoll'><span style='position: relative; top: 1px; _top: -1px;'>(zwiń) </span><img src='grafika/strz_gora_bial_tlosel.gif' width='15' height='12' border='0' alt='' align='absmiddle' /></a>";
	}
	if (x == "0"){
		id = "search";
		nondisp(id);
		document.getElementById("searchMenu").innerHTML = "<a href='javascript://' onClick='searchPanel(1);' class='textSzaryRoll'><span style='position: relative; top: 1px; _top: -1px;'>(rozwiń) </span><img src='grafika/strz_dol_bial_tlosel.gif' width='15' height='12' border='0' alt='' align='absmiddle' /></a>";
	}
}

function spec(idnum, x){
	if (x == "1"){
		id = "specTab" + idnum;
		disp(id);
		document.getElementById("spec" + idnum).innerHTML = "<a href='javascript:spec(" + idnum + ",0);' class='textSzary3'>(zwiń)</a> <span><img src='grafika/strz_gora_bial_szar.gif' width='15' height='12' border='0' alt='' align='absmiddle' /></span>";
	}
	if (x == "0"){
		id = "specTab" + idnum;
		nondisp(id);
		document.getElementById("spec" + idnum).innerHTML = "<a href='javascript:spec(" + idnum + ",1);' class='textSzary3'>(rozwiń)</a> <span><img src='grafika/strz_dol_bial_szar.gif' width='15' height='12' border='0' alt='' align='absmiddle' /></span>";
	}
}

/* data */

var miesiace = new Array("stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia");
var data = new Date();
var godzina = data.getHours();
var minuty = data.getMinutes(); if (minuty < 10) minuty = "0" + minuty;
var dzien = data.getDate();
var miesiac = data.getMonth();
var rok = data.getFullYear();

/* data : KONIEC */

function uwagi(idtowaru)
{
	uwaga = window.open("formularz_uwagi.asp?idtowaru=" + idtowaru, "uwaga", "width = 350, height = 250, top = 10, left = 10");
}
