
var scoyoHelper = (function () {
	var userAgent, browserVersion, browser;
	
	userAgent = navigator.userAgent.toLowerCase();
	browserVersion = (userAgent.match( /.+(?:ox|on|ra|ie|me)[\/: ]([\d.]+)/ ) || [])[1];
	browserMajorVersion = parseInt(browserVersion, 10)	
	browser = {
		version: browserVersion,
		majorVersion: browserMajorVersion,
		chrome: /chrome/.test( userAgent ),
		safari: /webkit/.test( userAgent ) && !/chrome/.test( userAgent ),
		opera: /opera/.test( userAgent ),
		msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
		mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
	};
	
    function showLayer(id) {
        var layer = $(id);
        if (layer) {
            layer.style.display = 'block';
        }
    }
    
    function hideLayer(id) {
        var layer = $(id);
        if (layer) {
            layer.style.display = 'none';
        }
    }
    
    
    return {
		browser: browser,
        showLayer: showLayer,
        hideLayer: hideLayer
    };
    
}());

var scoyo = (function () {
    
    function openDesktop(formname) {
        var newWin = window.open("about:blank", "scoyodesktop", "height=600,width=700,left=0,top=0,status=no,toolbar=no,location=no,directories=no,resizable=yes,menubar=no,titlebar=no");
        
        if(newWin != null){
            document.forms[formname].submit();
            newWin.resizeTo(screen.availWidth, screen.availHeight);
            newWin.focus();
        }
    }
    
    function productDetails(url) {
        var newWin = window.open(url, 'productdetails', 'width=800, height=600, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes');
        if (window.focus) {
            newWin.focus();
        }
        return false;
    }
    
    function openPrintPage(url) {
        var printWin = window.open(url, 'printpage', 'width=800, height=700, location=no, menubar=yes, status=yes, toolbar=yes, scrollbars=yes');
        if (window.focus) {
            printWin.focus();
        }
        return false;
    }
    
    function doOnLoad(o) {
        if (this.readyState === 'complete') {
            setTimeout(o.f, o.time);
        }
        else {
            if (window.onload !== null) {
                setTimeout(o.f, o.time);
            }
            else {
                setTimeout(o.f, o.time);
            }
        }
    }
    
    function prepareRedirect(targetLocation, timeout) {
        var o = {
            f: function () {
                setTimeout('window.location = "' + targetLocation + '"', timeout);
            },
            time: timeout
        };
        doOnLoad(o);
    }
    
    function showElementOnLoad(elementId, timeout) {
        var o = {
            f: function () {
                $(elementId).style.display = 'inline';
            },
            time: timeout
        };
        doOnLoad(o);
    }
    
    function hideElementOnLoad(elementId, timeout) {
        var o = {
            f: function () {
                $(elementId).hide();
            },
            time: timeout
        };
        doOnLoad(o);
    }
    
    function toFrontElementOnLoad(elementId, timeout) {
        var o = {
            f: function () {
                $(elementId).style.zIndex = '100';
            },
            time: timeout
        };
        doOnLoad(o);
    }
    
    function checkIfNonEmpty(id, value) {
        if (value && value.length > 0) {
            $(id).checked = true;
        }
    }
    
    
    return {
        openDesktop: openDesktop,
        productDetails: productDetails,
        openPrintPage: openPrintPage,
        prepareRedirect: prepareRedirect,
        showElementOnLoad: showElementOnLoad,
        hideElementOnLoad: hideElementOnLoad,
        checkIfNonEmpty: checkIfNonEmpty,
        toFrontElementOnLoad: toFrontElementOnLoad
    };
    
}());

