function popup(what) 
	{ 
		wopt="scrollbars=no,status=no,toolbar=no,menubar=no,resizable=no,width=585,height=795,screenX=50,screenY=50"; 
		newpop=window.open("",what,wopt); 
		newpop.document.open(); 
		newpop.document.write('<html><head><title>Гурт Кома / Галерея</title></head>'); 
		wobo="this.resizeTo(this.document.getElementsByTagName('IMG').item(0).width+160,this.document.getElementsByTagName('IMG').item(0).height+200)"; 
		newpop.document.write('<body onload="'+wobo+'"><center><table cellspacing="0" cellpadding="0" height="100%"><tr><td><img src="img/photos/b/'+what+'.jpg"></td></tr></table></center></body></html>'); 
		newpop.document.close(); 
	}

function movie(newURL) 
{
  window.open(newURL, "newwin", "toolbar=no,width=660,height=540,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no");
}

var pImages = new Array()

pImages[0] = 'h0001'
pImages[1] = 'h0002'
pImages[2] = 'h0003'
pImages[3] = 'h0004'
pImages[4] = 'h0005'
pImages[5] = 'h0006'
pImages[6] = 'h0007'
pImages[7] = 'h0008'
pImages[8] = 'h0009'

var j = 0
var p = pImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++) {
   preBuffer[i] = new Image()
   preBuffer[i].src = pImages[i]
}
var whichPromo = Math.round(Math.random()*(p-1));

function showPic() {
document.write('<img src="img/homepics/'+pImages[whichPromo]+'.jpg" width="695" height="395" alt="KOMA" usemap="#logo">');
}





