// JavaScript Document
function del() {
		if (confirm("ยืนยันการลบข้อมูล")){	
  			return true;	
		}else{
  			return false;	
		}
}	


function ConfirmDelete(){  
	if(confirm('ยืนยันการลบข้อมูล')){
		document.frmList.submit();
	}
}


function ConfirmDel(){  
	if(!confirm('ยืนยันการลบข้อมูล')){
		return false;			
	}
}



function mOvr(src,clrOver){ 
	if (!src.contains(event.fromElement)){ src.style.cursor = 'hand'; src.bgColor = clrOver; }
} 

function mOut(src,clrIn){ 
	if (!src.contains(event.toElement)){ src.style.cursor = 'default'; src.bgColor = clrIn; }
} 


function selectRow(row){
	document.getElementById(row).style.background="#D6DEEC";
}

function deselectRow(row){
	document.getElementById(row).style.background="#F6F6F6";
}




//AJAX
function Inint_AJAX()
{
	try
	{
		return new ActiveXObject( "Msxml2.XMLHTTP" );
	}
	catch ( e )
	{
	};

	try
	{
		return new ActiveXObject( "Microsoft.XMLHTTP" );
	}
	catch ( e )
	{
	};

	try
	{
		return new XMLHttpRequest();
	}
	catch ( e )
	{
	};

	alert( "XMLHttpRequest not supported" );
	return null;
}




function popupCenter(theURL,winName,w,h) {
// set properties for the editace window
var lp = (screen.width) ? (screen.width-w)/2 : 0;
var tp = (screen.height) ? (screen.height-h)/2 : 0;
var OpenWindow;
attrs = 'height=' + h + ',width=' + w + ',top=' + tp + ',left=' + lp + ', resizable=yes, toolbar=no , scrollbars=no , status=no';
OpenWindow = window.open( theURL , winName , attrs);
OpenWindow.focus();
}