var scoyoEmailcheck = (function () {

    var em_didYouMean = "", 
    em_emailInput1 = "emailAddress", 
    em_emailInput2 = "emailAddress2",
    em_emailOK1 = "emailOK1",
    em_emailOK2 = "emailOK2",
    em_emailFalse1 = "emailFalse1",
    em_emailFalse2 = "emailFalse2",
    em_providerHint = "providerHint",
    em_emailpat = /^[A-Za-z0-9_\.\-]+@([\w\-]+\.)+[A-Za-z0-9]{2,}$/,
    em_email2OldValue = "",
    em_knownProviders = ["aol.com", "arcor.de", "bertelsmann.de", "freenet.de", "gmail.com", "gmx.at", "gmx.ch", "gmx.de", "gmx.net", "googlemail.com", "googlemail.de", "hotmail.com", "hotmail.de", "live.de", "msn.com", "online.de", "scoyo.com", "scoyo.de", "t-online.de", "web.de", "yahoo.com", "yahoo.de"];
    
    function setDidYouMean(didYouMean) {
        em_didYouMean = didYouMean;
    }
    
    function getSmallestValue(x, y, z) {
        return ((x < y && x < z) ? x : ((y < x && y < z) ? y : z));
    }
    
    function getDistance(a, b) {
        var cost,
        m = a.length,
        n = b.length,
        c, 
        o,
        r,
        cc,
        i,
        j;
        
        if (m < n) {
            c = a;
            a = b;
            b = c;
            o = m;
            m = n;
            n = o;
        }
        
        r = new Array();
        r[0] = new Array();
        
        for (cc = 0; cc < n + 1; cc++) {
            r[0][cc] = cc;
        }
        
        for (i = 1; i < m + 1; i++) {
            r[i] = new Array();
            r[i][0] = i;
            
            for (j = 1; j < n + 1; j++) {
                cost = ((a.charAt(i - 1) === b.charAt(j - 1)) ? 0 : 1);
                r[i][j] = getSmallestValue(r[i - 1][j] + 1, r[i][j - 1] + 1, r[i - 1][j - 1] + cost);
            }
        }
        
        return r[m][n];
    }
    
    function checkProviderSpelling(emailField) {
        var email = emailField.value,
        atIsAt = email.indexOf("@"),
        probableAddress = "",
        hadMatch = false,
        hint = $(em_providerHint),
        i, 
        emailDomain, 
        providerDistance,
        kPLength;
        
        if (hint === null) {
            return false;
        }
        if (atIsAt > -1) {
            emailDomain = email.substr(atIsAt + 1);
            
            for (i = 0, kPLength = em_knownProviders.length; i < kPLength; i++) {
                providerDistance = getDistance(emailDomain, em_knownProviders[i]);
                
                if (providerDistance === 0) {
                    hadMatch = true;
                    hint.update('&nbsp;');
                    hint.setStyle({
                        display: 'none'
                    });
                    break;
                }
                else if (providerDistance > 0 && providerDistance <= 2) {
                    probableAddress = email.substr(0, atIsAt + 1) + em_knownProviders[i];
                }
            }
            if (!hadMatch && probableAddress.length > 0) {
                var info =em_didYouMean +
                " " +
                "<span id=\"providerHintAddress\" onclick=\"$('emailAddress').value = '" +
                probableAddress +
                "';\">" +
                probableAddress +
                "</span> ?";
                hint.update(info);
                hint.setStyle({
                    display: 'block'
                });
                return true;
            }
            else {
            	hint.setStyle({
                        display: 'none'
                    });
                return false;
            }
        }
    }
    
    function checkEmailSyntax(emailField) {
        if (emailField.value.match(em_emailpat)) {
            checkProviderSpelling(emailField);
            return true;
        }
        else {
            return false;
        }
    }
    
    function compareEmails() {
        var email1,
        email2,
        emailFalseField,
        emailOkField;
        
        
        if (document.getElementById(em_emailInput1)) {
            email1 = document.getElementById(em_emailInput1);
        }
        else {
            return false;
        }
        if (document.getElementById(em_emailInput2)) {
            email2 = document.getElementById(em_emailInput2);
        }
        else {
            return false;
        }
        if (document.getElementById(em_emailFalse2)) {
            emailFalseField = document.getElementById(em_emailFalse2);
        }
        else {
            return false;
        }
        if (document.getElementById(em_emailOK2)) {
            emailOkField = document.getElementById(em_emailOK2);
        }
        else {
            return false;
        }
        
        if (email1 !== null && email2 !== null && email1.value === email2.value) {
            emailFalseField.style.display = "none";
            if (email2.value !== "") {
                emailOkField.style.display = "inline";
            }
            return true;
        }
        else {
            emailOkField.style.display = "none";
            if (email2 !== null && email2.value !== "") {
                emailFalseField.style.display = "inline";
            }
            return false;
        }
    }
    
    function checkContentEmail1(emailField, whoCalled) {
        var callWasOnBlur,
        emailFalseField,
        emailOkField;
        
        if (emailField === null) {
            return;
        }
        callWasOnBlur = (whoCalled === 'onblur') ? true : false;
        
        compareEmails();
        
        if (document.getElementById(em_emailFalse1)) {
            emailFalseField = document.getElementById(em_emailFalse1);
        }
        else {
            return;
        }
        if (document.getElementById(em_emailOK1)) {
            emailOkField = document.getElementById(em_emailOK1);
        }
        else {
            return;
        }
        
        if (emailField.value === "") {
            /* hide error if field is empty */
            emailFalseField.style.display = "none";
            emailOkField.style.display = "none";
            return;
        }
        
        if (checkEmailSyntax(emailField)) {
            emailFalseField.style.display = "none";
            emailOkField.style.display = "inline";
            return true;
        }
        else {
            if (emailOkField.style.display !== "none" || callWasOnBlur) {
                /* only display error onblur or if it was right before */
                emailFalseField.style.display = "inline";
            }
            emailOkField.style.display = "none";
            return false;
        }
    }
    
    function checkContentEmail2(emailField, submittedValue) {
        if (emailField === null) {
            return;
        }
        
        /* prevent paste
         if (!em_email2OldValue) {
         em_email2OldValue = submittedValue;
         }
         if (em_email2OldValue.length + 3 < emailField.value.length) {
         emailField.value = em_email2OldValue;
         }
         em_email2OldValue = emailField.value;
         */
        compareEmails();
    }
    
    return {
        checkContentEmail1: checkContentEmail1,
        checkContentEmail2: checkContentEmail2,
        setDidYouMean: setDidYouMean,
        checkEmailSyntax: checkEmailSyntax
    };
}());

