function alertDialog(id, msk) {
    //Get the screen height and width
    var maskHeight = $(document).height();
    var maskWidth = $(window).width();

    //Set heigth and width to mask to fill up the whole screen
    $(msk).css({
        'width': maskWidth,
        'height': maskHeight
    });

    //transition effect
    $(msk).fadeIn(300);
    $(msk).fadeTo("slow", 0.6);

    //Get the window height and width
    var winH = $(window).height();
    var winW = $(window).width();

    //Set the popup window to center
    //$(id).css('top', winH / 2 - $(id).height() / 2);
    $(id).css('top', '100px');
    $(id).css('left', winW / 2 - $(id).width() / 2);

    //transition effect
    $(id).fadeIn(400);
}
function alertDialogSignUP(id, msk) {
    //Get the screen height and width
    var maskHeight = $(document).height();
    var maskWidth = $(window).width();

    //Set heigth and width to mask to fill up the whole screen
    $(msk).css({
        'width': maskWidth,
        'height': maskHeight
    });

    //transition effect
    $(msk).fadeIn(300);
    $(msk).fadeTo("slow", 0.6);

    //Get the window height and width
    var winH = $(window).height();
    var winW = $(window).width();

    //Set the popup window to center
    //$(id).css('top', winH / 2 - $(id).height() / 2);
    $(id).css('top', '15px');
    $(id).css('left', winW / 2 - $(id).width() / 2);

    //transition effect
    $(id).fadeIn(400);
}
function alertDialoghomehelp(id, msk) {
    var maskHeight = $(document).height();
    var maskWidth = $(window).width();
    $(msk).css({
        'width': maskWidth,
        'height': maskHeight
    });

    $(msk).fadeIn(300);
    $(msk).fadeTo("slow", 0.6);
    var winH = $(window).height();
    var winW = $(window).width();
    $(id).css('top',"80px");
    $(id).css('left', winW / 2 - $(id).width() / 2);
    $(id).fadeIn(400);
}

function alertDialogById(id) {
    //Get the window height and width
    var winH = $(window).height();
    var winW = $(window).width();

    //Set the popup window to center
    $(id).css('top', winH / 2 - $(id).height() / 2);
    $(id).css('left', winW / 2 - $(id).width() / 2);

    //transition effect
    $(id).fadeIn(400);
}

function close_form() {
    $('#mask').hide();
    $('.window').hide();
    $('#masktut').hide();
    $('.windowtut').hide();
    $('#maskphoto').hide();
    $('.windowphoto').hide();
}

function close_tut() {
    $('#mask').hide();
    $('.window').hide();
    $('#masktut').hide();
    $('.windowtut').hide();
    $('#maskphoto').hide();
    $('.windowphoto').hide();
}
function fqa_slow(id) {
	id_p = id + '_p';
	if ($(id_p).css("display") == "block") {
		$(id).css("background-image", "url(images/zippy_plus_sm.gif)");
		$(id_p).slideUp('slow');
	} else {
		$(id).css("background-image", "url(images/zippy_minus_sm.gif");
		$(id_p).slideDown('slow');
	}
}
