function openWindowIncorrectListing()
{
	//window.open('report.jsp','Popup_Window','resizable=1,menubar=1,scrollbars=1,width=625,height=595,top=0,left=0'); 
	var a = window.setTimeout("document.incorrectListingForm.submit();",500); 
	return false;
}

// If the length of the element's string is 0 then display helper message
function isEmpty(){
	if(document.incorrectListingForm.CorrectedBy_Name.value == ""){
		alert('Please enter your name');
		elem.focus(); // set the focus to this input
		return true;
	}
	return false;
}

function ValidateForm(form){
	if(((form.businessName.value.length==0)|| (Trim(form.businessName.value).length==0))&&((form.businessType.value.length==0)|| (Trim(form.businessType.value).length==0))) {
		alert ('Please enter Business Name or Business Type');
		return false;
	}
	else {
		return true;
	}
}

function Trim(str)
{  while(str.charAt(0) == (" ") )
  {  str = str.substring(1);
  }
  while(str.charAt(str.length-1) == " " )
  {  str = str.substring(0,str.length-1);
  }
  if (str.charAt(0) == (" ") )
  {  str = str.substring(1);
  }
  return str;
}