var scoyoSchoolContext = (function () {
    
    function setClasses(countrySelect, regionSelect, schoolTypeSelect, classSelect) {
        var countryCode = countrySelect.value, country, cn, regionCode = regionSelect.value, region, r, schoolTypeUid = schoolTypeSelect.value, schoolType, s, c, cl;
        
        for (cn in countries) {
            if (countries.hasOwnProperty(cn)) {
                if (countries[cn].code === countryCode) {
                    country = countries[cn];
                }
            }
        }
        
        if (typeof(country) === "undefined") {
            regionSelect.length = 1;
            schoolTypeSelect.length = 1;
            classSelect.length = 1;
            return;
        }
        
        for (r in country.regions) {
            if (country.regions.hasOwnProperty(r)) {
                if (country.regions[r].code === regionCode) {
                    region = country.regions[r];
                }
            }
        }
        
        if (typeof(region) === "undefined") {
            schoolTypeSelect.length = 1;
            classSelect.length = 1;
            return;
        }
        
        for (s in region.schoolTypes) {
            if (region.schoolTypes.hasOwnProperty(s)) {
                if (region.schoolTypes[s].uid === schoolTypeUid) {
                    schoolType = region.schoolTypes[s];
                }
            }
        }
        
        if (typeof(schoolType) === "undefined") {
            classSelect.length = 1;
            return;
        }
        
        if (region.schoolTypes.length !== 0) {
            classSelect.length = 1;
            
            for (c in schoolType.classes) {
                if (schoolType.classes.hasOwnProperty(c)) {
                    cl = schoolType.classes[c];
                    classSelect.options[classSelect.length] = new Option(cl, cl);
                }
            }
        }
    }

    function setSchooltypes(countrySelect, regionSelect, schoolTypeSelect, classSelect) {
        var countryCode = countrySelect.value, country, cn, regionCode = regionSelect.value, region, r, s, st;
        
        for (cn in countries) {
            if (countries.hasOwnProperty(cn)) {
                if (countries[cn].code === countryCode) {
                    country = countries[cn];
                }
            }
        }
        
        if (typeof(country) === "undefined") {
            regionSelect.length = 1;
            schoolTypeSelect.length = 1;
            classSelect.length = 1;
            return;
        }
        
        for (r in country.regions) {
            if (country.regions.hasOwnProperty(r)) {
                if (country.regions[r].code === regionCode) {
                    region = country.regions[r];
                }
            }
        }
        
        if (typeof(region) === "undefined") {
            schoolTypeSelect.length = 1;
            classSelect.length = 1;
            return;
        }
        
        if (region.schoolTypes.length !== 0) {
            schoolTypeSelect.length = 1;
            classSelect.length = 1;
            
            for (s in region.schoolTypes) {
                if (region.schoolTypes.hasOwnProperty(s)) {
                    st = region.schoolTypes[s];
                    schoolTypeSelect.options[schoolTypeSelect.length] = new Option(st.text, st.uid);
                }
            }
            
            if (schoolTypeSelect.options.length === 2) {
                schoolTypeSelect.setStyle({
                    visibility: 'hidden'
                });
                $('schoolType-label').setStyle({
                    visibility: 'hidden'
                });
                schoolTypeSelect.selectedIndex = 1;
                setClasses(countrySelect, regionSelect, schoolTypeSelect, classSelect);
            }
            else {
                schoolTypeSelect.setStyle({
                    visibility: 'visible'
                });
                $('schoolType-label').setStyle({
                    visibility: 'visible'
                });
            }
        }
    }
    
    function setRegions(countrySelect, regionSelect, schoolTypeSelect, classSelect) {
        var countryCode = countrySelect.value, country, cn, r, re, s, st;
        
        for (cn in countries) {
            if (countries.hasOwnProperty(cn)) {
                if (countries[cn].code === countryCode) {
                    country = countries[cn];
                }
            }
        }
        
        if (typeof(country) === "undefined") {
            regionSelect.length = 1;
            schoolTypeSelect.length = 1;
            classSelect.length = 1;
            
            regionSelect.setStyle({
                visibility: 'visible'
            });
            $('region-label').setStyle({
                visibility: 'visible'
            });
            schoolTypeSelect.setStyle({
                visibility: 'visible'
            });
            $('schoolType-label').setStyle({
                visibility: 'visible'
            });
            
            return;
        }
        
        if (country.regions.length !== 0) {
            regionSelect.length = 1;
            schoolTypeSelect.length = 1;
            classSelect.length = 1;
            
            for (r in country.regions) {
                if (country.regions.hasOwnProperty(r)) {
                    re = country.regions[r];
                    regionSelect.options[regionSelect.length] = new Option(re.name, re.code);
                }
            }
            
            if (regionSelect.options.length === 2) {
                regionSelect.setStyle({
                    visibility: 'hidden'
                });
                $('region-label').setStyle({
                    visibility: 'hidden'
                });
                regionSelect.selectedIndex = 1;
                setSchooltypes(countrySelect, regionSelect, schoolTypeSelect, classSelect);
            }
            else {
                regionSelect.setStyle({
                    visibility: 'visible'
                });
                $('region-label').setStyle({
                    visibility: 'visible'
                });
                schoolTypeSelect.setStyle({
                    visibility: 'visible'
                });
                $('schoolType-label').setStyle({
                    visibility: 'visible'
                });
            }
        }
    }
    
    return {
        setRegions: setRegions,
        setSchooltypes: setSchooltypes,
        setClasses: setClasses
    };
}());

