//ladowanie obrazkow
imag = new Array ();

imag['o_firmie_0'] = get_root()+"html/images/menu/o_firmie_0.jpg"
imag['o_firmie_1'] = get_root()+"html/images/menu/o_firmie_1.jpg"
imag['rejestracja_0'] = get_root()+"html/images/menu/rejestracja_0.jpg"
imag['rejestracja_1'] = get_root()+"html/images/menu/rejestracja_1.jpg"

imag['zaloguj_0'] = get_root()+"html/images/menu/zaloguj_0.jpg"
imag['zaloguj_1'] = get_root()+"html/images/menu/zaloguj_1.jpg"
imag['glowna_0'] = get_root()+"html/images/menu/glowna_0.jpg"
imag['glowna_1'] = get_root()+"html/images/menu/glowna_1.jpg"
imag['koszyk_0'] = get_root()+"html/images/menu/koszyk_0.jpg"
imag['koszyk_1'] = get_root()+"html/images/menu/koszyk_1.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]
}


function otworzOknoZoom(co,w,h,tytul) {
	okno_w = w + 10;
	okno_h = h + 10;
	scr_w = screen.width;
	scr_h = screen.height;
	xpos = parseInt((scr_w-okno_w)/2);
	alert(okno_h);
	ypos = parseInt((scr_h-okno_h)/2);
	var zawartosc=""+
		"<html>"+
		"<head>"+
		"<title>"+tytul+"</title>"+
		"<meta http-equiv=Content-Type content=text/html; charset=iso-8859-2>"+
		"</head>"+
		"<body bgcolor=#ffffff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"+
		"<table width=100% border=0 cellpadding=0 cellspacing=0>"+
		
		"  <tr>"+
		"    <td align=center valign=middle bgcolor=#FFFFFF><a href=javascript:window.close()><img src="+co+" width="+w+" height="+h+"  border=1></a></td>"+
		"  </tr>"+

		"</table>"+
		"</body>"+
		"</html>"
//	if (ie || up5) {
		okno = window.open(co,'','width='+okno_w+',height='+okno_h+',left='+xpos+',screenX='+xpos+',top='+ypos+',screenY='+ypos+',resizable=no,scrollbars=no,menubar=no,directories=no,toolbar=no,location=no,status=no');
		okno.document.open();
		okno.document.write(zawartosc);
		okno.document.close();
//	}
}

function nowe_okno(url,tytul,opcje){
    var okno;
    if (okno){
        okno.close();
    }
	//xpos = 100;
	//ypos = 100;
	w = 500;
	h = 500;
	scr_w = screen.width;
	scr_h = screen.height;
xpos = parseInt((scr_w-w)/2);
ypos = parseInt((scr_h-h)/2);
	
opcje= 'height='+h+',width='+w+',scrollbars=no,resizable=no,left='+xpos+',top='+ypos+''
okno = window.open('',tytul,opcje);
okno.document.open();
okno.document.write("<head><title>"+tytul+"</title><meta http-equiv=imagetoolbar content=no></head><BODY leftmargin=2 topmargin=2><table width=100% align=center><tr><td align=center colspan=2 valign=middle height=450><a href=javascript:window.close()><img src="+url+" border=1 style=border-color:#C8CBCF alt=zamknij_okno></a></td></tr><tr><td bgcolor=#CC0000 height=1 colspan=2></td></tr><tr><td align=left><img src=images/elementy/ikony/copy.gif border=0></td><td align=right><a href=javascript:window.close()><img src=images/elementy/ikony/zamknij.gif border=0 alt=zamknij_okno></a></td></tr></table></body>");
    okno.document.close();
    okno.focus();
}

<!-- 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 = "http://programypracownicze.pl/";
	if (s.indexOf("/pokaz/")>0) pl = s.substr(0,s.indexOf("pokaz/"));
	else if (s.indexOf("/noflash/")>0) pl = s.substr(0,s.indexOf("noflash/"));
	else if (s.indexOf("/philips/")>0) pl = s.substr(0,s.indexOf("philips/"));
	return pl;	
}

function get_script() {
	s = window.location.toString(); pl = "pokaz";
	
	if (s.indexOf("/pokaz/")>0) pl = 'pokaz';
	else if (s.indexOf("/noflash/")>0) pl = 'noflash';
	else if (s.indexOf("/philips/")>0) pl = 'philips';
	else if (s.indexOf("/gwiazdka/")>0) pl = 'gwiazdka';
	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()+get_script()+'/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');
}




//losowa rotacja banerow w stopce
var theImages = new Array();


theImages[0] = 'http://max/m-audio/html/swf/baner_main_1.swf'
theImages[1] = 'http://max/m-audio/html/swf/baner_main_2.swf'
theImages[2] = 'http://max/m-audio/html/swf/baner_main_3.swf'
theImages[3] = 'http://max/m-audio/html/swf/baner_main_4.swf'

var q = 0;
var p = 4;
var whichImage = Math.round(Math.random()*(p-1));


function showBaner(){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="760" height="350"><param name="movie" value="'+theImages[whichImage]+'"><param name="quality" value="high"><embed src="'+theImages[whichImage]+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="760" height="350"></embed></object>');
}

