﻿    function resizeToContent(height) {
        var x = 0;
        var y = this.document.body.scrollHeight;
        while (x < y) {
            x += 1;
        }
        parent.document.getElementById("bbslots").style.height = height;
    }
    
    function myPopup(url) {
	    window.open( url, "myWindow", "status = 1, height = <%=playerwidth%>, width = <%=playerheight%>, resizable = 1" );
    }

    function toggleLayer(tog) {
        var elem, vis, fram;
        var frm = "theframe";
        if (document.getElementById) // this is the way the standards work    
        {
            elem = document.getElementById(tog);
            fram = document.getElementById(frm);
        }
        else if (document.all) // this is the way old msie versions work      
        {
            elem = document.all[tog];
            fram = document.all[frm];
        }
        else if (document.layers) // this is the way nn4 works    
        {
            elem = document.layers[tog];
            fram = document.layers[frm];
        }

        vis = elem.style;  // if the style.display value is blank we try to figure it out here
        fram.src = "";
        //if (vis.visibility == "hidden")
                vis.visibility = (vis.visibility == '' || vis.visibility == 'visible') ? 'hidden' : 'visible';
    }

    function OpenWindow(url, target, width, height) {
        if (target == null)
            target = "_blank";
        if (width == null || height == null) {
            window.open(url, target, "status = 1");
        } else {
            window.open(url, target, "status = 1, height = " + height + ", width = " + width + ", resizable = 1");
        }
    }

    function notLoggedIn(currentLanguage) {
        var message = (currentLanguage == "en") ? "Please login to this site or register now." : "Veuillez ouvrir une session ou vous inscrire maintenant";
        alert(message);
    }

