function isEmpty(s) { return ((s == null) || (s.length == 0)) }

// function isEmpty=function(s) { return ((s == null) || (s.length == 0)) }


function isInvalidemail(str)
{
 var invalidcheck=0;
 var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
 if (filter.test(str))
 {
   return false;
 }  
else
 {
  return true;
 }
}


function getCoords (element)
{
var coords = { x: element.style.top, y: element.style.left, width: element.offsetWidth, height:element.offsetHeight };
return coords;
/* 
while (element) {
coords.x += element.offsetLeft;
coords.x=element.offsetLeft;
coords.y += element.offsetTop;
coords.y= element.offsetTop;
element = element.offsetParent;
}
return coords; */
}

function populateMultipleSelect(obj, valores)
{
  // valores string = 08,09,10
  var lsBuscar=","+valores+",";
  // valores 08 -> ,08,   08,19  -> ,08,19,  
  for (var index=0; index<obj.length; index++)
  {
 //   alert(obj.length+"->"+index+"->"+obj[index].value+"->"+obj[index].selected);
    // buscamos ,08,
    if(lsBuscar.indexOf(","+obj[index].value+",")>-1)
      {
        obj[index].selected=true;
//alert(obj[index].value+"->ESTE SI");
      }
      else obj[index].selected=false;
  }    
}