var scoyoRegistrationHelper = (function () {

    function disableLinks() {
        var i, theLinks;
        
        theLinks = document.links;
        for (i = 0; i < theLinks.length; i++) {
            if (theLinks[i].href.toString().indexOf("/registration") !== -1 || theLinks[i].href.toString().indexOf("/registration") !== -1) {
                theLinks[i].onclick = new Function("return false;");
            }
        }
    }
    
    function setPackbox(Packbox_id, Size) {
        var p, packArray = document.getElementById("packboxes").getElementsByTagName('div');
        if (packArray) {
            for (p = 0; p <= packArray.length - 1; p++) {
                if (packArray[p].id === 'pack' + "_" + Packbox_id) {
                    packArray[p].className = 'packboxActive_' + Size;
                }
                else {
                    if (packArray[p].id.match('pack_')) {
                        packArray[p].className = 'packbox_' + Size;
                    }
                }
            }
        }
    }
    
    function setRegTab(tab_id, menu_id) {
        var d, 
        bowserVersion = navigator.appVersion.split(';'),
        dArray = document.getElementById(tab_id).getElementsByTagName('div');
        
        if (bowserVersion[1] === ' MSIE 6.0') {
            // Switch to non JScript tab selection. IE6 doesn't set outer div size correct. 
            return true;
        }
        
        if (dArray) {
            for (d = 0; d <= dArray.length - 1; d++) {
                // divs of tab
                if (dArray[d].id.match(tab_id + '_menu')) {
                    if (dArray[d].id === tab_id + '_menu' + menu_id) {
                        dArray[d].className = 'regActive';
                    }
                    else {
                        dArray[d].className = 'reginActive';
                    }
                }
                
                // divs of content
                if (dArray[d].id.match(tab_id + '_content')) {
                    if (dArray[d].id === tab_id + '_content' + menu_id) {
                        dArray[d].style.display = 'block';
                    }
                    else {
                        dArray[d].style.display = 'none';
                    }
                }
            }
        }
        return false;
    }
    
    function showTypeTab(tabId, menuId, typeId) {
        var bowserVersion = navigator.appVersion.split(';');
        if (bowserVersion[1] === " MSIE 6.0") {
            return true;
        }
        setRegTab(tabId, menuId);
        $("showButton_" + typeId).hide();
        $("hideButton_" + typeId).show();
        $("type_" + typeId).show();
        return false;
    }
    
    function hideTypeTab(tabId, menuId, typeId) {
        var bowserVersion = navigator.appVersion.split(';');
        if (bowserVersion[1] === " MSIE 6.0") {
            return true;
        }
        setRegTab(tabId, menuId);
        $("hideButton_" + typeId).hide();
        $("showButton_" + typeId).show();
        $("type_" + typeId).hide();
        return false;
    }
    
    return {
        disableLinks: disableLinks,
        setPackbox: setPackbox,
        setRegTab: setRegTab,
        showTypeTab: showTypeTab,
        hideTypeTab: hideTypeTab
    };
}());

