	
function show(link, w, h) {
	xx = window.open("","link","menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, width= " + w + ", height=" + h);
	out = "<html><head><title>Просмотр</title></head><body style='margin: 0 0 0 0;'><table cellpadding=0 cellspacing=0><tr><td><a href='javascript:window.close();'><img src='" + link + "' border=0 alt='закрыть'></a></td></tr></table></body></html>";
	xx.document.write(out);
	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 newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
		}
}

function preloadImages() {
if (document.images) {
		str01 = newImage("/img/home2.gif");
		str01 = newImage("/img/mail2.gif");
		str01 = newImage("/img/map2.gif");
		}
}

function showImg(objId, imgSrc) {
	document.all(objId).src = imgSrc;
	}
	


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 windowClose(name) {
wind = window.open("", name);
wind.close();
}


function replaceText(element, text) {
    var obj = document.getElementById(element);
    obj.innerHTML = text;
    return true;
	}

	
	
preloadImages();
