﻿

// jquery no conflict. use $j or jQuery outside of ready function
var $j = jQuery.noConflict();


// jQuery document ready
jQuery(function ($) {

    // JS enabled
    $('html').addClass('js');

    var $body = $('body');

    // Few setups for IE6
    if (document.all) {
        //add class to drop downs and buttons. some extra verbosity to move the class of the current item up to the the ul to avoid IE6's multiple class bugginess (.blah.over)
        var IEulClass = "";
        $('#nav>li, button').hover(
   			function () { $(this).addClass('over').find('ul.cols').show(); IEulClass = $(this).attr("class"); $(this).parents("#nav").addClass(IEulClass); },
   			function () { $(this).removeClass('over').find('ul.cols').hide(); $(this).parents("#nav").removeClass(IEulClass); }
		);
    } // if document.all

    //pleasantNav('#nav>li');

    // use the label as default input text and hide the label
    $('#header input, #site-login input').inputSetter();

});  // document ready

/*
Input Setter - pdf, 2008 isite design
pull label and insert as field. clear with click.	

ex: $("#sitesearch input").inputSetter(1); // makes default text lowercase
$("#sitesearch input").inputSetter(); // no lowercasing

*/

jQuery.fn.inputSetter = function (lower) {
    return this.each(function () {
        var $input = jQuery(this);
        var $label = jQuery("label[for='" + $input.attr("id") + "']");
        var labeltext = lower && lower == 1 ? $label.text().toLowerCase() : $label.text();
        $label.hide();
        var inputtext = $input.val();
        if (inputtext.length == 0)
            $input.val(labeltext);
        $input.focus(function () { if (this.value == labeltext) { this.value = ""; } })
			  .blur(function () { if (!this.value.length) { this.value = labeltext; } });
    });
};

jQuery(function ($) {
    $('#password-clear').show();
    $('#password-password').hide();
    $('#password-clear').focus(function () {
        $('#password-clear').hide();
        $('#password-password').show();
        $('#password-password').focus();
    });
    $('#password-password').blur(function () {
        if ($('#password-password').val() == '') {
            $('#password-clear').show();
            $('#password-password').hide();
        }
    });
    $('.default-value').each(function () {
        var default_value = this.value;
        $(this).focus(function () {
            if (this.value == default_value) {
                this.value = '';
            }
        });
        $(this).blur(function () {
            if (this.value == '') {
                this.value = default_value;
            }
        });
    });
});

jQuery(function ($) {
    //Set Default State of each portfolio piece
    $(".paging").show();
    $(".paging a:first").addClass("active");

    //Get size of images, how many there are, then determin the size of the image reel.
    var imageWidth = $(".window").width();
    var imageSum = $(".image_reel img").size();
    var imageReelWidth = imageWidth * imageSum;

    //Adjust the image reel to its new size
    $(".image_reel").css({ 'width': imageReelWidth });

    //Paging + Slider Function
    rotate = function () {
        var triggerID = $active.attr("rel") - 1; //Get number of times to slide
        var image_reelPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide

        $(".paging a").removeClass('active'); //Remove all active class
        $active.addClass('active'); //Add active class (the $active is declared in the rotateSwitch function)

        //Slider Animation
        $(".image_reel").animate({
            left: -image_reelPosition
        }, 500);

    };

    //Rotation + Timing Event
    rotateSwitch = function () {
        play = setInterval(function () { //Set timer - this will repeat itself every 3 seconds
            $active = $('.paging a.active').next();
            if ($active.length === 0) { //If paging reaches the end...
                $active = $('.paging a:first'); //go back to first
            }
            rotate(); //Trigger the paging and slider function
        }, 7000); //Timer speed in milliseconds (3 seconds)
    };

    rotateSwitch(); //Run function on launch

    //On Hover
    $(".image_reel a").hover(function () {
        clearInterval(play); //Stop the rotation
    }, function () {
        rotateSwitch(); //Resume rotation
    });

    //On Click
    $(".paging a").click(function () {
        $active = $(this); //Activate the clicked paging
        //Reset Timer
        clearInterval(play); //Stop the rotation
        rotate(); //Trigger rotation immediately
        rotateSwitch(); // Resume rotation
        return false; //Prevent browser jump to link anchor
    });
});

