function open_wnd(url, width, height){

	wx = (screen.availWidth - width)/2;
	wy = (screen.availHeight - height)/2;

	scrollbars = 0;
	if (width + 50 > screen.availWidth || height + 50 > screen.availHeight) scrollbars = 1;
	wnd=window.open(url, "_blank", "width="+width+",height="+height+",status=no,resizable=0,scrollbars="+scrollbars+",toolbar=no,menubar=no,left="+wx+",top="+wy);
}

function open_foto(url, width, height){

	wx = (screen.availWidth - width)/2;
	wy = (screen.availHeight - height)/2;

	url = '/images/'+url+'/';
	width +=50;
	height +=50;
	scrollbars = 1;

	//if (width + 50 > screen.availWidth || height + 50 > screen.availHeight) scrollbars = 1;
	wnd=window.open(url, "_blank", "width="+width+",height="+height+",status=no,resizable=0,scrollbars="+scrollbars+",toolbar=no,menubar=no,left="+wx+",top="+wy);
}


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=8,0,0,0" width="'+width+'" height="'+height+'">');
  document.write('<param name=allowScriptAccess value=sameDomain>');
  document.write('<param name=movie value="'+url+'">');
  document.write('<param name=quality value=high>');
  document.write('<param name="bgcolor" value="#ffffff">');
  document.write('<param name=wmode value=transparent>');
  document.write('<embed src="'+url+'" quality=high bgcolor="#ffffff" width="'+width+'" height="'+height+'" ');
  document.write('allowScriptAccess=sameDomain wmode=transparent type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
  document.write('</object>');
}


function open_foto_obj(url, width, height){

	wx = (screen.availWidth - width)/2;
	wy = (screen.availHeight - height)/2;

	url = '/obj_images/'+url;
	scrollbars = 0;

	//if (width + 50 > screen.availWidth || height + 50 > screen.availHeight) scrollbars = 1;
	wnd=window.open(url, "_blank", "width="+width+",height="+height+",status=no,resizable=0,scrollbars="+scrollbars+",toolbar=no,menubar=no,left="+wx+",top="+wy);
}

function open_popup(url, width, height) {
	wx = (screen.availWidth - width)/2;
	wy = (screen.availHeight - height)/2;
	
	
	wnd=window.open(url, "_blank", "width="+width+",height="+height+",scrollbars="+1+",resizable=0,status=no,toolbar=no,menubar=no,left="+wx+",top="+wy);
}
