//kumpulan general functions

function winopen(curl)
{
    var height = 0.6*screen.height; //-200-120;
    var width  = 0.7*screen.width; //-200-20;
    var posL = (screen.width - width)/2; //200;
    var posT = (screen.height - height)/2; //200;

    winatur='top='+posT+',left='+posL+'toolbar=no,location=no,directories=no,status=yes, menubar=no,copyhistory=no, width='+width+',height='+height+', scrollbars=yes, resizable=yes';
    win = window.open(curl, "newWin", winatur );
}

function bigwinopen(curl)
{
    winatur='toolbar=no,location=no,directories=no,status=yes, menubar=no,copyhistory=no, scrollbars=yes, resizable=yes';
    win = window.open(curl, "", winatur );
}

function getNewRandomInteger(oldnumber, max) {
var n=Math.floor(Math.random() * (max - 1) + 1);
if (n >= oldnumber) {
n++
}
return n
}

function getRandomInteger(min, max) {
var n=Math.floor(Math.random() * max + 1);

if (n < min) {
n = min;
}

if (n > max) {
n = max;
}

return n
}

//20041222 new func, ex dbaccess.cgi's
function pviiObjbg(obj, new_color) { //v2.1 by Project VII
   obj.style.backgroundColor=new_color
}

//20041222 new func, ex dbaccess.cgi's
function fillvalue(obj, new_value) {
   obj.value=new_value
}
