// JavaScript Document
function settablemainwidth() {
	screenw = screen.width - 50;
	alert(screen.width);
	document.getElementById("tablemainframe").setAttribute("width", screenw);
	document.getElementById("tablemainframeA").setAttribute("width", ((screenw-946)/2));
	document.getElementById("tablemainframeB").setAttribute("width", 946);
	document.getElementById("tablemainframeC").setAttribute("width", ((screenw-946)/2));
}
function showpopup(mypage,myname,w,h,scrollbar){
	settings = 'width=' + w + ',height=' + h + ',scrollbars=' + scrollbar + ',location=0,status=0';
	win = window.open(mypage,myname,settings);
	win.moveTo(0,0);
}
function NumbersOnly(eventObj) {
	if (!(event.keyCode>=0x30 && event.keyCode<=0x39)) {
		event.returnValue=false;
	}
}
function check_email(frm,e) {
	if (frm) {
	char_first = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
	char_second = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(char_first) && e.match(char_second)) {	return (-1); } 
	}
}
