
function closd(){
if(window.wl_close_disclaimer){
 document.getElementById('wl_disclaimer').style.display = 'none';
		}
}

function rsBG(a,changeTo)
	{
	a.style.backgroundColor = changeTo;
	}
	
function maskiano()
{
return "#"+dechex(kuaRndNo())+dechex(kuaRndNo())+dechex(kuaRndNo())
}

function kuaRndNo(){
	var rnum =Math.floor(Math.random() * 255);
	return rnum;
}

function dechex(cval){
	if (cval > 255) {cval = 255};
	hexascii = "0123456789ABCDEF";
	cval0 = Math.floor(cval/16);
	cval1 = cval - (cval0 * 16);
	c1 = hexascii.charAt(cval0);
	c2 = hexascii.charAt(cval1);
	mystr = c1 + c2;
	return mystr;
}

// -------------  THE HEX TO DECIMAL CONVERTER ----------------------
function hexdec(cval){
	cval = cval.toUpperCase();
	var tval = 0; hexascii = "0123456789ABCDEF";
	for(c=0; c<cval.length; c++){
		mychar=cval.charAt(c);
		for(ch=0; ch<16; ch++){
			if (mychar == hexascii.charAt(ch)) {
				tval = tval + ch;
				if (c<cval.length-1) {tval = tval * 16}
			}
			
		}

	}
	return tval;
}

//-------------- validator----------------

function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,4)=="moo_") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(4,5).toUpperCase()+ tempobj.name.substring(5,30);
alert("Mayong laog ang "+shortFieldName+" field, paki fill-up man po.");
return false;
}
else
return true;
}
