function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openWindow(str,features){
        window.name='windowOpener';
        window.open(str,'newWindow',features);
}
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=1,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpWindowNS(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=0,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function checkEmailValue(email)    {

    var emailRegExp = /^[A-Za-z0-9._\-]+@(([A-Za-z]\.)|([A-Za-z0-9][A-Za-z0-9\-]+\.))+[A-Za-z]+$/;
    if (!emailRegExp.test(email.value))    {
        return false;
    }   
    return true;
}

function clearInput(t, txt) {
    if(t.value == txt) 
        t.value = '';
}

function checkEmail(emailID, txt, id) {
    var email = document.getElementById(emailID);
    if(email.value=='') {
        email.style.color = 'red';
        email.value = txt;
        return false;
    }
    else {
        if(email.value == txt) {
            return false;
        }
        else {
            if(!checkEmail(email.value)) {
                email.style.color = 'red';  
                document.getElementById(id).disabled = true; 
                return false;          
            }
            else {
                email.style.color = 'black'; 
                document.getElementById(id).disabled = false;
                return true;
            }
        }
    }

}

function FormCheckEmail(email)    {
    var emailRegExp = /^[A-Za-z0-9._\-]+@(([A-Za-z]\.)|([A-Za-z0-9][A-Za-z0-9\-]+\.))+[A-Za-z]+$/;
    if (!emailRegExp.test(email)){
        return false;
    }
    return true;
}

function FormCheckValue(temp){
    if (temp == 0)    {
        return false;
    }
    return true;
}
