﻿function ReturnPrePage(form) {
    var redir = GetReturnPage(form);        	    
    if (redir) {
		window.location = redir;
	} else {
        window.location = form.convertUrl("~/Forum/BoardList.gspx");
    }
}

function GetReturnPage(form) {
    var url = form.get_params().Redir;
    if (!url || url == "") {
		url = form.get_params().ReturnUrl;
	} 
    if (url == null || url == "") {
        return null;
    } else {
        if (url.charAt(0) == '~') 
            url = form.convertUrl(url);
        return url;
    }
}

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();