/**
* Coin Slider - Unique jQuery Image Slider
* @version: 1.0 - (2010/04/04)
* @requires jQuery v1.2.2 or later 
* @author Ivan Lazarevic
* Examples and documentation at: http://workshop.rs/projects/coin-slider/
 
* Licensed under MIT licence:
*   http://www.opensource.org/licenses/mit-license.php
**/

(function ($) {
    var params = new Array; var order = new Array; var images = new Array; var links = new Array; var linksTarget = new Array; var titles = new Array; var interval = new Array; var imagePos = new Array; var appInterval = new Array; var squarePos = new Array; var reverse = new Array; $.fn.coinslider = $.fn.CoinSlider = function (options) {
        init = function (el) {
            order[el.id] = new Array(); images[el.id] = new Array(); links[el.id] = new Array(); linksTarget[el.id] = new Array(); titles[el.id] = new Array(); imagePos[el.id] = 0; squarePos[el.id] = 0; reverse[el.id] = 1; params[el.id] = $.extend({}, $.fn.coinslider.defaults, options); $.each($('#' + el.id + ' img'), function (i, item) { images[el.id][i] = $(item).attr('src'); links[el.id][i] = $(item).parent().is('a') ? $(item).parent().attr('href') : ''; linksTarget[el.id][i] = $(item).parent().is('a') ? $(item).parent().attr('target') : ''; titles[el.id][i] = $(item).next().is('span') ? $(item).next().html() : ''; $(item).hide(); $(item).next().hide(); }); $(el).css({ 'background-image': 'url(' + images[el.id][0] + ')', 'width': params[el.id].width, 'height': params[el.id].height, 'position': 'relative', 'background-position': 'top left' }).wrap("<div class='coin-slider' id='coin-slider-" + el.id + "' />"); $('#' + el.id).append("<div class='cs-title' id='cs-title-" + el.id + "' style='position: absolute; bottom:0; left: 0; z-index: 1000;'></div>"); $.setFields(el); if (params[el.id].navigation)
                $.setNavigation(el); $.transition(el, 0); $.transitionCall(el);
        }
        $.setFields = function (el) {
            tWidth = sWidth = parseInt(params[el.id].width / params[el.id].spw); tHeight = sHeight = parseInt(params[el.id].height / params[el.id].sph); counter = sLeft = sTop = 0; tgapx = gapx = params[el.id].width - params[el.id].spw * sWidth; tgapy = gapy = params[el.id].height - params[el.id].sph * sHeight; for (i = 1; i <= params[el.id].sph; i++) {
                gapx = tgapx; if (gapy > 0) { gapy--; sHeight = tHeight + 1; } else { sHeight = tHeight; }
                for (j = 1; j <= params[el.id].spw; j++) {
                    if (gapx > 0) { gapx--; sWidth = tWidth + 1; } else { sWidth = tWidth; }
                    order[el.id][counter] = i + '' + j; counter++; if (params[el.id].links)
                        $('#' + el.id).append("<a href='" + links[el.id][0] + "' class='cs-" + el.id + "' id='cs-" + el.id + i + j + "' style='width:" + sWidth + "px; height:" + sHeight + "px; float: left; position: absolute;'></a>"); else
                        $('#' + el.id).append("<div class='cs-" + el.id + "' id='cs-" + el.id + i + j + "' style='width:" + sWidth + "px; height:" + sHeight + "px; float: left; position: absolute;'></div>"); $("#cs-" + el.id + i + j).css({ 'background-position': -sLeft + 'px ' + (-sTop + 'px'), 'left': sLeft, 'top': sTop }); sLeft += sWidth;
                }
                sTop += sHeight; sLeft = 0;
            }
            $('.cs-' + el.id).mouseover(function () { $('#cs-navigation-' + el.id).show(); }); $('.cs-' + el.id).mouseout(function () { $('#cs-navigation-' + el.id).hide(); }); $('#cs-title-' + el.id).mouseover(function () { $('#cs-navigation-' + el.id).show(); }); $('#cs-title-' + el.id).mouseout(function () { $('#cs-navigation-' + el.id).hide(); }); if (params[el.id].hoverPause) { $('.cs-' + el.id).mouseover(function () { params[el.id].pause = true; }); $('.cs-' + el.id).mouseout(function () { params[el.id].pause = false; }); $('#cs-title-' + el.id).mouseover(function () { params[el.id].pause = true; }); $('#cs-title-' + el.id).mouseout(function () { params[el.id].pause = false; }); } 
        }; $.transitionCall = function (el) { clearInterval(interval[el.id]); delay = params[el.id].delay + params[el.id].spw * params[el.id].sph * params[el.id].sDelay; interval[el.id] = setInterval(function () { $.transition(el) }, delay); }
        $.transition = function (el, direction) {
            if (params[el.id].pause == true) return; $.effect(el); squarePos[el.id] = 0; appInterval[el.id] = setInterval(function () { $.appereance(el, order[el.id][squarePos[el.id]]) }, params[el.id].sDelay); $(el).css({ 'background-image': 'url(' + images[el.id][imagePos[el.id]] + ')' }); if (typeof (direction) == "undefined")
                imagePos[el.id]++; else
                if (direction == 'prev')
                    imagePos[el.id]--; else
                    imagePos[el.id] = direction; if (imagePos[el.id] == images[el.id].length) { imagePos[el.id] = 0; }
            if (imagePos[el.id] == -1) { imagePos[el.id] = images[el.id].length - 1; }
            $('.cs-button-' + el.id).removeClass('cs-active'); $('#cs-button-' + el.id + "-" + (imagePos[el.id] + 1)).addClass('cs-active'); if (titles[el.id][imagePos[el.id]]) { $('#cs-title-' + el.id).css({ 'opacity': 0 }).animate({ 'opacity': params[el.id].opacity }, params[el.id].titleSpeed); $('#cs-title-' + el.id).html(titles[el.id][imagePos[el.id]]); } else { $('#cs-title-' + el.id).css('opacity', 0); } 
        }; $.appereance = function (el, sid) {
            $('.cs-' + el.id).attr('href', links[el.id][imagePos[el.id]]).attr('target', linksTarget[el.id][imagePos[el.id]]); if (squarePos[el.id] == params[el.id].spw * params[el.id].sph) { clearInterval(appInterval[el.id]); return; }
            $('#cs-' + el.id + sid).css({ opacity: 0, 'background-image': 'url(' + images[el.id][imagePos[el.id]] + ')' }); $('#cs-' + el.id + sid).animate({ opacity: 1 }, 300); squarePos[el.id]++;
        }; $.setNavigation = function (el) {
            $(el).append("<div id='cs-navigation-" + el.id + "'></div>"); $('#cs-navigation-' + el.id).hide(); $('#cs-navigation-' + el.id).append("<a href='#' id='cs-prev-" + el.id + "' class='cs-prev'>prev</a>"); $('#cs-navigation-' + el.id).append("<a href='#' id='cs-next-" + el.id + "' class='cs-next'>next</a>"); $('#cs-prev-' + el.id).css({ 'position': 'absolute', 'top': params[el.id].height / 2 - 15, 'left': 0, 'z-index': 1001, 'line-height': '30px', 'opacity': params[el.id].opacity }).click(function (e) { e.preventDefault(); $.transition(el, 'prev'); $.transitionCall(el); }).mouseover(function () { $('#cs-navigation-' + el.id).show() }); $('#cs-next-' + el.id).css({ 'position': 'absolute', 'top': params[el.id].height / 2 - 15, 'right': 0, 'z-index': 1001, 'line-height': '30px', 'opacity': params[el.id].opacity }).click(function (e) { e.preventDefault(); $.transition(el); $.transitionCall(el); }).mouseover(function () { $('#cs-navigation-' + el.id).show() }); $("<div id='cs-buttons-" + el.id + "' class='cs-buttons'></div>").appendTo($('#coin-slider-' + el.id)); for (k = 1; k < images[el.id].length + 1; k++) { $('#cs-buttons-' + el.id).append("<a href='#' class='cs-button-" + el.id + "' id='cs-button-" + el.id + "-" + k + "'>" + k + "</a>"); }
            $.each($('.cs-button-' + el.id), function (i, item) { $(item).click(function (e) { $('.cs-button-' + el.id).removeClass('cs-active'); $(this).addClass('cs-active'); e.preventDefault(); $.transition(el, i); $.transitionCall(el); }) }); $('#cs-navigation-' + el.id + ' a').mouseout(function () { $('#cs-navigation-' + el.id).hide(); params[el.id].pause = false; }); $("#cs-buttons-" + el.id).css({ 'left': '50%', 'margin-left': -images[el.id].length * 15 / 2 - 5, 'position': 'relative' });
        }
        $.effect = function (el) {
            effA = ['random', 'swirl', 'rain', 'straight']; if (params[el.id].effect == '')
                eff = effA[Math.floor(Math.random() * (effA.length))]; else
                eff = params[el.id].effect; order[el.id] = new Array(); if (eff == 'random') {
                counter = 0; for (i = 1; i <= params[el.id].sph; i++) { for (j = 1; j <= params[el.id].spw; j++) { order[el.id][counter] = i + '' + j; counter++; } }
                $.random(order[el.id]);
            }
            if (eff == 'rain') { $.rain(el); }
            if (eff == 'swirl')
                $.swirl(el); if (eff == 'straight')
                $.straight(el); reverse[el.id] *= -1; if (reverse[el.id] > 0) { order[el.id].reverse(); } 
        }
        $.random = function (arr) { var i = arr.length; if (i == 0) return false; while (--i) { var j = Math.floor(Math.random() * (i + 1)); var tempi = arr[i]; var tempj = arr[j]; arr[i] = tempj; arr[j] = tempi; } }
        $.swirl = function (el) {
            var n = params[el.id].sph; var m = params[el.id].spw; var x = 1; var y = 1; var going = 0; var num = 0; var c = 0; var dowhile = true; while (dowhile) {
                num = (going == 0 || going == 2) ? m : n; for (i = 1; i <= num; i++) { order[el.id][c] = x + '' + y; c++; if (i != num) { switch (going) { case 0: y++; break; case 1: x++; break; case 2: y--; break; case 3: x--; break; } } }
                going = (going + 1) % 4; switch (going) { case 0: m--; y++; break; case 1: n--; x++; break; case 2: m--; y--; break; case 3: n--; x--; break; }
                check = $.max(n, m) - $.min(n, m); if (m <= check && n <= check)
                    dowhile = false;
            } 
        }
        $.rain = function (el) {
            var n = params[el.id].sph; var m = params[el.id].spw; var c = 0; var to = to2 = from = 1; var dowhile = true; while (dowhile) {
                for (i = from; i <= to; i++) { order[el.id][c] = i + '' + parseInt(to2 - i + 1); c++; }
                to2++; if (to < n && to2 < m && n < m) { to++; }
                if (to < n && n >= m) { to++; }
                if (to2 > m) { from++; }
                if (from > to) dowhile = false;
            } 
        }
        $.straight = function (el) { counter = 0; for (i = 1; i <= params[el.id].sph; i++) { for (j = 1; j <= params[el.id].spw; j++) { order[el.id][counter] = i + '' + j; counter++; } } }
        $.min = function (n, m) { if (n > m) return m; else return n; }
        $.max = function (n, m) { if (n < m) return m; else return n; }
        this.each(function () { init(this); });
    }; $.fn.coinslider.defaults = { width: 565, height: 290, spw: 7, sph: 5, delay: 3000, sDelay: 30, opacity: 0.7, titleSpeed: 500, effect: '', navigation: true, links: true, hoverPause: true };
})(jQuery);

