var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
function getScreenWidth() {var winW = 630; if (document.body && document.body.offsetWidth) {winW = document.body.offsetWidth; } else if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetWidth ) { winW = document.documentElement.offsetWidth; } else if (window.innerWidth) { winW = window.innerWidth; } return winW;}
function getScreenHeight() {var winH = 460; if (document.body && document.body.offsetHeight) { winH = document.body.offsetHeight; } else if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetHeight ) { winH = document.documentElement.offsetHeight; } else if (window.innerWidth && window.innerHeight) { winH = window.innerHeight; } return winH;}
g_w = Math.round(getScreenWidth() / 2.0); g_h = Math.round(getScreenHeight() / 2.0); g_x = Math.round(g_w * 7.0 / 5.0); g_x_w = Math.round(g_w * (2.0 - 7.0 / 5.0)); g_sw = Math.round(g_w / 40.0); g_sh = Math.round(g_h / 40.0);
function addImageDiv(land) { var xDivX = document.createElement("div"); xDivX.setAttribute("id", "images_div"); xDivX.setAttribute("class", "imagediv"); var imgStyle = "left:" + g_x + "px;top:0px;"; xDivX.setAttribute("style", imgStyle); land.appendChild(xDivX);}
function hideAll() { var xDiv = document.getElementById("images_div"); if (xDiv.hasChildNodes()) xDiv.removeChild(xDiv.firstChild);}
function showImage(img) { if (!img) return; var xDiv = document.getElementById("images_div"); if (xDiv.hasChildNodes()) xDiv.removeChild(xDiv.firstChild); var xImg = document.createElement("img"); xImg.setAttribute("id", "image_to_show"); xImg.setAttribute("class", "showimg1"); xImg.setAttribute("src", "http://demo.mycompany.lv/images/" + img + ".png"); xImg.setAttribute("style", "width:" + g_x_w + "px;"); xImg.setAttribute("alt", "Logo"); xDiv.appendChild(xImg);}
function hideImage() { hideAll();}
function showText(text) { var xDiv = document.getElementById("images_div"); if (xDiv.hasChildNodes()) xDiv.removeChild(xDiv.firstChild); var xTextDiv = document.createElement("div"); xTextDiv.setAttribute("id", "text_to_show"); xTextDiv.setAttribute("class", "showtxt"); xDiv.appendChild(xTextDiv); xTextDiv.innerHTML = text;}
function hideText() { hideAll();}
function growTree(land, id, left, top, treeImg, showImg, cls) { var treeDivStyle = "position:absolute;left:" + (parseInt(g_w) + parseInt(left)) + "px;top:" + (parseInt(g_h) + parseInt(top) - 20) + "px;"; if (!cls) cls = "1"; var xDiv = document.createElement("div"); xDiv.setAttribute("id", "tree_div_" + id); xDiv.setAttribute("style", treeDivStyle); land.appendChild(xDiv); var xImg = document.createElement("img"); xImg.setAttribute("id", "tree_" + id); xImg.setAttribute("class", "treeimg" + cls); xImg.setAttribute("src", "http://demo.mycompany.lv/images/" + treeImg + ".png"); xImg.setAttribute("alt", "Koks"); xImg.setAttribute("onmouseover", "showImage('" + showImg + "');"); xImg.setAttribute("onmouseout", "hideImage();"); xDiv.appendChild(xImg);}
function removeTree(land, id) { var tree = document.getElementById("tree_div_" + id); land.removeChild(tree);}
grown = 0; function growTrees(force) { if (grown == 1) return; if (grown == 0) init(); grown = 1; var land = document.getElementById("land"); addImageDiv(land); growTree(land, "1", -35.0 * g_sw, -3.0 * g_sh, "nlogo_transp", "nlogo_transp"); growTree(land, "2", 10.0 * g_sw, -3.0 * g_sh, "wlogo_transp", "wlogo_transp"); growTree(land, "3", -6.0 * g_sw, -4.0 * g_sh, "klogo_transp", "klogo_transp"); growTree(land, "4", 2.0 * g_sw, -23.0 * g_sh, "mlogo_transp", "mlogo_transp"); growTree(land, "11", -20.0 * g_sw, -3.0 * g_sh, "tree_1", "tree_1"); growTree(land, "12", 14.0 * g_sw, -8.0 * g_sh, "tree_2", "tree_2", "2"); growTree(land, "13", -3.0 * g_sw, -11.0 * g_sh, "palm_1", "palm_1", "2");}
function removeTrees() { var land = document.getElementById("land"); removeTree(land, "1"); removeTree(land, "2"); removeTree(land, "3"); removeTree(land, "4"); removeTree(land, "11"); removeTree(land, "12"); removeTree(land, "13"); grown = 2;}
function init() { var land_image = document.getElementById("land_image"); land_image.setAttribute("style", "width:" + (g_w * 2.0) + "px;height:" + (g_h * 2.0) + "px;");}
}