//funkcje do podmiany zdjec
function fon(n){document.images[n].src='grafika/'+n+'1.gif';}
function foff(n){document.images[n].src='grafika/'+n+'.gif';}

//About Colours and Lighting
function colour(id){document.images['colour_replace'].src='grafika/colour/'+id+'.jpg';}


function bar_over(id){document.images[id].src='grafika/'+id+'1.gif';}
function bar_out(id){document.images[id].src='grafika/'+id+'.gif';}



function menu1_over(id)
{
//document.getElementById(id+"0").style.backgroundImage='url(grafika/menu1_back1.gif)';
document.getElementById(id+"0").style.backgroundColor='#BBBBBB';
document.getElementById(id+"1").style.backgroundColor='#DDDDDD';
document.getElementById(id+"2").style.backgroundColor='#999999';
}//over


function menu1_out(id)
{
//document.getElementById(id+"0").style.backgroundImage='url(grafika/menu1_back.gif)';
document.getElementById(id+"0").style.backgroundColor='#EAEAEA';
document.getElementById(id+"1").style.backgroundColor='#F8F8F8';
document.getElementById(id+"2").style.backgroundColor='#CCCCCC';
}//out


function menu2_over(id)
{
//document.getElementById(id+"0").style.backgroundImage='url(grafika/menu2_back1.gif)';
document.getElementById(id+"0").style.backgroundColor='#3986E7';
document.getElementById(id+"1").style.backgroundColor='#669FE6';
document.getElementById(id+"2").style.backgroundColor='#006389';
}//over


function menu2_out(id)
{
//document.getElementById(id+"0").style.backgroundImage='url(grafika/menu2_back.gif)';
document.getElementById(id+"0").style.backgroundColor='#0065CE';
document.getElementById(id+"1").style.backgroundColor='#3385D6';
document.getElementById(id+"2").style.backgroundColor='#00407D';
}//out


function menu3_over(id)
{
//document.getElementById(id+"0").style.backgroundImage='url(grafika/menu3_back1.gif)';
document.getElementById(id+"0").style.backgroundColor='#63B2FF';
document.getElementById(id+"1").style.backgroundColor='#99CFFF';
document.getElementById(id+"2").style.backgroundColor='#406C97';
}//over


function menu3_out(id)
{
//document.getElementById(id+"0").style.backgroundImage='url(grafika/menu3_back.gif)';
document.getElementById(id+"0").style.backgroundColor='#429AE7';
document.getElementById(id+"1").style.backgroundColor='#7FBCF5';
document.getElementById(id+"2").style.backgroundColor='#397DBA';
}//out

//funkcja do wyswietlania szczegółów w nowym oknie
var okno2='';
function pop_more(id,wi,he,alt)
{
	//xx=(screen.availWidth-wi)-10;
	//yy=(screen.availHeight-he)/2;
	yy=20;
	xx=100;

	okno2=window.open('pop_more.php?id='+id+'&alt='+alt+'', '_blank', 'scrollbars=yes,status=yes,resizable=yes,menubar=yes,toolbar=yes,location=no,directories=yes,height='+he+',width='+wi+',top='+yy+',left='+xx);
}


//funkcja do wyswietlania szczegółów w nowym oknie
// GALERIA
var okno3='';
function pop_galeria(id,wi,he)
{
	yy=20;
	xx=100;

	okno3=window.open('pop_galeria.php?id='+id+'', '_blank', 'scrollbars=yes,status=yes,resizable=yes,menubar=yes,toolbar=yes,location=no,directories=yes,height='+he+',width='+wi+',top='+yy+',left='+xx);
}


//funkcja do wyswietlania szczegółów w nowym oknie
// POBIERZ SZABLON
var okno3='';
function pop_szablon(id,wi,he)
{
	yy=20;
	xx=100;

	okno3=window.open('pop_szablon.php?id='+id+'', '_blank', 'scrollbars=yes,status=yes,resizable=yes,menubar=yes,toolbar=yes,location=no,directories=yes,height='+he+',width='+wi+',top='+yy+',left='+xx);
}


//funkcja do wyswietlania popupu
var okno='';
function popup(wi,he,uerel,alignx,aligny,scrol)
{
	if(okno &&!okno.closed){okno.close()}
	if(wi=='100%'){wi=screen.availWidth-30}
	if(he=='100%'){he=screen.availHeight-0}
	if(alignx=='left'){xx=0}
	else if(alignx=='right'){xx=(screen.availWidth-wi)-10}
	else{xx=(screen.availWidth-wi)/2}
	if(aligny=='top'){yy=0}
	else if(aligny=='bottom'){yy=(screen.availHeight-he)}
	else{yy=(screen.availHeight-he)/2}
	okno=window.open(uerel, '_blank', 'scrollbars='+scrol+',height='+he+',width='+wi+',top='+yy+',left='+xx);
}


//ladowanie do casch-u zdjec
foto_menu=new Array('txt1','txt2','txt3','txt4','txt5','txt6');
menuA_menu=new Array();menuB_menu=new Array();
for(n=0;n<foto_menu.length;n++){
	menuA_menu[n]=new Image();
	menuA_menu[n].src='grafika/'+foto_menu[n]+'.gif';
	menuB_menu[n]=new Image();
	menuB_menu[n].src='grafika/'+foto_menu[n]+'1.gif';
}


var okno='';
function show_popup(n)
{
	if(okno &&!okno.closed){okno.close()}
	wi=480;
	he=660;
	xx=(screen.availHeight-he)/2-10;
	yy=(screen.availWidth-wi)/2;
	okno=window.open('popup.php?id='+n, '_blank', 'scrollbars=yes,height='+he+',width='+wi+',top='+xx+',left='+yy);
}