function CheckAll(thisdoc)
{
	for (var i=0;i<thisdoc.elements.length;i++)
    {
		var e = thisdoc.elements[i];
		if (e.name != 'SelectAll')
			e.checked = thisdoc.SelectAll.checked;
	}
}

function isIE5Browser() {
	var agt = navigator.userAgent;
	var is_ie = (agt.indexOf("MSIE") != -1);
	var ver_no = 0;

	if(is_ie) {
		ver_no = parseFloat(agt.substr(agt.indexOf("MSIE ") + 4, agt.indexOf("; Windows") - agt.indexOf("MSIE ")));
		if(ver_no >= 5) {
			return true;
		} else {
			return false;
		}
	} else {
			return false;
	}
}

function confirmDelete(strmsg)
{

	if(confirm(strmsg)==true)
		return true;
	else 
		return false;
}

function confirmationBox(strmsg)
{
	var vReturnValue = true;
	window.returnValue = false;
	
	if (isIE5Browser() == true)
	{
		vReturnValue = window.showModalDialog("/confirmBox.aspx?MessId=" + strmsg, strmsg,"dialogWidth:350px;dialogHeight:150px;center:yes;scroll:no;resizable:no;help:no;status:no;edge:raised");
	}
	else
		vReturnValue = confirmDelete(strmsg)
		
	if(vReturnValue)
		return vReturnValue;
	else
		return false;
}

function doOK()
{
	window.returnValue = true;
	window.close();
}

function doCancel()
{
	window.returnValue = false;
	window.close();
}

function showInfoPopUp()
{
	window.open('/infoPopUp.aspx','infoPopUp','width=300 height=100');
}