var scoyoMagnoliaHelper = (function () {

    function showCharacterDesc(id) {
        var d, dArray = document.getElementById('content').getElementsByTagName('div'), flash2 = document.getElementById('flash2'), familieBox_bottom = document.getElementById('familieBoxBottom');
        
        if (flash2) {
            flash2.className = 'flash2_v2';
        }
        
        if (familieBox_bottom) {
            familieBox_bottom.style.display = 'block';
        }
        
        if (dArray) {
            for (d = 0; d <= dArray.length - 1; d++) {
                if (dArray[d].className === 'familieBox') {
                    if (dArray[d].id === 'familieBox' + id) {
                        dArray[d].style.display = 'block';
                    }
                    else {
                        dArray[d].style.display = 'none';
                    }
                }
            }
        }
        
        sIFR.replaceElement(named({
            sSelector: "body #content h5.cc" + id,
            sFlashSrc: "./style/sIFR/montrealheavy.swf",
            sColor: "#009EE1",
            sLinkColor: "#000000",
            sBgColor: "#FFFFFF",
            sHoverColor: "#CCCCCC",
            sCase: "upper",
            sWmode: "transparent",
            nPaddingTop: 0,
            nPaddingBottom: 0,
            sFlashVars: "textalign=left&offsetTop=0"
        }));
    }
    
    return {
        showCharacterDesc: showCharacterDesc
    };
}());


// This was: iepngfix_tilebg.js
// IE5.5+ PNG Alpha Fix v2.0 Alpha: Background Tiling Support
// (c) 2008 Angus Turnbull http://www.twinhelix.com

// This is licensed under the GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/

var IEPNGFix = window.IEPNGFix ||
{};

