function allChkSelect(len){
    var i;
	if(!len) return false;
    if(document.getElementById("allcheck").checked){
		for(i = 0; i < len; i++)
			document.getElementById("chk"+i).checked = true;
		
	}
	else
	{
		for(i = 0; i < len; i++)
	      document.getElementById("chk"+i).checked = false;
	}
}

function confirmDelete(form,len)
{
	var i;
   	for( i = 0; i < len ;i++){
		if(document.getElementById("chk"+i).checked)
		{
		    if(window.confirm(CMSG0101)){
				document.getElementById("mod").value = "del";
				document.getElementById(form).submit();
			}
			break;
		}
	}
	if(i==len)
	{
		alert(CMSG0102);
	}	
}
function confirmNoticeOfEmptyRoom(form)
{
	if(window.confirm(CMSG0106)){
				document.getElementById("mod").value = "ok";
				document.getElementById(form).submit();
	}			
}
function confirmViewState(form,len)
{
	var i;
   	for( i = 0; i < len ;i++){
		if(document.getElementById("chk"+i).checked)
		{
		    if(window.confirm(CMSG0103)){
				document.getElementById("mod").value = "view";
				document.getElementById(form).submit();
			}
			break;
		}
	}
	if(i==len)
	{
		alert(CMSG0102);
	}	
}
function confirmAcceptState(form,len)
{
	var i;
   	for( i = 0; i < len ;i++){
		if(document.getElementById("chk"+i).checked)
		{
		    if(window.confirm(CMSG0104)){
				document.getElementById("mod").value = "accept";
				document.getElementById(form).submit();
			}
			break;
		}
	}
	if(i==len)
	{
		alert(CMSG0105);
	}	
}
function checkFileExt( fname, ext ) {

	fname = fname.toUpperCase();
	ext = ext.toUpperCase();
	
	return ( fname.lastIndexOf( ext ) == fname.length - ext.length );
}

function isImageFile( fname ) {
	
	return checkFileExt(fname, "GIF") || checkFileExt(fname, "JPG");
}

function go_url( url ) {
    
    if( document.forms[0] ) {
        document.forms[0].action = url;
        document.forms[0].submit();
    }    
}

function openWindow() {
    
    alert(CMSG0108);    
}
/**function noenter(e){
	if(e.which==13)	return false;
}
document.onkeydown = noenter;
**/