
/***** Neha Mehta *****/
/***** 04 November '08 *****/
// Function for pop-up links where-ever 
// a pop-up page is called for dynamicaly created
// pages using template 7


function Open(URL)
{
    var settings = 'width=642px,height=438px,top=0px,left=0px,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
window.open(URL,'DishTV',settings);
return;
}


function OpenDocument(strURL) {
   
    var settings = 'width=600px,height=600px,top=35%,left=45%,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
    window.open(strURL, 'EXL', settings);

}

function MM_openBrWindow(theURL, winName, features) {
    window.open(theURL, winName, features);
}


var listdivid = "";

function ShowList(divid) {
    if (listdivid != "" && listdivid != divid) {
        document.getElementById(listdivid).style.display = "none";
    }
    listdivid = divid;
    if (document.getElementById(listdivid).style.display == "none") {
        document.getElementById(listdivid).style.display = "block";

        document.getElementById(listdivid).focus();
    }
    else {
        document.getElementById(listdivid).style.display = "none";

    }
}


function ShowListData(listid, txtid) {
//    var cnt = document.getElementById(listid).selectedIndex;
//    var Text = document.getElementById(listid).options[cnt].value;
//    var TextValue = document.getElementById(listid).options[cnt].innerHTML;
//    //alert(document.getElementById(txtid).readOnly);
//  //document.getElementById(txtid).readOnly = false;
//        //alert(document.getElementById(txtid).readOnly);
//    //document.getElementById(txtid).value = TextValue;
    //       // document.getElementById(txtid).contentEditable = true;
    document.getElementById(listdivid).style.display = "none";

}
    function ValidateForm() {
       var RegEmail = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;

       if (document.getElementById("txtVertical").value == "") {
           alert('Please select industry');
           ShowList('divVertical');
           return false;

       }
       else if (document.getElementById("txtEmail").value == "") {
       alert("Please enter E-mail");
       document.getElementById("txtEmail").focus();
       return false;
       }
       else if (!RegEmail.test(document.getElementById("txtEmail").value)) {
               alert("Please enter valid E-mail");
               document.getElementById("txtEmail").focus();
               return false;
           }
       
return true;
    }
