

var tcdacmd="dt";
var ANS_customer_id="e9681d3e-eead-4276-805a-74d2888d2419";
function popupWindow(url){window.open(url, 'popupWindow', 'toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = yes, resizable = yes, copyhistory = no, width = 400, height = 400, screenX = 150, screenY = 150, top = 150, left = 150');}
function popupWindowExtra(url){window.open(url, 'popupWindow', 'toolbar = no, location = no, directories = no, status = no, menubar = no, scrollbars = yes, resizable = yes, copyhistory = no, width = 400, height = 400, screenX = 150, screenY = 150, top = 150, left = 150');}
function toggle(element){var id = document.getElementById(element);if(id.style.display == 'none'){id.style.display = '';}else{id.style.display = 'none';}}
function disable(element){document.getElementById(element).style.display = 'none';}
function enable(element){document.getElementById(element).style.display = '';}
function setBookmark(){if (document.all)window.external.AddFavorite(location.href, document.title);else alert('Click \'OK\' then Press CTRL and D to add a bookmark to:\n"' + document.title);} 
function phpOnlinePopupWindow() 
{
  var url = "http://thepartyworks.com/livechat/client.php";
  window.open(url,'popupWindow2','toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=550,height=400,screenX=150,screenY=150,top=150,left=150');
}

        function verify(form) 
        {
           var passed = false;
        var blnRetval, intAtSign, intDot, intComma, intSpace, intLastDot, intDomain, intStrLen;
        if (form.Email){
                       intAtSign=form.Email.value.indexOf("@");
                        intDot=form.Email.value.indexOf(".",intAtSign);
                        intComma=form.Email.value.indexOf(",");
                        intSpace=form.Email.value.indexOf(" ");
                        intLastDot=form.Email.value.lastIndexOf(".");
                        intDomain=intDot-intAtSign;
                        intStrLen=form.Email.value.length;
                // *** CHECK FOR BLANK EMAIL VALUE
                   if (form.Email.value == "" ) 
                   {
                alert("You have not entered an email address.");
                form.Email.focus();
                passed = false;
                }
                // **** CHECK FOR THE  @ SIGN?  
                else if (intAtSign == -1)
                {
                
                alert("Your email address is missing the \"@\".");
                        form.Email.focus();
                passed = false;
                
                }
                // **** Check for commas ****
                
                else if (intComma != -1)
                {
                alert("Email address cannot contain a comma.");
                form.Email.focus();
                passed = false;
                }
                
                // **** Check for a space ****
                
                else if (intSpace != -1)
                {
                alert("Email address cannot contain spaces.");
                form.Email.focus();
                passed = false;
                }
                
                // **** Check for char between the @ and dot, chars between dots, and at least 1 char after the last dot ****
                
                else if ((intDot <= 2) || (intDomain <= 1)  || (intStrLen-(intLastDot+1) < 2)) 
                {
                alert("Please enter a valid Email address.\n" + form.Email.value + " is invalid.");                                             
                form.Email.focus();                                                     
                passed = false;
                }               
                else {
                        passed = true;  
                }
        }
        else    {
                passed = true;
        }
        return passed;
  }