function show_img(fid,w,h,path){
	close_win('show_img');
	document.wins['show_img'] = window.open(path + 'show_img.php?fid=' + fid + '&w=' + w + '&h=' + h, 'displayWindow', 'width=' + w + ', height=' + h + ', resizable=0,scrollbars=no,menubar=no,alwaysRaised=1');
}

function show_help(help_url,w,h,path)
{
	var Win = window.open(path + help_url, 'show_help', 'width=' + w + ', height=' + h + ', resizable=1,scrollbars=yes,menubar=yes,alwaysRaised=1');
}

function show_window(url1,w,h,path)
{
	var Win = window.open(path + url1, 'window1', 'width=' + w + ', height=' + h + ', resizable=0,scrollbars=no,menubar=no,alwaysRaised=1');
}

function show_cwin(url,w,h,path)
{
	var Win = window.open(path + url, 'cwin', 'width=' + w + ', height=' + h + ', resizable=1,scrollbars=yes,menubar=no,alwaysRaised=1');
}

function show_smiles(url,w,h,path)
{
	var Win = window.open(path + url, 'smiles', 'width=' + w + ', height=' + h + ', resizable=0,scrollbars=no,menubar=no,alwaysRaised=1');
}

function show_bolgarski(path)
{
	close_win('bolgarski');
	document.wins['bolgarski'] = window.open(path + 'bolgarski.php', 'bolgarski', 'width=450, height=413, resizable=1, scrollbars=no, menubar=0, alwaysRaised=1');
}

function show_en(path)
{
	close_win('engl');
	document.wins['engl'] = window.open(path + 'english.php', 'english', 'width=600, height=500, resizable=1, scrollbars=yes, menubar=0, arwaysRaised=1');
}

function show_ru(path)
{
	close_win('russ');
	document.wins['russ'] = window.open(path + 'russian.php', 'russian', 'width=600, height=500, resizable=1, scrollbars=yes, menubar=0, arwaysRaised=1');
}

function init_wins(){
	document.wins = new Array();
}

function null_win(key){
	document.wins[key] = 0;
}

function close_win(key){
	if(document.wins[key] && document.wins[key].close){
		document.wins[key].close();
	}
	null_win(key);
}

function close_wins(){
	var key;
	for (key in document.wins)
		close_win(key);
}
