				function showWaitingMessage() {
					if(document.getElementById('myform').status.value == 'LOGGED_IN'){
						//waitWindow.style.display = 'block';
						//sendWindow.style.display = 'none';
					}
				}
				
				function doSend()
				{
					document.getElementById('myform').action.value = 'send';
					showWaitingMessage();
					document.getElementById('myform').submit();
				}
				
				function doInsert()
				{
					document.getElementById('myform').action.value = 'insert';
					document.getElementById('myform').submit();
				}
				
				function doReset()
				{
					document.getElementById('myform').action.value = 'reset';
					document.getElementById('myform').submit();
				}
				
				// Link that will appear in all browsers,
				// but will only allow IE to save as a favorite
				function Add_A_Favorite() 
				{ 
						if (window.external) 
						// if the browser is IE open the add favorite window
						{
						external.AddFavorite(location.href, document.title)
						// Add the document location and title to the AddFavorite window
						}
						else 
						// Display and alert box for any other browser.
						{
						alert('Sorry, your browser doesn&acute;t support this feature.');
						}
				}
				
				function updateLeftChars()
				{
					max_len = 160;
					msg_text = document.getElementById('myform').smsmessage.value;
					msg_len = msg_text.length;
					if (msg_len > max_len)
					{
					document.getElementById('myform').smsmessage.value = msg_text.substring(0, max_len);
					document.getElementById('myform').counter.value = 0;
					}
					else
					document.getElementById('myform').counter.value = (max_len - msg_len);
				}