IEPNGFix.tileBG = function (elm, pngSrc, ready) {
    // Params: A reference to a DOM element, the PNG src file pathname, and a
    // hidden "ready-to-run" passed when called back after image preloading.
    
    var data = this.data[elm.uniqueID], elmW = Math.max(elm.clientWidth, elm.scrollWidth), elmH = Math.max(elm.clientHeight, elm.scrollHeight), bgX = elm.currentStyle.backgroundPositionX, bgY = elm.currentStyle.backgroundPositionY, bgR = elm.currentStyle.backgroundRepeat;
    
    // Cache of DIVs created per element, and image preloader/data.
    if (!data.tiles) {
        data.tiles = {
            elm: elm,
            src: '',
            cache: [],
            img: new Image(),
            old: {}
        };
    }
    var tiles = data.tiles, pngW = tiles.img.width, pngH = tiles.img.height;
    
    if (pngSrc) {
        if (!ready && pngSrc != tiles.src) {
            // New image? Preload it with a callback to detect dimensions.
            tiles.img.onload = function () {
                this.onload = null;
                IEPNGFix.tileBG(elm, pngSrc, 1);
            };
            return tiles.img.src = pngSrc;
        }
    }
    else {
        // No image?
        if (tiles.src) 
            ready = 1;
        pngW = pngH = 0;
    }
    tiles.src = pngSrc;
    
    if (!ready && elmW == tiles.old.w && elmH == tiles.old.h &&
    bgX == tiles.old.x &&
    bgY == tiles.old.y &&
    bgR == tiles.old.r) {
        return;
    }
    
    // Convert English and percentage positions to pixels.
    var pos = {
        top: '0%',
        left: '0%',
        center: '50%',
        bottom: '100%',
        right: '100%'
    }, x, y, pc;
    x = pos[bgX] || bgX;
    y = pos[bgY] || bgY;
    if (pc = x.match(/(\d+)%/)) {
        x = Math.round((elmW - pngW) * (parseInt(pc[1]) / 100));
    }
    if (pc = y.match(/(\d+)%/)) {
        y = Math.round((elmH - pngH) * (parseInt(pc[1]) / 100));
    }
    x = parseInt(x);
    y = parseInt(y);
    
    // Handle backgroundRepeat.
    var repeatX = {
        'repeat': 1,
        'repeat-x': 1
    }[bgR], repeatY = {
        'repeat': 1,
        'repeat-y': 1
    }[bgR];
    if (repeatX) {
        x %= pngW;
        if (x > 0) 
            x -= pngW;
    }
    if (repeatY) {
        y %= pngH;
        if (y > 0) 
            y -= pngH;
    }
    
    // Go!
    this.hook.enabled = 0;
    if (!({
        relative: 1,
        absolute: 1
    }[elm.currentStyle.position])) {
        elm.style.position = 'relative';
    }
    var count = 0, xPos, maxX = repeatX ? elmW : x + 0.1, yPos, maxY = repeatY ? elmH : y + 0.1, d, s, isNew;
    if (pngW && pngH) {
        for (xPos = x; xPos < maxX; xPos += pngW) {
            for (yPos = y; yPos < maxY; yPos += pngH) {
                isNew = 0;
                if (!tiles.cache[count]) {
                    tiles.cache[count] = document.createElement('div');
                    isNew = 1;
                }
                var clipR = (xPos + pngW > elmW ? elmW - xPos : pngW), clipB = (yPos + pngH > elmH ? elmH - yPos : pngH);
                d = tiles.cache[count];
                s = d.style;
                s.behavior = 'none';
                s.left = xPos + 'px';
                s.top = yPos + 'px';
                s.width = clipR + 'px';
                s.height = clipB + 'px';
                s.clip = 'rect(' +
                (yPos < 0 ? 0 - yPos : 0) +
                'px,' +
                clipR +
                'px,' +
                clipB +
                'px,' +
                (xPos < 0 ? 0 - xPos : 0) +
                'px)';
                s.display = 'block';
                if (isNew) {
                    s.position = 'absolute';
                    s.zIndex = -999;
                    if (elm.firstChild) {
                        elm.insertBefore(d, elm.firstChild);
                    }
                    else {
                        elm.appendChild(d);
                    }
                }
                this.fix(d, pngSrc, 0);
                count++;
            }
        }
    }
    while (count < tiles.cache.length) {
        this.fix(tiles.cache[count], '', 0);
        tiles.cache[count++].style.display = 'none';
    }
    
    this.hook.enabled = 1;
    
    // Cache so updates are infrequent.
    tiles.old = {
        w: elmW,
        h: elmH,
        x: bgX,
        y: bgY,
        r: bgR
    };
};

IEPNGFix.update = function() {
    // Update all PNG backgrounds.
    for (var i in IEPNGFix.data) {
        var t = IEPNGFix.data[i].tiles;
        if (t && t.elm && t.src) {
            IEPNGFix.tileBG(t.elm, t.src);
        }
    }
};
IEPNGFix.update.timer = 0;
if (window.attachEvent && !window.opera) {
    window.attachEvent('onresize', function() {
        clearTimeout(IEPNGFix.update.timer);
        IEPNGFix.update.timer = setTimeout(IEPNGFix.update, 100);
    });
}

/*
 $ /js/InsertSWF.js | 2007/10/02 10:50 | 2008/05/15 13:39 $
 */
function InsertSWF(swfId, swfPath, swfVars, swfWidth, swfHeight, swfTitle, swfBgColor) {
    this.Insert = function Insert() {
        document.write(result);
    }
    
    var result = '<object type="application/x-shockwave-flash" id="' + swfId + '" data="' + swfPath + '" width="' + swfWidth + '" height="' + swfHeight + '" title="' + swfTitle + '">';
    result += '  <param name="allowScriptAccess" value="always" />';
    result += '  <param name="movie" value="' + swfPath + '" />';
    result += '  <param name="quality" value="best" />';
    result += '  <param name="menu" value="false" />';
    result += '  <param name="scale" value="exactfit" />';
    result += '  <param name="wmode" value="transparent" />';
    result += '  <param name="bgcolor" value="' + swfBgColor + '" />';
    result += '  <param name="flashvars" value="' + swfVars + '" />';
    result += '</object>';
}
