function windowOpen(URL) {

	var theWindow = window.open(URL,'CCCWindow','menubar=yes,width=640,height=520,top='+screen.availTop+',left='+screen.availLeft+',resizable,scrollbars=yes');

}
function windowOpenVar(URL,w,h) {

	var theWindow = window.open(URL,'CCCWindowVar','menubar=yes,width='+w+',height='+h+',top='+screen.availTop+',left='+screen.availLeft+',resizable,scrollbars=yes');
	if (window.focus) {theWindow.focus();}	
}
function windowOpenNoSize(URL) {

	var theWindow = window.open(URL,'CCCWindow','menubar=yes,top='+screen.availTop+',left='+screen.availLeft+',resizable,scrollbars=yes');

}
var submitting =false;
function diableSubmit()
{
	if (submitting)
	{	
		alert('Page already submitted. Please wait.');
		return false;
	}
	submitting = true;
	return true;
}
function jsTrim(sText) { 
    //Remove leading spaces
  
    while (sText.substring(0,1) == ' ') 
        sText = sText.substring(1, sText.length);

    //Remove trailing spaces 
    while (sText.substring(sText.length-1,sText.length) == ' ')
        sText = sText.substring(0, sText.length-1);
		
   return sText;
}
