with (ilmLincks = new Function()) {
    prototype.instanceName = "";
    prototype.config = Array();
    prototype.bgTop = 100;
    prototype.bgLeft = 0;

    prototype.currentOpacity = 0.0;
    prototype.opacityInterval = null;
    prototype.oTime = 55;

    prototype.currIlmLink = "";
    prototype.brw = "";
    //Elements
    prototype.ilmBlockObj = null;
    prototype.contObj = null;
    prototype.imgIObj = null;
    prototype.hintIObj = null;
    prototype.parent = null;
    prototype.init = function () {
        var bg_bw = new Image();
        bg_bw.src = "../resources/images/home-dynascan-bw.jpg";

        if (jr_lib.browser().name == "Opera") this.oTime = 100;
        this.brw = jr_lib.browser().name + jr_lib.browser().version;
        this.ilmBlockObj = document.getElementById("ilm-block");
        this.contObj = document.getElementById("container");

        this.parent = document.getElementsByTagName('body')[0];

        //Create hinst and images
        for (var name_e in this.config) {
            if (document.getElementById(name_e)) {
                ilm_id = name_e;
                var ilmLinkObj = document.getElementById(ilm_id);

                //Create image
                this.imgIObj = document.createElement('div');
                this.imgIObj.id = name_e + "_ilmImage_" + this.instanceName;
                this.parent.appendChild(this.imgIObj);
                this.imgIObj.style.display = "none";
                this.imgIObj.style.position = "absolute";
                this.imgIObj.style.zIndex = 699;

                this.imgIObj.innerHTML = "<img src=\"" + this.config[ilm_id].image + "\" width=\"" + this.config[ilm_id].width + "px\" height=\"" + this.config[ilm_id].height + "px\" alt=\"\" border=\"0\" />";

                //Create hint
                this.hintIObj = document.createElement('div');
                this.hintIObj.id = name_e + "_ilmHint_" + this.instanceName;
                this.parent.appendChild(this.hintIObj);
                this.hintIObj.className = "home-ilm-hint";
                this.hintIObj.style.display = "none";



                if (this.config[ilm_id].hintMode == 0) {
                    this.hintIObj.innerHTML = "<div class=\"top png\"><a href=\"javascript:{}\" onClick=\"" + this.instanceName + ".hide();\" class=\"close1\"></a></div>"
										+ "<div class=\"bg png\"><p>" + this.config[ilm_id].description + "</p></div>"
										+ "<div class=\"bottom png\"></div>";

                } else {
                    this.hintIObj.innerHTML = "<div class=\"top top1\"><a href=\"javascript:{}\" onClick=\"" + this.instanceName + ".hide();\" class=\"close1\"></a></div>"
										+ "<div class=\"bg\"><p>" + this.config[ilm_id].description + "</p></div>"
										+ "<div class=\"bottom bottom1\"></div>";
                }
            }
        }

        this.loadImages();

    }

    prototype.show = function (ilm_id, stat) {
        var stat = stat || 1;

        //if(ilm_id ==this.currIlmLink) {
        //this.hide(ilm_id);
        //return false;
        //}

        if (stat == 1) {
            if (this.currIlmLink.indexOf(ilm_id) != -1) {
                this.hide();
                return false;
            }
            this.hideOthersLink(ilm_id);
        }

        this.currIlmLink += "," + ilm_id;
        this.imgIObj = document.getElementById(ilm_id + "_ilmImage_" + this.instanceName);
        this.hintIObj = document.getElementById(ilm_id + "_ilmHint_" + this.instanceName);



        //Select item on bottom products list
        for (i = 0; i < obj_pl.itemsArray.length; i++) {
            if (obj_pl.itemsArray[i].ilmLinks.indexOf(ilm_id) != -1) {
                obj_pl.runCmd(i, 2);
                break;
            }
        }

        //links status
        var ilmLinkObj = document.getElementById(ilm_id);
        ilmLinkObj.className = ilmLinkObj.className + " active";

        if (this.currIlmLink != "") {
            var currIlmLinkObj = document.getElementById(this.currIlmLink);
            if (currIlmLinkObj) currIlmLinkObj.className = currIlmLinkObj.className.replace(' active', '');
        }

        //replace bg image
        if (this.brw == 'IE6.0') setTimeout(function () { ilmLincksObj.contObj.style.background = "url('../resources/images/home-dynascan-bw.jpg') no-repeat center 190px"; }, 1);
        else this.contObj.style.background = "url('../resources/images/home-dynascan-bw.jpg') no-repeat center 190px";

        this.imgIObj.style.display = "block";
        //show hint
        if (this.opacityInterval != null) {
            clearInterval(this.opacityInterval);
            this.opacityInterval = null;
            this.currentOpacity = 0.0;
        }

        //if(this.brw !='IE7.0' && this.brw !='IE8.0')
        //jr_lib.setElementOpacity(this.hintIObj, 0.0);

        this.hintIObj.style.display = "block";

        if (this.brw == 'IE6.0') ie6_margin = 50; else ie6_margin = 0;
        this.imgIObj.style.left = jr_lib.objAbsoluteLeft(this.ilmBlockObj) + this.config[ilm_id].left + "px";
        this.imgIObj.style.top = jr_lib.objAbsoluteTop(this.ilmBlockObj) + this.config[ilm_id].top + this.bgTop + "px";

        var topPx = 0;

        if (this.config[ilm_id].hintMode == 0) {
            topPx = jr_lib.objAbsoluteTop(ilmLinkObj) - this.hintIObj.offsetHeight;

        } else {
            topPx = jr_lib.objAbsoluteTop(ilmLinkObj) + 20 ;
        }
        if (topPx < 5) {
            this.hintIObj.style.top = "5px";
        } else {
            this.hintIObj.style.top = topPx + "px";
        }

        var leftPx = jr_lib.objAbsoluteLeft(ilmLinkObj) - Math.abs(this.hintIObj.offsetWidth - ilmLinkObj.offsetWidth) / 2 + ie6_margin ;

        if (leftPx < 5) {
            this.hintIObj.style.left = "5px";
        }
        else if ((leftPx + this.hintIObj.offsetWidth) > (jr_lib.screenSize().w - 5)) {
            this.hintIObj.style.left = ((jr_lib.screenSize().w - 5) - this.hintIObj.offsetWidth) + "px";
        }
        else {
            this.hintIObj.style.left = leftPx + "px";
        }



        //if(this.brw !='IE7.0' && this.brw !='IE8.0') this.opacityInterval =setInterval(this.instanceName +".opacityEffect();", this.oTime);
    }

    prototype.hide = function () {
        if (this.currIlmLink == "") return false;

        for (var name_e in this.config) {
            if (this.currIlmLink.indexOf(name_e) != -1) {
                if (document.getElementById(name_e)) {
                    var currIlmLinkObj = document.getElementById(name_e);
                    if (currIlmLinkObj) currIlmLinkObj.className = currIlmLinkObj.className.replace(' active', '');

                    this.imgIObj = document.getElementById(name_e + "_ilmImage_" + this.instanceName);
                    this.hintIObj = document.getElementById(name_e + "_ilmHint_" + this.instanceName);

                    this.imgIObj.style.display = "none";
                    this.hintIObj.style.display = "none";
                }
            }
        }
        obj_pl.itemNoSelected(obj_pl.currentItemId);
        this.showAllLink();

        if (this.brw == 'IE6.0') setTimeout(function () { ilmLincksObj.contObj.style.background = "url('../resources/images/home-dynascan.jpg') no-repeat center 190px"; }, 1);
        else this.contObj.style.background = "url(/resources/images/home-dynascan.jpg) no-repeat center 190px";

        this.currIlmLink = "";
    }

    prototype.hideOthersLink = function (ilm_id) {
        for (var name_e in this.config) {
            if (this.currIlmLink.indexOf(name_e) != -1) {
                if (document.getElementById(name_e)) {
                    var currIlmLinkObj = document.getElementById(name_e);
                    if (currIlmLinkObj) currIlmLinkObj.className = currIlmLinkObj.className.replace(' active', '');

                    this.imgIObj = document.getElementById(name_e + "_ilmImage_" + this.instanceName);
                    this.hintIObj = document.getElementById(name_e + "_ilmHint_" + this.instanceName);

                    this.imgIObj.style.display = "none";
                    this.hintIObj.style.display = "none";
                }
            }
        }
        obj_pl.itemNoSelected(obj_pl.currentItemId);
    }

    prototype.showAllLink = function () {
//        for (var name_e in this.config) {
//            if (document.getElementById(name_e)) document.getElementById(name_e).style.display = "block";
//        }
    }

    prototype.opacityEffect = function () {
        if (this.currentOpacity < 1.0) {
            this.currentOpacity += 0.1;
            jr_lib.setElementOpacity(this.hintIObj, this.currentOpacity);
        }
        else {
            jr_lib.setElementOpacity(this.hintIObj, 1.0);
            clearInterval(this.opacityInterval);
            this.opacityInterval = null;
            this.currentOpacity = 0.0;
        }
    }

    prototype.loadImages = function () {
        var imagesArray = Array();
        if (this.brw != 'IE6.0') {
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-top-ilm.png";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-top-ilm1.png";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-bottom-ilm.png";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-bottom-ilm1.png";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-ilm.png";
        } else {
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-top-ilm.gif";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-top-ilm1.gif";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-bottom-ilm.gif";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-bottom-ilm1.gif";
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = "../resources/images/hint-bg-ilm.gif";
        }
        imagesArray[imagesArray.length] = new Image();
        imagesArray[imagesArray.length - 1].src = "../resources/images/hint-close.png";

        for (var name_e in this.config) {
            imagesArray[imagesArray.length] = new Image();
            imagesArray[imagesArray.length - 1].src = this.config[name_e].image;
        }
    }

    prototype.insertImage = function (path, w, h, style) {
        if (this.brw != 'IE6.0' && this.brw != 'IE7.0' && this.brw != 'IE8.0') tmpImg = "<img border=\"0\" width=\"" + w + "px\" height =\"" + h + "px\" src=\"" + path + "\" style=\"" + style + "\"/>";
        else tmpImg = "<span style=\"display:inline-block;" + style + "width:" + w + "px;height:" + h + "px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + path + "', sizingMethod='scale');\"></span>";
        return tmpImg;
    }

}

