//pritaikymo pvz.: project_images\png\IE - ir img ir CSS backgroundImage su PNG.htm

//reikia: identify.js > function browser_class()
function setPNGforIE_bg(idStr,imgUrl) {
	if (br.ie5) var obj = document.getElementById(idStr);
	else return;
	if (!obj.runtimeStyle) return;		// is the browser capable of managing runtimeStyle - tai palaiko tik IE?
	obj.style.backgroundImage = 'none';
	obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgUrl+"',sizingMethod='scale')";
}

///////////////
//////////////				PNG for img
/////////////

var pngImages = new Array();

function setPNGforIE_img_class(obj) {
	this.obj = obj;
	this.spacer = "images/spacer.gif";
	this.realSrc = this.obj.src;
	this.support = (document.getElementById && this.obj.runtimeStyle) ? 1 : 0;
	this.init = function() {
		if (this.support) {
			this.obj.src = this.spacer;
			this.obj.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.realSrc + "',sizingMethod='scale')";
		}
	}
}

function setPNGforIE_img(obj) {
	for (var i=0; i<pngImages.length; i++) {
		if (pngImages[i].obj == obj) return;
	}
	pngImages[pngImages.length] = new setPNGforIE_img_class(obj);
	pngImages[pngImages.length-1].init();
}
