function FormToSearchUri(eventForm)
{
  var theData = '';
  var theform = ''
  if (eventForm) 
  {
    theform = eventForm;
  }
  else
  {
    theform = document.forms[0];
  }
  var eName = '';
 
  for( var i=0; i<theform.elements.length; i++ )
  {
    eName = theform.elements[i].name;
    if( eName && eName != '' && 
      (theform.elements[i].type != 'checkbox' || (theform.elements[i].type == 'checkbox' && theform.elements[i].checked))
      )
    {
      if(theform.elements[i].type == 'select-multiple')
      {
        var ob = theform.elements[i];
        for (var j = 0; j < ob.options.length; j++) 
          if (ob.options[j].selected) {
            theData = theData + escape(eName.split("$").join(":")) + '=' + ob.options[j].value;
            theData = theData + '&';
          }
      }
      else
      {
        theData = theData + escape(eName.split("$").join(":")) + '=' + escape(theform.elements[i].value);
        theData = theData + '&';
      }
    }
  }
  return theData+'dummy=bc';
}
function hover(e) 
{
  //e.setAttribute('class', 'click_h');
  e.className='click_h';
}
function unhover(e) 
{
  //e.setAttribute('class', 'click');
  e.className='click';
}
function closeElementWithId(id)
{
  var e = document.getElementById(id);
  e.style.display = 'none';
}
function validEmail(string) {
  if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
    return true;
  else
    return false;
}
function selectValue(s)
{
  var sel = null;
  if (s && s.selectedIndex >= 0) {
    sel = s.options[s.selectedIndex].value;
  }
  return sel;
}
