	
function show(link, size) {
	xx = window.open("","link","menubar=0, toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, width= " + size + ", height=" + size);
	out = "<html><head><title>Просмотр</title></head><body style='margin: 0 0 0 0;'><table cellpadding=0 cellspacing=0 width=100% height=100% background='/img/gallery_fon.gif'><tr><td align=center valign=middle><a href='javascript:window.close();'><img src='" + link + "' border=0 alt='закрыть'></a></td></tr></table></body></html>";
	xx.document.write(out);
	xx.focus();
	}
	
function html(url, w, h) {
	xx = window.open(url, "link", "menubar=0, toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, width= " + w + ", height=" + h);
	xx.document.write;
	xx.focus();
	}
	
function img(link, w, h) {
	newWindow = window.open(link,'link', "top=30, left=30, menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, width= " + w + ", height="+ h);
	newWindow.focus();
	}

	
function setElementOpacity(sElemId, nOpacity) {
  var opacityProp = getOpacityProperty();
  var elem = document.getElementById(sElemId);

  if (!elem || !opacityProp) return;
  
  if (opacityProp=="filter")   {
    nOpacity *= 100;
	
    var oAlpha = elem.filters['DXImageTransform.Microsoft.alpha'] || elem.filters.alpha;
    if (oAlpha) oAlpha.opacity = nOpacity;
    else elem.style.filter += "progid:DXImageTransform.Microsoft.Alpha(opacity="+nOpacity+")";
  }
  else
    elem.style[opacityProp] = nOpacity;
}


function getOpacityProperty() {
  if (typeof document.body.style.opacity == 'string') // CSS3 compliant (Moz 1.7+, Safari 1.2+, Opera 9, IE7)
    return 'opacity';
  else if (typeof document.body.style.MozOpacity == 'string') // Mozilla 1.6 и младше, Firefox 0.8 
    return 'MozOpacity';
  else if (typeof document.body.style.KhtmlOpacity == 'string') // Konqueror 3.1, Safari 1.1
    return 'KhtmlOpacity';
  else if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5) // IExploder 5.5+
    return 'filter';

return false;
}




	
function run_movie(swf, w, h) { 
text = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + w + "\" height=\"" + h + "\">\r\n";
text+= "<param name=\"allowScriptAccess\" value=\"sameDomain\">\r\n";
text+="<param name=\"movie\" value=\"" + swf + "\">\r\n";
text+="<param name=\"menu\" value=\"false\">\r\n";
text+="<param name=\"quality\" value=\"high\">\r\n";
text+="<param name=\"bgcolor\" value=\"#000000\">\r\n";
text+="<embed src=\"" + swf + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + w + "\" height=\"" + h + "\" menu=\"false\" bgcolor=\"#ffffff\" allowScriptAccess=\"sameDomain\">\r\n";
text+="</object>\r\n";

document.write(text);
return 1;
} 	
