function whitelbl_layeron(strID) {
  if((obj=document.getElementById(strID))!=null) {
		obj.style.visibility='visible';
		obj.style.display='block';
  }
}

function whitelbl_layermoveto(strID,tx,ty) {
	//alert(tx + ' / ' + ty);
  if((obj=document.getElementById(strID))!=null) {
  	//alert(obj.style.left + ' / ' + obj.style.top);
    if(document.layers) {
       	obj.moveTo(tx, ty);
    } else if(document.all) {
        obj.style.left = tx + 'px';
        obj.style.top = ty + 'px';
    } else {
        obj.style.left = tx + 'px';
        obj.style.top = ty + 'px';
    }
    //alert(obj.style.left + ' / ' + obj.style.top);
  }
}

function whitelbl_layeroff(strID) {
  if((obj=document.getElementById(strID))!=null) {
		obj.style.visibility='hidden';
		obj.style.display='none';
  }
}

function whitelbl_layertoggle(strID) { 
  if((obj=document.getElementById(strID))!=null) {
  	if(obj.style.visibility=='hidden') {
  		obj.style.visibility='visible';
  		obj.style.display='block';
  	} else {
  		obj.style.visibility='hidden';
  		obj.style.display='none';
  	}
  }
}

function whitelbl_layertoggle_position(strID,x,y) {
  if((obj=document.getElementById(strID))!=null) {
  	if(obj.style.visibility=='hidden') {
  		obj.style.visibility='visible';
  		obj.style.display='block';
  		obj.style.top=y;
  		obj.style.left=x;
  	} else {
  		obj.style.visibility='hidden';
  		obj.style.display='none';
  	}
  }
}

function whitelbl_setinnerhtml(strID,strHTML) {
	if((obj=document.getElementById(strID))!=null) {
		obj.innerHTML=strHTML;
	}
}

function whitelbl_layertoggle_anchorpos(strID,strAnchorID,intOffset) {
	var x=0;
	var y=0;
	x=findPosX(document.getElementById(strAnchorID))+intOffset;
	y=findPosY(document.getElementById(strAnchorID))+intOffset;
  if((obj=document.getElementById(strID))!=null) {
  	if(obj.style.visibility=='hidden') {
  		obj.style.visibility='visible';
  		obj.style.display='block';
  		obj.style.top=y;
  		obj.style.left=x;
  	} else {
  		obj.style.visibility='hidden';
  		obj.style.display='none';
  	}
  }
}

function whitelbl_divbgcolor(strID,strColor) {
  if((obj=document.getElementById(strID))!=null) {
		obj.style.backgroundColor=strColor;
		obj.bgColor=strColor;
  }
}

function whitelbl_layerswitch(strID,bolOnOff) {
	if(bolOnOff==true) {
		whitelbl_layeron(strID);
	} else {
		whitelbl_layeroff(strID);
	}
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function formsubmitonenter(daEvent,daForm) {
	var characterCode;
	if(daEvent && daEvent.which) {
		characterCode=daEvent.which;
	} else {
		daEvent=window.event;
		characterCode=daEvent.keyCode;
	}
	if(characterCode==13) {
		daForm.submit();
		return true;
	} else {
		return true;
	}
}
