function open_wnd(id, name, width, height)
{
	wx = (screen.availWidth - width)/2;
	wy = (screen.availHeight - height)/2;

	var scrollbars = 0;
	if (width + 50 > screen.availWidth || height + 50 > screen.availHeight) scrollbars = 1;
	wnd=window.open("/picture.php?id="+id+"&name="+name+"&width="+width+"&height="+height, "_blank", "width="+width+",height="+height+",status=no,resizable=0,scrollbars="+scrollbars+",toolbar=no,menubar=no,left="+wx+",top="+wy);
}

function full_wnd(id, width, height)
{
	wx = 0;
	wy = 0;

	width1 = screen.availWidth - 10;
	height1 = screen.availHeight - 35;

	wnd=window.open("/picture.php?id="+id+"&width="+width+"&height="+height, "_blank", "width="+(width1)+",height="+(height1)+",status=no,resizable=no,directories=no,scrollbars=yes,toolbar=no,menubar=no, left="+wx+",top="+wy);
}

function openpop(link,width,height)
{
  winpops=window.open(link,"","width="+width+",height="+height+",resizable,scrollbars=1")
}


// menu functions

var menu_current, menu_timer;

function layer_show(name)
{
	if (document.layers)
	{
		if (document.layers[name])
			document.layers[name].visibility = "show";
	} else {
	   el = document.getElementById(name);
		if (el && el.style)
			el.style.visibility = "visible";
	}
}

function layer_hide(name)
{
	if (document.layers)
	{
		if (document.layers[name])
			document.layers[name].visibility = "hide";
	} else {
	   el = document.getElementById(name);
		if (el && el.style)
			el.style.visibility = "hidden";
	}
}


function ms(name)
{
	if (menu_current && menu_current != name)
		layer_hide(menu_current);
	menu_current = name;
	layer_show(menu_current);
	if ( menu_timer )
		clearTimeout(menu_timer);
	menu_timer = 0;
}


function mh(name)
{
	menu_timer = setTimeout('layer_hide(\''+name+'\')', 500);
}




function show_flash(url,width,height)
{
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');
  document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,65,0" width="'+width+'" height="'+height+'">');
  document.write('<param name=allowScriptAccess value=sameDomain>');
  document.write('<param name=movie value="'+url+'">');
  document.write('<param name=wmode value=opaque>');
  document.write('<param name=quality value=high>');
  document.write('<embed src="'+url+'" quality=high wmode=opaque width="'+width+'" height="'+height+'" ');
  document.write('allowScriptAccess=sameDomain type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
  document.write('</object>');
}


var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ?
  navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if(!plugin && (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0)&&((navigator.userAgent.indexOf("Windows95")>=0)||(navigator.userAgent.indexOf("Windows 98")>=0)||(navigator.userAgent.indexOf("Windows NT")>=0)))
{
  document.write('<'+'SCRIPT LANGUAGE=VBScript'+'>\n');
  document.write('on error resume next\n');
  document.write('plugin=( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
  document.write('</'+'SCRIPT'+'>');
}

 