/*
* jQuery Cycle Lite Plugin
* http://malsup.com/jquery/cycle/lite/
* Copyright (c) 2008-2011 M. Alsup
* Version: 1.1 (03/07/2011)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Requires: jQuery v1.3.2 or later
*/
; (function ($) {

    var ver = 'Lite-1.1';

    $.fn.cycle = function (options) {
        return this.each(function () {
            options = options || {};

            if (this.cycleTimeout) clearTimeout(this.cycleTimeout);
            this.cycleTimeout = 0;
            this.cyclePause = 0;

            var $cont = $(this);
            var $slides = options.slideExpr ? $(options.slideExpr, this) : $cont.children();
            var els = $slides.get();
            if (els.length < 2) {
                window.console && console.log('terminating; too few slides: ' + els.length);
                return; // don't bother
            }

            // support metadata plugin (v1.0 and v2.0)
            var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});

            opts.before = opts.before ? [opts.before] : [];
            opts.after = opts.after ? [opts.after] : [];
            opts.after.unshift(function () { opts.busy = 0; });

            // allow shorthand overrides of width, height and timeout
            var cls = this.className;
            opts.width = parseInt((cls.match(/w:(\d+)/) || [])[1]) || opts.width;
            opts.height = parseInt((cls.match(/h:(\d+)/) || [])[1]) || opts.height;
            opts.timeout = parseInt((cls.match(/t:(\d+)/) || [])[1]) || opts.timeout;

            if ($cont.css('position') == 'static')
                $cont.css('position', 'relative');
            if (opts.width)
                $cont.width(opts.width);
            if (opts.height && opts.height != 'auto')
                $cont.height(opts.height);

            var first = 0;
            $slides.css({ position: 'absolute', top: 0, left: 0 }).each(function (i) {
                $(this).css('z-index', els.length - i)
            });

            $(els[first]).css('opacity', 1).show(); // opacity bit needed to handle reinit case
            if ($.browser.msie) els[first].style.removeAttribute('filter');

            if (opts.fit && opts.width)
                $slides.width(opts.width);
            if (opts.fit && opts.height && opts.height != 'auto')
                $slides.height(opts.height);
            if (opts.pause)
                $cont.hover(function () { this.cyclePause = 1; }, function () { this.cyclePause = 0; });

            var txFn = $.fn.cycle.transitions[opts.fx];
            txFn && txFn($cont, $slides, opts);

            $slides.each(function () {
                var $el = $(this);
                this.cycleH = (opts.fit && opts.height) ? opts.height : $el.height();
                this.cycleW = (opts.fit && opts.width) ? opts.width : $el.width();
            });

            if (opts.cssFirst)
                $($slides[first]).css(opts.cssFirst);

            if (opts.timeout) {
                // ensure that timeout and speed settings are sane
                if (opts.speed.constructor == String)
                    opts.speed = { slow: 600, fast: 200}[opts.speed] || 400;
                if (!opts.sync)
                    opts.speed = opts.speed / 2;
                while ((opts.timeout - opts.speed) < 250)
                    opts.timeout += opts.speed;
            }
            opts.speedIn = opts.speed;
            opts.speedOut = opts.speed;

            opts.slideCount = els.length;
            opts.currSlide = first;
            opts.nextSlide = 1;

            // fire artificial events
            var e0 = $slides[first];
            if (opts.before.length)
                opts.before[0].apply(e0, [e0, e0, opts, true]);
            if (opts.after.length > 1)
                opts.after[1].apply(e0, [e0, e0, opts, true]);

            if (opts.click && !opts.next)
                opts.next = opts.click;
            if (opts.next)
                $(opts.next).bind('click', function () { return advance(els, opts, opts.rev ? -1 : 1) });
            if (opts.prev)
                $(opts.prev).bind('click', function () { return advance(els, opts, opts.rev ? 1 : -1) });

            if (opts.timeout)
                this.cycleTimeout = setTimeout(function () {
                    go(els, opts, 0, !opts.rev)
                }, opts.timeout + (opts.delay || 0));
        });
    };

    function go(els, opts, manual, fwd) {
        if (opts.busy) return;
        var p = els[0].parentNode, curr = els[opts.currSlide], next = els[opts.nextSlide];
        if (p.cycleTimeout === 0 && !manual)
            return;

        if (manual || !p.cyclePause) {
            if (opts.before.length)
                $.each(opts.before, function (i, o) { o.apply(next, [curr, next, opts, fwd]); });
            var after = function () {
                if ($.browser.msie)
                    this.style.removeAttribute('filter');
                $.each(opts.after, function (i, o) { o.apply(next, [curr, next, opts, fwd]); });
            };

            if (opts.nextSlide != opts.currSlide) {
                opts.busy = 1;
                $.fn.cycle.custom(curr, next, opts, after);
            }
            var roll = (opts.nextSlide + 1) == els.length;
            opts.nextSlide = roll ? 0 : opts.nextSlide + 1;
            opts.currSlide = roll ? els.length - 1 : opts.nextSlide - 1;
        }
        if (opts.timeout)
            p.cycleTimeout = setTimeout(function () { go(els, opts, 0, !opts.rev) }, opts.timeout);
    };

    // advance slide forward or back
    function advance(els, opts, val) {
        var p = els[0].parentNode, timeout = p.cycleTimeout;
        if (timeout) {
            clearTimeout(timeout);
            p.cycleTimeout = 0;
        }
        opts.nextSlide = opts.currSlide + val;
        if (opts.nextSlide < 0) {
            opts.nextSlide = els.length - 1;
        }
        else if (opts.nextSlide >= els.length) {
            opts.nextSlide = 0;
        }
        go(els, opts, 1, val >= 0);
        return false;
    };

    $.fn.cycle.custom = function (curr, next, opts, cb) {
        var $l = $(curr), $n = $(next);
        $n.css(opts.cssBefore);
        var fn = function () { $n.animate(opts.animIn, opts.speedIn, opts.easeIn, cb) };
        $l.animate(opts.animOut, opts.speedOut, opts.easeOut, function () {
            $l.css(opts.cssAfter);
            if (!opts.sync) fn();
        });
        if (opts.sync) fn();
    };

    $.fn.cycle.transitions = {
        fade: function ($cont, $slides, opts) {
            opts.cssBefore = { opacity: 0 };
            opts.animOut = { opacity: 0 };
            opts.animIn = { opacity: 1 };
        }
    };

    $.fn.cycle.ver = function () { return ver; };

    // @see: http://malsup.com/jquery/cycle/lite/
    $.fn.cycle.defaults = {
        fx: 'fade',
        timeout: 4000,
        speed: 1000,
        next: null,
        prev: null,
        before: null,
        after: null,
        height: 'auto',
        sync: 1,
        fit: 0,
        pause: 0,
        delay: 0,
        slideExpr: null,
        cssBefore: {},
        cssAfter: {},
        animIn: {},
        animOut: {}
    };

})(jQuery);

