var newWin = null;
function updateForm() 
{	
	document.leadform.change.value = "true";
	document.leadform.submit();		
}
function setfocus()
{
	if(document.getElementById('formbasic')) {		
		if(document.leadform.CN.value!="---"){
			document.leadform.PC.focus();
		}
	}
}
function doProcessing() 
{
  document.getElementById('submitBtn').className = 'thide'; 	
  document.getElementById('processing').className = 'tshow';
}
function popupWindow(winURL,winStyle,winFeatures,winObj)
{
  var theWin; // this will hold our opened window
  var winFeatures = 'resizable=1,scrollbars=1,toolbar=1,status=1,menubar=1,location=1';
	
  // first check to see if the window already exists
  if (winObj != null)
  {
    // the window has already been created, but did the user close it?
    // if so, then reopen it. Otherwise make it the active window.
    if (!winObj.closed) {
		if(winStyle=="outer") {
			winObj.focus();
		}else {
 			window.focus();
		}	
      return winObj;
    }
    // otherwise fall through to the code below to re-open the window
  }

  // if we get here, then the window hasn't been created yet, or it
  // was closed by the user.
  theWin = window.open(winURL,winStyle,winFeatures);
	if(winStyle=="outer") {
		theWin.focus();
	}else {
 		window.focus();
	}	
 return theWin;
}
