
//window.status='Deje en nuestras manos el diseņo de su web';

function getbrowserwidth()
{
    	if (navigator.userAgent.indexOf("MSIE") > 0)
        	{
        		return(document.body.clientWidth);
        	}
        else
            {
           		return window.outerWidth;
           	}
}

function getbrowserheight()
{
       	if (navigator.userAgent.indexOf("MSIE") > 0)
            {
               	return(document.body.clientHeight);
            } 
        else
    		{
                return(window.outerHeight);
            }
}

var popup = new Object()
function CenterPopup(URL, width, height)
{
var X = getbrowserwidth() / 2
var Y = getbrowserheight() / 2
	
	popup = window.open(URL, 'PopUp', 
		'scrollbars=no ' +
		'width=' + width + ' ' +
		'height=' + height + ' ' +
		'top=' + (window.screenTop + (Y - (height/2))) + ' ' +
		'left=' + (window.screenLeft + (X - (width/2))) 
		)                	
	popup.focus()
}


  function squirrelmail_loginpage_onload() {
    document.forms[0].js_autodetect_results.value = '1';
    document.forms[0].elements[0].focus();
  }

  self.regSMEmail = /^[a-zA-Z0-9\-\.\_]+\@e-design.cl$/;

  function checkForm(form) {
    username = form.login_username.value;
    checkusername = self.regSMEmail.exec(username);
    if ((checkusername == null) || (checkusername[0] != username)) {
      alert("You must enter your fully qualified email address, such as username@e-design.cl");
      return false;    }
  }
