       function showDemo(){
            window.open("http://www.poperti.com/demo.html","Demo","width=851,height=521");
       }


       function ec(ed){
               var regEx = new RegExp("^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\\-+)|([A-Za-z0-9]+\\.+)|([A-Za-z0-9]+\\++))*[A-Za-z0-9]+@((\\w+\\-+)|(\\w+\\.))*\\w{1,63}\\.[a-zA-Z]{2,6}$");
               return ed.match(regEx) != null;
       }

       function egc(ed){
               var regEx = new RegExp("^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\\-+)|([A-Za-z0-9]+\\.+)|([A-Za-z0-9]+\\++))*[A-Za-z0-9]+@gmail.com$");
               return ed.match(regEx) != null;
       }


       function ValidateForm(){
           var userEmailId=document.getElementById("custom");
           var gbPrimaryEmailId=document.getElementById("item_number");

           if ((userEmailId.value==null)||(userEmailId.value=="")){
               //alert("Please Enter your User Email ID")
               document.getElementById("userEmailIdLabel").style.color="red";
               userEmailId.focus()
               return false
           }
           if (ec(userEmailId.value)==false){
               //alert("Invalid user email id.");
               userEmailId.value=""
               userEmailId.focus()
               return false
           }

           document.getElementById("userEmailIdLabel").style.color="black";

           return validateGmailId(gbPrimaryEmailId, document.getElementById("gbPrimaryEmailIdLabel"));

        }

        function validateGmailId(gbPrimaryEmailId, gbPrimaryEmailIdLabel){

           if ((gbPrimaryEmailId.value==null)||(gbPrimaryEmailId.value=="")){
               //alert("Please Enter your Primary Music Repository, a gmail id only")
               gbPrimaryEmailIdLabel.style.color="red";
               gbPrimaryEmailId.focus()
               return false
           }

           if (egc(gbPrimaryEmailId.value)==false){
               //alert("Invalid primary music repository id! should be a gmail id.");
               gbPrimaryEmailId.value=""
               gbPrimaryEmailId.focus()
               return false
           }

           gbPrimaryEmailIdLabel.style.color="black";

           return true;
        }

        function enableDownload(downLink){
           var ele = document.getElementById(downLink);
           ele.style.display = "inline";
        }