// Validates login form
function validateForm() {
    var error = 0;
    var msg = "";

    if (document.getElementById('userName').value == "Username") { msg += "- Username Reqiured\n"; error++; }
    if (document.getElementById('password-password').value == "") { msg += "- Password Required\n"; error++; }

    // Display msg || submit form
    if (error == 0) {
        return true;
    }
    else {
        alert("Please fix following errors\n" + msg);
        return false;
    }
}

// Displays Other field in form
function displayOtherField(obj, label, textbox, validationControl) {
    txt = obj.options[obj.selectedIndex].value;
    document.getElementById(label).style.display = 'none';
    document.getElementById(textbox).style.display = 'none';
    if (txt == "Other") {
        document.getElementById(label).style.display = 'block';
        document.getElementById(textbox).style.display = 'block';
        ValidatorEnable(document.getElementById(validationControl), true);
    }
} 


// Gets current year for footer copyright
function getYear() {
    var d = new Date();
    yr = d.getFullYear();
    document.write(yr);
}

// IE6 fixes
// make sure IE has the abbr and acronym tag
if (document.all) {
    document.createElement("abbr");
    document.createElement("acronym");
}
// prevent IE6 flicker
try { document.execCommand('BackgroundImageCache', false, true); } catch (e) { }

// PNG transparency in Win IE 5.5 & 6
function correctPNG() {
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version >= 5.5) && (document.body.filters)) {
        for (var i = 0; i < document.images.length; i++) {
            var img = document.images[i]
            var imgName = img.src.toUpperCase()
            if (imgName.substring(imgName.length - 3, imgName.length) == "PNG") {
                var imgID = (img.id) ? "id='" + img.id + "' " : ""
                var imgClass = (img.className) ? "class='" + img.className + "' " : ""
                var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
                var imgStyle = "display:inline-block;" + img.style.cssText
                if (img.align == "left") imgStyle = "float:left;" + imgStyle
                if (img.align == "right") imgStyle = "float:right;" + imgStyle
                if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
                var strNewHTML = "<span " + imgID + imgClass + imgTitle
                    + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
                    + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                    + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
                img.outerHTML = strNewHTML
                i = i - 1
            }
        }
    }
}
window.attachEvent("onload", correctPNG);
