﻿// JScript File
function handleIsShow(content) {
    showPop('popAjax');
    
    var url = "/ajaxHandle/HandlerIfShowDialog.ashx?content=" + content;
    var nextShow = document.getElementById("isNextShow");
    var isShow = 0;
    if(nextShow != null)
    {
        if(nextShow.checked)
            isShow = 1;
        url = url + "&isShow=" + isShow;
    }

	g = false;
	if (window.XMLHttpRequest) {
		g = new XMLHttpRequest();
		if (g.overrideMimeType) {
			g.overrideMimeType("text/xml");
		}
	} else {
		if (window.ActiveXObject) {
			try {
				g = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e) {
				try {
					g = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e) {
				}
			}
		}
	}
	if (!g) {
		alert("Can not create XMLHTTP-instance");
		return false;
	}
	g.onreadystatechange = function () {
		saveShow();
	};
	g.open("GET", url, true);
	g.send(null);
}

function saveShow() {
	if (g.readyState == 4) {
		if (g.status == 200) {
				hidePop('popAjax');
				
		} else {
		    hidePop('popAjax');
			alert("An error has occurred during request");
			
		}
	}
}
