﻿        var guid = new RegExp("(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}");


        function GetElementsByClassName(_2,_3,_4){
            var _5=(_3=="*"&&_2.all)?_2.all:_2.getElementsByTagName(_3);
            var _6=new Array();
            _4=_4.replace(/\-/g,"\\-");
            var _7=new RegExp("(^|\\s)"+_4+"(\\s|$)");
            var _8;
            for(var i=0;i<_5.length;i++){
                _8=_5[i];
                if(_7.test(_8.className)){
                    _6.push(_8);
                }
            }
            return (_6);
        }

        var ns4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5) ? true : false;
        var ns6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape") >= 0) ? true : false;
        var ns = (document.layers) ? true : false;
        var ie = (document.all) ? true : false;
        function GetEl(id) {
            if (ie) { return document.all[id]; }
            else { return document.getElementById(id); }
        }
        
        
        function swapMainImage(el, caption, alt)
        {
            var mainimage = document.getElementById("MainImage");
            var newmainimageid = el.src;

            //var mainimageanchor = GetElement("MainImageAnchor");

            mainimage.src = productImageRoot + guid.exec(newmainimageid)[0] + "/435-435/" + caption;
            mainimage.alt = alt;
            //mainimageanchor.title = caption;

            //mainimageanchor.href = productImageRoot + guid.exec(newmainimageid)[0] + "/435-435/" + caption;
        }
        
        function ShowFeature(featureNumber){
        
            // hide all features
            el=GetElementsByClassName(document,"div","FeatureData");
            for(i=0;i<el.length;i++){
                if (i == featureNumber)
                    el[i].className = el[i].className.replace(stateMatch, "$1_normal_");
                else
                    el[i].className = el[i].className.replace(stateMatch, "$1_hidden_");
            }
            
            // hide all features
            el=GetElementsByClassName(document,"h3","FeatureTitle");
            for(i=0;i<el.length;i++){
                if (i == featureNumber)
                    el[i].className = el[i].className.replace(stateMatch, "$1_selected_");
                else
                    el[i].className = el[i].className.replace(stateMatch, "$1_normal_");
            }
        }


        var ns4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5) ? true : false;
        var ns6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape") >= 0) ? true : false;
        var ns = (document.layers) ? true : false;
        var ie = (document.all) ? true : false;
        function GetElement(id) {
            if (ie) { return document.all[id]; }
            else { return document.getElementById(id); }
        }

        var message = "Copyright Manor Furnishing 2011";

        function clickIE4() {
            if (event.button == 2) {
                alert(message);
                return false;
            }
        }

        function clickNS4(e) {
            if (document.layers || document.getElementById && !document.all) {
                if (e.which == 2 || e.which == 3) {
                    alert(message);
                    return false;
                }
            }
        }

        if (document.layers) {
            document.captureEvents(Event.MOUSEDOWN);
            document.onmousedown = clickNS4;
        }
        else if (document.all && !document.getElementById) {
            document.onmousedown = clickIE4;
        }

        document.oncontextmenu = new Function("alert(message);return false")


