/*#########################################################################################
########################################### -fixPNG-##########################################
##########################################################################################*/
function fixPNG(element) {
if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) {
var src;
if (element.tagName=='IMG') {
if (/\.png\?*/.test(element.src)) {
src = element.src;
element.src = "/images/0.gif"; }}
else {
src = element.currentStyle.backgroundImage.match(/url\("(.+\.png\?*)"\)/i)
if (src) {
src = src[1];
element.runtimeStyle.backgroundImage="none"; }}
if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='crop')"; 
}
}

/* #########################################################################################
########################################### -vis-##########################################
########################################################################################## */

function fixSize(obj) {
	if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) {		
		if(obj.offsetWidth!=0&&obj.offsetWidth%2!=0&&obj.style.paddingRight=='1px'){
			obj.style.paddingRight='0px';
		}
		else if(obj.offsetWidth!=0&&obj.offsetWidth%2!=0){
			obj.style.paddingRight='1px';
		}
		
		if(obj.offsetHeight!=0&&obj.offsetHeight%2!=0&&obj.style.paddingBottom=='1px') 	{
			obj.style.paddingBottom='0px';	
		}			
		else if(obj.offsetHeight!=0&&obj.offsetHeight%2!=0){
			obj.style.paddingBottom='1px';
		}
	}
}

/* getComputedStyle Фикс для ИЕ // юзается в тултипе */
if (!window.getComputedStyle) {
    window.getComputedStyle = function(el, pseudo) {
        this.el = el;
        this.getPropertyValue = function(prop) {
            var re = /(\-([a-z]){1})/g;
            if (prop == 'float') prop = 'styleFloat';
            if (re.test(prop)) {
                prop = prop.replace(re, function () {
                    return arguments[2].toUpperCase();
                });
            }
            return el.currentStyle[prop] ? el.currentStyle[prop] : null;
        }
        return this;
    }
}
