defaultStatus = "Tutoring Match - The Faster, Better Way to Learn.";
self.onerror = function() { return true; }
function openBrWindow(url, name, rs, sc, mn, st, tb, w, h, cent) { 
	pWin = null;
	if (rs) resize = "resizable,"; else resize = "";
	if (sc) scrolls = "scrollbars,"; else scrolls = "";
	if (mn) menu = "menubar,"; else menu = "";
	if (st) status = "status,"; else status = "";
	if (tb) tool = "toolbar,"; else tool = "";
	if (cent) { 
		chasm = screen.availWidth;
		mount = screen.availHeight;	  
		pWin = window.open(url, name, resize + scrolls + menu + status + tool + 'width=' + w + ',height=' + h + ',left=' + ((chasm - w) * 0.5) + ',top=' + ((mount - h) * 0.5));
	} 
	else pWin = window.open(url, name, resize + scrolls + menu + status + tool + 'width=' + w + ',height=' + h + ',left=' + (w * 0.99) + ', top=' + (h * 0.93));
}
function gmapUnloadtm() {
    try {
        GUnload();
    } catch (e) {
    }
}
function LoadTutorRatings() {
    $("#TutorRatingDialogContent").html("");
    $("#tutorRatingsLoading").show();    
    $.ajax({
        type: "POST",
        url: "/TMService.asmx/GetTutorRatings",
        data: "{}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(data) {
            $("#TutorRatingDialogContent").html(data.d);
            $("#tutorRatingsLoading").hide();
        },
        error: function(data) {
            alert(data.toString());
            $("#tutorRatingsLoading").hide();
        }
    });
}
function loadQTips() {
    $('.checkbox-item').each(function() {
        $(this).qtip({
            content: $(this).attr('tooltip'),
            //content: '<strong>Background Check</strong><br />This tutor has a background check on file with us, but you\'ll need the tutor\'s permission to view the report.<br />To request access to a tutor\'s background, we recommend you email the tutor directly.<br />A background check includes verification of name, social security number, and a search of state and local criminal records including sex offender registries.',
            position: {
                corner: {
                    target: 'topMiddle',
                    tooltip: 'bottomRight'
                }
            }, show: { delay: 0 },
            style: {

                width: 400,
                padding: 3,
                color: 'black',
                textAlign: 'left',
                title: { 'fontSize': '8px' },
                border: {
                    width: 3,
                    radius: 2
                },
                tip: 'bottomRight',
                name: 'blue' // Inherit the rest of the attributes from the preset dark style
            }
        });
    });
}  
$(document).ready(function() {
    var dlg = $("#TutorAlertDialog").dialog({ autoOpen: false, modal: true, minHeight: 150, minWidth: 200, resizable: false });
});
