
var selectcount=0;

function CheckAll()
{
	var a = document.getElementsByTagName("input");
	for (var i=0; i<a.length; i++)
	if ( (a[i].type == "checkbox") && (!(a[i].disabled)) )
	{ var bSelect = a[i].checked; break;}

	if(bSelect)
	{
	selectcount=0;
	for (var i=0; i<a.length; i++)
	if ( (a[i].type == "checkbox") && (!(a[i].disabled)) ) {a[i].checked = false;}
	}
	else
	{
	selectcount=0;
	for (var i=0; i<a.length; i++)
	if ( (a[i].type == "checkbox") && (!(a[i].disabled)) ) {a[i].checked = true;++selectcount;}
	}
	event.srcElement.value=(bSelect==true)?"È« Ñ¡":"È¡ Ïû";
}

function pop(url,width,height) 
{
    var winwidth = (window.screen.availWidth-width)/2;
    var winheight = (window.screen.availHeight-height)/2;
    if(width == undefined && height == undefined)
        var news=window.open (url, "", "top=50,left=100,status=no,toolbar=no,menubar=no,location=no,channelmode=no,directories=no,scrollbars=yes,resizable=no, width=800,height=500");  
    else
        var news=window.open (url, "", "top="+ winheight +",left="+ winwidth +",status=no,toolbar=no,menubar=no,location=no,channelmode=no,directories=no,scrollbars=yes,resizable=no, width="+width+",height="+height+"");  
    news.focus();
}