//Config
var ilmLincksObj = new ilmLincks();
ilmLincksObj.instanceName = "ilmLincksObj";

ilmLincksObj.config['ilm-linck-cavity-survey'] = { image: '/resources/images/sys-cavity-survey.png', left: 34, top: 84, width: 219, height: 216, hintMode: 0, description: 'The Cavity Auto Scanning Laser System (C-ALS) can be deployed through boreholes for surveys of inaccessible spaces, underground voids and cavities. Red LEDs provide illumination for the onboard nose cone camera, permitting a view of the borehole, any obstructions and the opening into the void. Once in the void the laser head opens out to measure the 3D shape of the void and its surface reflectivity. <a href="/en/14745.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-void-survey'] = { image: '/resources/images/sys-void-survey.png', left: 33, top: -9, width: 200, height: 201, hintMode: 0, description: 'The Void Scanner (VS150) is designed to operate in demanding underground mining environments and may be used to measure voids, stopes, and rock faces in unsafe or difficult to access areas. The system can be deployed via tripods or by remote control when deployed on rods, booms, masts, lifts and cranes. <a href="/en/15119.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-borehole-deviation-surveying'] = { image: '/resources/images/sys-borehole-deviation.png', left: 208, top: 89, width: 200, height: 200, hintMode: 0, description: 'The Boretrak&reg; can be deployed uphole and downhole for use in all types of rock.  This versatile system can be used for measuring borehole deviation and by using 3D software the holes can then be displayed individually or in any combination to determine hole separations. <a href="/en/15120.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-quarry-survey'] = { image: '/resources/images/sys-quarry-survey.png', left: 352, top: 143, width: 200, height: 201, hintMode: 0, description: 'The Quarryman&reg; Pro can be used in harsh environments for 3D mapping of entire quarry/mine sites, determining 3D rock face geometry, blast design and volumetric surveying of stockpiles and reserves. <a href="/en/15118.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-topographic-mapping'] = { image: '/resources/images/sys-3d-topographic.png', left: 373, top: -16, width: 200, height: 200, hintMode: 0, description: 'The Dynascan is a 3D mobile mapping system that can be mounted onto the back of a truck to collect data whilst on the move, enabling huge savings in time and personnel when surveying large areas. <a href="/en/14739.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-height-detection'] = { image: '/resources/images/sys-height-detect.png', left: 518, top: 14, width: 208, height: 203, hintMode: 0, description: 'Our variety of laser modules can be used for height detection to determine the size of a vehicle as well as presence detection, speed measurement, vehicle profiling and volume measurement. To find out more about our collection of modules please click here to <a href="/en/15103.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-beach-profiling'] = { image: '/resources/images/sys-dynascan-beach.png', left: 509, top: 130, width: 200, height: 200, hintMode: 0, description: 'The Dynascan can be mounted onto a vessel in order to scan coastlines for a variety of applications. When vessel mounted the Dynascan seamlessly integrates to most swath sonar systems for "Real Time" 360 degree laser and sonar scanning. <a href="/en/14739.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-altimeter-sys'] = { image: '/resources/images/sys-altimeter.png', left: 650, top: -50, width: 180, height: 177, hintMode: 0, description: 'Our collection of laser modules can be used for a range of applications, including altimeters, tide height and wave monitoring, laser motion detector and many more applications, please click here to <a href="/en/15103.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }
ilmLincksObj.config['ilm-linck-dymanic-positioning'] = { image: '/resources/images/sys-fanbeam.png', left: 606, top: 42, width: 313, height: 313, hintMode: 0, description: 'The Fanbeam system is primarily used as a dynamic positioning (DP) reference sensor measuring the position of an offshore support vessel (OSV) relative to an offshore structure such as a platform. This system automatically holds the vessel on station, allowing operations to safely take place. <a href="/en/14987.aspx" style="color:#ffffff;><span style="color:#ffffff;">Read&nbsp;more...</span></a>' }


// ilmLincksObj.config['ilm-linck-cavity-survey'] ={ image: '/resources/images/sys-cavity-survey.png', hintLeftOffset:40, hintTopOffset:70, left: 34, top: 84, width: 219, height: 216, hintMode: 0, description: 'The Cavity Auto Scanning Laser System (C-ALS) can be deployed through boreholes for surveys of inaccessible spaces, underground voids and cavities. Red LEDs provide illumination for the onboard nose cone camera, permitting a view of the borehole, any obstructions and the opening into the void. Once in the void the laser head opens out to measure the 3D shape of the void and its surface reflectivity.' }
// ilmLincksObj.config['ilm-linck-void-survey'] ={ image: '/resources/images/sys-void-survey.png', hintLeftOffset:0,  hintTopOffset:48,left: 33, top: -9, width: 200, height: 201, hintMode: 0, description: 'The Void Scanner (VS150) is designed to operate in demanding underground mining environments and may be used to measure voids, stopes, and rock faces in unsafe or difficult to access areas. The system can be deployed via tripods or by remote control when deployed on rods, booms, masts, lifts and cranes.' }
// ilmLincksObj.config['ilm-linck-borehole-deviation-surveying'] ={ image: '/resources/images/sys-borehole-deviation.png', hintLeftOffset:10, hintTopOffset:120, left: 208, top: 89, width: 200, height: 200, hintMode: 0, description: 'The Boretrak&reg; can be deployed uphole and downhole for use in all types of rock.  This versatile system can be used for measuring borehole deviation and by using 3D software the holes can then be displayed individually or in any combination to determine hole separations.' }
// ilmLincksObj.config['ilm-linck-quarry-survey'] ={ image: '/resources/images/sys-quarry-survey.png',hintLeftOffset:25,  hintTopOffset:130,left: 352, top: 143, width: 200, height: 201, hintMode: 0, description: 'The Quarryman&reg; Pro can be used in harsh environments for 3D mapping of entire quarry/mine sites, determining 3D rock face geometry, blast design and volumetric surveying of stockpiles and reserves. ' }
// ilmLincksObj.config['ilm-linck-topographic-mapping'] ={ image: '/resources/images/sys-3d-topographic.png',hintLeftOffset:20,  hintTopOffset:65,left: 373, top: -16, width: 200, height: 200, hintMode: 0, description: 'The Dynascan is a 3D mobile mapping system that can be mounted onto the back of a truck to collect data whilst on the move, enabling huge savings in time and personnel when surveying large areas.' }
// ilmLincksObj.config['ilm-linck-height-detection'] ={ image: '/resources/images/sys-height-detect.png',hintLeftOffset:5, hintTopOffset:50, left: 518, top: 14, width: 208, height: 203, hintMode: 0, description: 'Our variety of laser modules can be used for height detection to determine the size of a vehicle as well as presence detection, speed measurement, vehicle profiling and volume measurement.' }
// ilmLincksObj.config['ilm-linck-beach-profiling'] ={ image: '/resources/images/sys-dynascan-beach.png',hintLeftOffset:-30, hintTopOffset:130, left: 509, top: 130, width: 200, height: 200, hintMode: 0, description: 'The Dynascan can be mounted onto a vessel in order to scan coastlines for a variety of applications. When vessel mounted the Dynascan seamlessly integrates to most swath sonar systems for "Real Time" 360 degree laser and sonar scanning.' }
// ilmLincksObj.config['ilm-linck-altimeter-sys'] ={ image: '/resources/images/sys-altimeter.png',hintLeftOffset:0,  hintTopOffset:0,left: 650, top: -50, width: 180, height: 177, hintMode: 0, description: 'The laser altimeter can be provided as an OEM module or combined with visual cockpit display to form a fully functioning end user system. This module can be used in unmanned aircraft for precise height control enabling safer landings and precision approaches resulting in reduced pilot stress and maintenance costs. ' }
// ilmLincksObj.config['ilm-linck-dymanic-positioning'] ={ image: '/resources/images/sys-fanbeam.png',hintLeftOffset:0,  hintTopOffset:0,left: 606, top: 42, width: 313, height: 313, hintMode: 0, description: 'The Fanbeam system is primarily used as a dynamic positioning (DP) reference sensor measuring the position of an offshore support vessel (OSV) relative to an offshore structure such as a platform. This system automatically holds the vessel on station, allowing operations to safely take place.' }


