﻿var flash, divLock;
function Show() {
    lock();
    flash = M$("divLan");    
    if (flash) {
        flash.style.display = "block";

        var arr = flash.getElementsByTagName("div");
        for (var i = 0; i < arr.length; i++) {
            arr[i].style.display = "block";
        }
    } else {
        flash = document.createElement("div");
        flash.id = "divLan";
        flash.innerHTML = '<div style="_width:575px;height: 44px; background-image: url(/images/lanbg.jpg); line-height: 44px; position: relative;padding-left: 15px;">Select a Location/Language <img src="/images/close.jpg" style="position: absolute; right: 8px; top: 5px; cursor: pointer;"alt="Close" onclick="Close();" /></div><div></div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://www.macromedia.com/go/getflashplayer" width="590" height="310"><param name="movie" value="/Lan.swf" /> <param name="quality" value="high" /><param name="allowScriptAccess" value="always" /><embed src="/Lan.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="590" height="310" allowscriptaccess="always"></embed></object>';
        flash.style.top = "50px";
        flash.style.left = "50%";
        flash.style.marginLeft = "-295px";
        flash.style.position = "absolute";
        flash.style.color = "rgb(155,0,0)";
        flash.style.fontWeight = "bold";
        flash.style.fontSize = "20px";
        flash.style.zIndex = "10";
        document.body.appendChild(flash);
    }
}

function Close() {
    if (flash) {
        flash.style.display = "none";
        divLock.style.display = "none";
    }
}

function M$(id) {
    return document.getElementById(id);
}


function lock() {
    divLock = M$("divLock");
    if (divLock) {
        divLock.style.display = "block";
    } else {
        divLock = document.createElement("div");
        divLock.style.width = Math.max(document.body.scrollWidth,document.documentElement.scrollWidth)+"px"
        divLock.style.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight)+"px";
        divLock.style.position = "absolute";
        divLock.style.backgroundColor = "black";
        divLock.style.filter = "alpha(Opacity=40)";
        divLock.style.top = "0px";
        divLock.style.left = "0px";
        divLock.style.opacity = " 0.4";        
        divLock.style.zIndex = "1";
        document.body.appendChild(divLock);
    }
}
