function winpoptox(mod,wh,hh,vb,target,sb) {
	if (sb == null) { sb='no'; }
	w_x=(screen.width-wh)/2;
	w_y=(screen.height-hh)/2;
	window.open(mod + '.php?' + vb,target,"scrollbars="+ sb +",toolbar=no,top=1,left=1,resizable=no,screenX=1,screenY=1,menubar=no,location=no,width="+ wh +",height="+ hh +",status=no");
}
function winpoptopr(mod,wh,hh,vb,target,sb) {
	if (sb == null) { sb='no'; }
	w_x=(screen.width-wh)/2;
	w_y=(screen.height-hh)/2;
	window.open(mod + '.php?' + vb,target,"scrollbars="+ sb +",toolbar=no,top=1,left=1,resizable=no,screenX=1,screenY=1,menubar=yes,location=no,width="+ wh +",height="+ hh +",status=no");
}

function wopen(href) {
	window.open(href,'_top');
}

function cfmDel(msg) {
	cfm=confirm(msg);
	if (cfm == false) { return false }
}

function cekFm(fmName) {
	infoData="Info Data \n";
	fmLenght=fmName.elements.length;
	for (i=0;i<fmLenght;i++) {
		if (fmName.elements[i].value == "") {
			alert('Lengkapi semua form isian');
			fmName.elements[i].focus();
			return false;
		}
	}
	cfmReg=confirm('Apakah Anda yakin data sudah benar ?');
	if (cfmReg == false) { return false; }
}

function checkAll(field)
{
for (i = 0; i < field.length; i++)
field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
field[i].checked = false ;
}

function fillAll(fmName,chk) {
	if (chk == true) { checkAll(fmName); }
	if (chk == false) { uncheckAll(fmName); }
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=350');");
}