function openClose(id)
{
if(document.getElementById) {
element = document.getElementById(id);
} else if(document.all) {
element = document.all[id];
} else return;

if(element.style) {
if(element.style.display == 'block' ){
element.style.display = 'none';
} else {
element.style.display = 'block';
}
}
}


function arte_print_value(form_name, var_name, var_value)
{
	var form_obj = eval("document." + form_name);
	form_obj[var_name].value = var_value;
}

function show_photo(file_type, id_parent, id_file, width, height)
{
	var parametry = "TOOLBAR=no,STATUS=no, width="+width+", height="+(height+20);
	var gdzie = "pic_show.php?photo="+id_file + "&parent="+id_parent + "&type=" + file_type;
	
	if (typeof show_photo_window == "object")
		show_photo_window.close();

	show_photo_window = window.open(gdzie,"", parametry);
}

function displayWindow(url, width, height) 
{
	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no,toolbar=no,location=no,directories=no' );
}

function createFlash(flashSrc, width, height, bgcolor) {
	
	html = "<object ";    
	html += " codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" ";
	html += " width=\"" + width + "\" ";
	html += " height=\"" + height + "\" ";
	html += " align=\"middle\" ";
	html += " >";
	
	html += " <param name=\"allowScriptAccess\" value=\"sameDomain\" /> ";	
	html += " <param name=\"movie\" value=\"" + flashSrc + "\" /> ";
	html += " <param name=\"quality\" value=\"high\" /> ";
	html += " <param name=\"bgcolor\" value=\"" + bgcolor + "\" />";
	
	html += " <embed src=\"" + flashSrc + "\" ";
	html += " quality=\"high\" ";
	html += " bgcolor=\"" + bgcolor + "\" ";
	html += " width=\"" + width + "\" ";
	html += " height=\"" + height + "\" ";
	html += " align=\"middle\" ";
	html += " allowScriptAccess=\"sameDomain\" ";
	html += " type=\"application/x-shockwave-flash\" ";
	html += " pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
	html += " />";
	
	html += "</object>";
	
	document.writeln(html);
}
