function toggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != '' ) {
		el.style.display = '';
	}
	else {
		el.style.display = 'none';
	}
}

//checks all DataGrid CheckBoxes with the given name with the given value
function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal) {
    //re = new RegExp(':' + aspCheckBoxID + '$')  //generated control name starts with a colon
    re = new RegExp(aspCheckBoxID + '$')
    for(i = 0; i < document.forms[0].elements.length; i++) {
        elm = document.forms[0].elements[i]
        if (elm.type == 'checkbox') {
            if (re.test(elm.name)) {
                elm.checked = checkVal
            }
        }
    }
}

//function fOpenWin(url,name,w,h)
//{
//	window.open([url],[name],"scrollbars=1,menubar=0,toolbar=0,status=0,resizable=1,width="+w+",height="+h);
//}

function fOpenChat(url, name) {
    window.open(url, name, 'top=10,left=0,navigationbar=0,scrollbars=0,menubar=0,toolbar=0,statusbar=0,location=0,resizable=0,width=730,height=600');

} 


////Disable right mouse click Script
//var message="(C) Copyright!";
//function clickIE4(){
//    if (event.button == 2)
//    {
//        alert(message);
//        return false;
//    }
//}
//function clickNS4(e){
//    if (document.layers || document.getElementById && !document.all)
//    {
//        if (e.which == 2 || e.which == 3)
//        {
//            alert(message);
//            return false;
//        }
//    }
//}
//if (document.layers)
//{
//    document.captureEvents(Event.MOUSEDOWN);
//    document.onmousedown=clickNS4;
//}
//else if (document.all && !document.getElementById)
//{
//    document.onmousedown=clickIE4;
//}

//document.oncontextmenu=new Function("alert(message);return false")