function myVisibleHeight() {
    var viewportheight;
    if (typeof window.innerHeight != 'undefined') {
         viewportheight = window.innerHeight;
    } else
        if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientHeight !='undefined' && document.documentElement.clientHeight != 0) {
          viewportheight = document.documentElement.clientHeight;
        } else {
          viewportheight = document.getElementsByTagName('body')[0].clientHeight;
        }
    return viewportheight;
}
function profileLogin() {
    try {
        swfobject.getElementById("aliceflash").reloadStatus();
    } catch(e){
        
    } finally {
        swfobject.getElementById("profileflash").reloadStatus();
    }
}
function closeFlashPopUp(){
    if ($(".fon, .flashdialogwindow, .fon2").length >0) {
        $(".fon, .flashdialogwindow, .fon2").fadeOut(1,function(){
            $(this).remove();
        });
    }
    $("object").css("visibility","visible");
}
function showLRR(p) {
    var div = $("<div>").addClass("flashdialogwindow flashprofilewindow");
    $("<div id=\"flashpopup\"></div>").appendTo(div);
    div.hide().appendTo("body").fadeIn(1,function(){
         var flashvars = {myChanel:$("#flashchanel").val(),show_register:p};
         var params = {bgcolor:"#000000",scale:"noscale",salign:"tl"};
         var attributes = {};
         attributes.id = "myflashpopup";
         swfobject.embedSWF("/flash/swf/LoginWindowSa.swf", "flashpopup", "872", "758", "9.0.28", "expressInstall.swf", flashvars, params, attributes);
    }).fadeIn(1,function(){
         var hh =  myVisibleHeight()>=document.body.clientHeight?myVisibleHeight():document.body.clientHeight;
         $("<div>").addClass("fon2").height(hh).hide().appendTo("body").fadeIn(1);
    });
    $("object").css("visibility","hidden");
}
