doc=document;
ie=doc.all;
up5=doc.getElementById?doc.getElementsByTagName('div'):0;

function get_root() {
	s = window.location.toString(); pl = "";
	if (s.indexOf("/sklep/")>0) pl = s.substr(0,s.indexOf("sklep/"));
	else if (s.indexOf("/php/")>0) pl = s.substr(0,s.indexOf("php/"));
	else if (s.indexOf("/aukcja/")>0) pl = s.substr(0,s.indexOf("aukcja/"));
	else if (s.indexOf("/serwisy/")>0) pl = s.substr(0,s.indexOf("serwisy/"));
	else if (s.indexOf("/index.php")>0) pl = s.substr(0,s.indexOf("index.php"));
	return pl;	
}

//ladowanie obrazkow
imag = new Array ();

imag['monitory_off'] = get_root()+"html/images/menu/monitory0.jpg"
imag['monitory_on'] = get_root()+"html/images/menu/monitory1.jpg"
imag['notebooki_off'] = get_root()+"html/images/menu/notebooki0.jpg"
imag['notebooki_on'] = get_root()+"html/images/menu/notebooki1.jpg"
imag['palmtopy_off'] = get_root()+"html/images/menu/palmtopy0.jpg"
imag['palmtopy_on'] = get_root()+"html/images/menu/palmtopy1.jpg"
imag['skanery_off'] = get_root()+"html/images/menu/skanery0.jpg"
imag['skanery_on'] = get_root()+"html/images/menu/skanery1.jpg"
imag['tablety_off'] = get_root()+"html/images/menu/tablety0.jpg"
imag['tablety_on'] = get_root()+"html/images/menu/tablety1.jpg"
imag['multimedia_off'] = get_root()+"html/images/menu/multimedia0.jpg"
imag['multimedia_on'] = get_root()+"html/images/menu/multimedia1.jpg"
imag['projektory_off'] = get_root()+"html/images/menu/projektory0.jpg"
imag['projektory_on'] = get_root()+"html/images/menu/projektory1.jpg"
imag['flash_off'] = get_root()+"html/images/menu/flash0.jpg"
imag['flash_on'] = get_root()+"html/images/menu/flash1.jpg"
imag['dyskiprzen_off'] = get_root()+"html/images/menu/dyski_przen0.jpg"
imag['dyskiprzen_on'] = get_root()+"html/images/menu/dyski_przen1.jpg"
imag['dyskitwar_off'] = get_root()+"html/images/menu/dyski_twar0.jpg"
imag['dyskitwar_on'] = get_root()+"html/images/menu/dyski_twar1.jpg"
imag['karty_off'] = get_root()+"html/images/menu/karty0.jpg"
imag['karty_on'] = get_root()+"html/images/menu/karty1.jpg"
imag['elementy_off'] = get_root()+"html/images/menu/elementy_siec0.jpg"
imag['elementy_on'] = get_root()+"html/images/menu/elementy_siec1.jpg"



im = new Array()
for (name in imag) {
	im[name] = new Image();
	im[name].src = imag[name];
}
function swtch(num, imgname) {
	imgname.src = im[num].src;
	return true;
}
function przekieruj(url) {
    window.location=url;
}
function gL(ln){
   return document.getElementById?document.getElementById(ln):document.all?document.all[ln]:document.layers[ln]
}






<!-- begin RANDOM HEADER IMAGES 
var micro = new Array()

micro[0] = 'http://max/m-audio/html/images/random/micro/micro1.jpg'
micro[1] = 'http://max/m-audio/html/images/random/micro/micro2.jpg'
micro[2] = 'http://max/m-audio/html/images/random/micro/micro3.jpg'
micro[3] = 'http://max/m-audio/html/images/random/micro/micro4.jpg'

var radio = new Array()

radio[0] = 'http://max/m-audio/html/images/random/radio/radio1.jpg'
radio[1] = 'http://max/m-audio/html/images/random/radio/radio2.jpg'

var radiocd = new Array()

radiocd[0] = 'http://max/m-audio/html/images/random/radiocd/cd1.jpg'
radiocd[1] = 'http://max/m-audio/html/images/random/radiocd/cd2.jpg'

var glosniki = new Array()

glosniki[0] = 'http://max/m-audio/html/images/random/glosniki/glosniki1.jpg'
glosniki[1] = 'http://max/m-audio/html/images/random/glosniki/glosniki2.jpg'
glosniki[2] = 'http://max/m-audio/html/images/random/glosniki/glosniki3.jpg'
glosniki[3] = 'http://max/m-audio/html/images/random/glosniki/glosniki4.jpg'

function showImage(tabname){
tab = eval(tabname);
var p = tab.length;
var whichImage = Math.round(Math.random()*(p-1))
document.write('<img border="0"  src="'+tab[whichImage]+'">');
}




function get_root() {
	s = window.location.toString(); pl = "";
	if (s.indexOf("/pokaz/")>0) pl = s.substr(0,s.indexOf("pokaz/"));
	else if (s.indexOf("/producenci/")>0) pl = s.substr(0,s.indexOf("producenci/"));
	return pl;	
}
function PowiekszZdjecie(co) {
	scr_w = screen.width;
	scr_h = screen.height;
	xpos = parseInt((scr_w)/2);
	ypos = parseInt((scr_h)/2);;
	okno = window.open(get_root()+'pokaz/popup/zdjecie/'+co,'zdjecie','width=1,height=1,left=0,top=0,resizable=no,scrollbars=no,menubar=no,directories=no,toolbar=no,location=no,status=no');
}


