﻿// JScript File
var MasterPagePrefixName="ctl00$ContentPlaceHolder1$";
       
       var strDeliveryDate = "cmbDeliveryDate";
       var strFinalDeliveryDate = MasterPagePrefixName + strDeliveryDate;
       
       var strCountry = "cmbCountry";       
       var strFinalCountry = MasterPagePrefixName + strCountry;
       
       var strState = "cmbState";
       var strFinalState = MasterPagePrefixName + strState;
       
       /*Variables for the add reciepient page*/
        var strOccassion = "cmbOccassion";
        var strFinalOccassion = MasterPagePrefixName + strOccassion;
        
        var strMessage = "txtMessage";
        var strFinalMessage = MasterPagePrefixName + strMessage;        
        
        var strRelationShip = "cmbRelationShip";
        var strFinalRelationShip = MasterPagePrefixName + strRelationShip;
        
        var strFirstName = "txtFirstName";
        var strFinalFirstName = MasterPagePrefixName + strFirstName;
        
        var strLastName = "txtLastName";
        var strFinalLastName = MasterPagePrefixName + strLastName;
        
        var strLocationType = "cmbLocationType";
        var strFinalLocationType = MasterPagePrefixName + strLocationType;
        
        var strCompanyName = "txtCompanyName";
        var strFinalCompanyName = MasterPagePrefixName + strCompanyName;
        
        var strAddress = "txtAddress";
        var strFinalAddress = MasterPagePrefixName + strAddress;
        
        var strCity = "txtCity";
        var strFinalCity = MasterPagePrefixName + strCity;
        
        var strPhoneNumber = "txtPhoneNumber";
        var strFinalPhoneNumber = MasterPagePrefixName + strPhoneNumber;
        
        var strState = "txtState";
        var strFinalState = MasterPagePrefixName + strState;
        
        var strCountry = "txtCountry";
        var strFinalCountry = MasterPagePrefixName + strCountry;
       /**/
              
       function frmProdDetailValidation()
       {
            if(DropDownListChk("aspnetForm",strFinalDeliveryDate,"Delivery Date") == 0)
            {
                return false;
            }
//            alert(strFinalDeliveryDate);
//            alert(strFinalCountry);
//            alert(strFinalState);
            if(DropDownListChk("aspnetForm","ctl00$ContentPlaceHolder1$cmbCountry","Country") == 0)
            {
                return false;
            }
            if(DropDownListChk("aspnetForm","ctl00$ContentPlaceHolder1$cmbState","City") == 0)
            {
                return false;
            }            
       }
       function checkLength(oEvent,target,source,maxLength)
	    {
		    var remLength;		    
		    remLength = maxLength - target.value.length;
		    if(remLength <= 0)
			    if(oEvent.keyCode != 8)
				    return false;		    
		    source.innerHTML = remLength;
	    }	
        function printLength(target,source,maxLength)
	    {
		    var remLength;
		    remLength = maxLength - target.value.length;
		    source.innerHTML = remLength;
	    }
	    function frmAddRecValidation()
	    {
	        if(DropDownListChk("aspnetForm",strFinalRelationShip,"Relationship") == 0)
            {
                return false;
            }
	        if(chkMandatory("aspnetForm",strFinalFirstName,"First Name") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm",strFinalLastName,"Last Name") == 0)
            {
                return false;
            }
            if(chkNonMandatory("aspnetForm",strFinalCompanyName,"Company Name") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm",strFinalAddress,"Address") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm",strFinalCity,"City") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm",strFinalPhoneNumber,"Phone Number") == 0)
            {
                return false;
            }
            if(PhoneNumberChk("aspnetForm",strFinalPhoneNumber,"Phone Number") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm",strFinalState,"State") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm",strFinalCountry,"Country") == 0)
            {
                return false;
            }
	    }
	    function frmAddUser()
	    {
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtName","User Name") == 0)
            {
                return false;
            }
            if(EmailChk("aspnetForm","ctl00$ContentPlaceHolder1$txtEmail","E-mail ID") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtPassword","Password") == 0)
            {
                return false;
            }
	    }
	    function chkQuantity(arg)
	    {
	        if(arg.value==0)
	        {
	            alert("Please enter value greater than 0.");
		        document.getElementById(arg.id).value = "";
	        }
	        if(isNaN(arg.value)==true)
	        {
		        alert("Please enter only numeric value.");
		        document.getElementById(arg.id).value = "";
	        }
            if(chkQtndecimal(arg.value) == 0 )
		    {
			    alert("Please do not put decimal.");
			    eval(document.getElementById(arg.id)).value = "";
		    }
	    }
	    function frmLoginValidation()
	    {
	        if(EmailChk("aspnetForm","ctl00$ContentPlaceHolder1$txtEmailId","E-mail ID") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtPassword","Password") == 0)
            {
                return false;
            }
           
	    }
	    function makeReadOnly(arg)
	    {
	        if(arg.checked)
	            document.getElementById("ctl00$ContentPlaceHolder1$txtPassword").readOnly=true;
	        else
	            document.getElementById("ctl00$ContentPlaceHolder1$txtPassword").readOnly=false;
	    }
	    function unmakeReadOnly(arg)
	    {
	        if(arg.checked)
	            document.getElementById("ctl00$ContentPlaceHolder1$txtPassword").readOnly=false;
	        else
	            document.getElementById("ctl00$ContentPlaceHolder1$txtPassword").readOnly=true;
	    }
	    function frmCOValidate()
        {
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_Name","Billing Details Name") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_Email","Billing Details E-mail") == 0)
	        {		        
		        return false
	        }
	        if(EmailChk("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_Email","Billing Details E-mail") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_Address","Billing Details Address") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_PostCode","Billing Details Post Code") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_City","Billing Details City") == 0)
	        {
		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_Country","Billing Details Country") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_PhoneNo","Billing Details Phone ") == 0)
	        {	     
		        return false
	        }
	        if(PhoneNumberChk("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_PhoneNo","Billing Details Phone ") == 0)
            {  
                return false;
            }
	        if(checkCharLength("aspnetForm","ctl00$ContentPlaceHolder1$txtBilling_Comments","Billing Details Comments",500) == 0)
	        {		        
		        return false
	        }
        	
	        //shipping address
        	
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_Name","Shipping Details Name") == 0)
	        {
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_Email","Shipping Details E-mail") == 0)
	        {		        
		        return false
	        }
	        if(EmailChk("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_Email","Shipping Details E-mail") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_Address","Shipping Details Address") == 0)
	        {
		       
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_PostCode","Shipping Details Post Code") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_City","Shipping Details City") == 0)
	        {		       
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_Country","Shipping Details Country") == 0)
	        {		        
		        return false
	        }
	        if(chkMandatory("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_PhoneNo","Shipping Details Phone ") == 0)
	        {		        
		        return false
	        }
	          if(PhoneNumberChk("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_PhoneNo","Shipping Details Phone ") == 0)
            {
                return false;
            }
	        if(checkCharLength("aspnetForm","ctl00$ContentPlaceHolder1$txtShopping_Comments","Shipping Details Comments",500) == 0)
	        {
		        return false
	        }
        }
function CopyDetails()
{
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_Name.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_Name.value
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_Email.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_Email.value
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_Address.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_Address.value
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_PostCode.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_PostCode.value
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_City.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_City.value
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_Country.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_Country.value
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_PhoneNo.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_PhoneNo.value
	document.aspnetForm.ctl00$ContentPlaceHolder1$txtShopping_Comments.value  = document.aspnetForm.ctl00$ContentPlaceHolder1$txtBilling_Comments.value
}
function frmUpperLoginValidation()
{
            if(document.getElementById("Top1_txtUpperUserName")!=null)
                {
                    if(EmailChk("aspnetForm","Top1_txtUpperUserName","E-mail ID") == 0)
                    {
                        return false;
                    }
                }
                else
                {
                    if(EmailChk("aspnetForm","ctl00_Top_txtUpperUserName","E-mail ID") == 0)
                    {
                        return false;
                    }
                }
             if(document.getElementById("uclTOPNAV$txtUpperPassword")!=null)
                {
                    if(chkMandatory("aspnetForm","uclTOPNAV$txtUpperPassword","Password") == 0)
                    {
                        return false;
                    }
                }
            else
                {
                    if(chkMandatory("aspnetForm","ctl00$uclTOPNAV$txtUpperPassword","Password") == 0)
                        {
                            return false;
                        }
                }
}
function validateSearch()
{   
    if(document.getElementById("uclMainNAV_txtSearch")!=null)
    {
        if(chkMandatory("aspnetForm","uclMainNAV$txtSearch","Search Word(s)") == 0)
            {
                //ctl00$uclMainNAV$txtSearch
                return false;
            }
    }    
    if(document.getElementById("ctl00_uclMainNAV_txtSearch")!=null)
    {
        if(chkMandatory("aspnetForm","ctl00$uclMainNAV$txtSearch","Search Word(s)") == 0)
            {
                return false;
            }
    }
}
function frmIndexUpperLoginValidation()
{
            if(EmailChk("aspnetForm","txtUpperUserName","E-mail ID") == 0)
            {
                return false;
            }
            if(chkMandatory("aspnetForm","txtUpperPassword","Password") == 0)
            {
                return false;
            }
}
function adminloginvalidate()
{
	var name=document.frmLogin.txtUserName.value.replace(/ /g,"")
	if(name=="")
	{
		alert("Please enter the Username");
		document.frmLogin.txtUserName.focus();
		return false;
	}
	else
	{
		if(expvarchar.test(name)==true)
		{
			alert('Special characters like '+msg+' are not allowed in Username.');
			document.frmLogin.txtUserName.focus();
			return false;
		}
	}
	var password=document.frmLogin.txtPassword.value.replace(/ /g,"")
	if(password=="")
	{
		alert("Please enter the Password")
		document.frmLogin.txtPassword.focus();
		return false;
	}
	else
	{
		if(expvarchar.test(password)==true)
		{
			alert('Special characters like '+msg+' are not allowed in Password.');
			document.frmLogin.txtPassword.focus();
			return false;
		}
	}	
}
function validateCategoryType()
{  
    if(chkMandatory("aspnetForm","ctl00$CPHolder$txtCategoryName","Category Name") == 0)
    {
        return false;
    }	
}
function validateCategory()
{
    if(DropDownListChk("aspnetForm","ctl00$CPHolder$cmbCategoryType","Category Type") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm","ctl00$CPHolder$txtCategoryName","Category Name") == 0)
    {
        return false;
    }
//    if(checkCharLength('aspnetForm','ctl00$CPHolder$txtCategoryDesc','Category Description',100) == 0)
//	{
//		document.frmCheckOut.txtBilling_Comments.focus();
//		return false
//	}
	if (validateSEO()==false)
	{
		return false;
	}	
}
//Function to validate the SEO fileds
function validateSEO()
{
	var formname = document.aspnetForm;
	var pagename = formname.ctl00$CPHolder$uclSEOAdd$txtPageName.value.replace(/ /g,"");
	if (pagename!="" )
	{
		if(expvarchar.test(pagename)==true)
		{
			alert('Special characters like ' +msg +' are not allowed in Page Name')
			formname.ctl00$CPHolder$uclSEOAdd$txtPageName.focus();
			return false;	
		}	
	}	
	if (pagename!='')
	{  	
		var arr=new Array();
		arr=pagename.split('.');
		if(arr[arr.length-1].toUpperCase() != "HTM")		
		{
			alert("Page Name must contain \".htm\" extension.")
			formname.ctl00$CPHolder$uclSEOAdd$txtPageName.focus();
			return false;
		}	
	}		
	var pagetitle= formname.ctl00$CPHolder$uclSEOAdd$txtPageTitle.value.replace(/ /g,"")
	if (pagetitle!="" )
	{
		if(expvarchar.test(pagetitle)==true)
		{
			alert('Special characters like ' +msg +' are not allowed in Page Title')
			formname.ctl00$CPHolder$uclSEOAdd$txtPageTitle.focus();
			return false;	
		}	
	}

	var metakeywords = formname.ctl00$CPHolder$uclSEOAdd$txtMetaKeyWords.value.replace(/ /g,"")
	if (metakeywords!="" )
	{
		if(expvarchar.test(metakeywords)==true)
		{
			alert('Special characters like ' +msg +' are not allowed in Meta keywords')
			formname.ctl00$CPHolder$uclSEOAdd$txtMetaKeyWords.focus();
			return false;	
		}
		if(metakeywords.length>500)
		{
			alert("Meta keywords can only be 500 characters long")
		}	
	}

	var metadescription= formname.ctl00$CPHolder$uclSEOAdd$txtMetaDescription.value.replace(/ /g,"")
	if (metadescription!="" )
	{
		if(expvarchar.test(metadescription)==true)
		{
			alert('Special characters like ' +msg +' are not allowed in Meta Description')
			formname.ctl00$CPHolder$uclSEOAdd$txtMetaDescription.focus();
			return false;	
		}
		if(metadescription.length>500)
		{
			alert("Meta description can only be 500 characters long")
		}	
	}
	
	var content = formname.ctl00$CPHolder$uclSEOAdd$txtContent.value.replace(/ /g,"")
	if (content!="" ){
		if(expvarchar.test(content)==true)
		{
			alert('Special characters like ' +msg +' are not allowed in Content')
			formname.ctl00$CPHolder$uclSEOAdd$txtContent.focus();
			return false;	
		}
		if(content.length>500)
		{
			alert("Content keywords can only be 500 characters long")
		}
	}
}
function validateEditProds()
{
    if(DropDownListChk("aspnetForm","ctl00$CPHolder$cmbCategoryType","Category Type") == 0)
    {
        return false;
    }
    if(DropDownListChk("aspnetForm","ctl00$CPHolder$cmbCategoryName","Category Name") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm","ctl00$CPHolder$txtProductName","Product Name") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm","ctl00$CPHolder$txtProductCode","Product Code") == 0)
    {
        return false;
    }    
//    if(chkMandatoryPrice("aspnetForm","ctl00$CPHolder$txtINRPrice","Price In INR")== 0)
//    {
//        return false;
//    }
    if(chkMandatoryPrice("aspnetForm","ctl00$CPHolder$txtUSDPrice","Price")== 0)
    {
        return false;
    }
    var file = ".jpeg,.gif,.jpg";
    var thumbfileexts=eval('document.aspnetForm.ctl00$CPHolder$txtProductImage.value');   
	var thumbfileext=eval('document.aspnetForm.ctl00$CPHolder$txtProductImage.value.replace(/ /g,"")');
	thumbfileext=thumbfileext.replace(/\n/g, "");
	thumbfileext=thumbfileext.replace(/\r/g, "");	
	if (thumbfileext!='')
	{	
		if(!LimitAttach("aspnetForm",thumbfileexts,file))
		{		
		    return false;	
		}
	}
	if(checkManCharLength("aspnetForm","ctl00$CPHolder$txtProductDesc","Product Description",500) == 0)
    {
        return false
    }
    if (validateSEO()==false)
	{
		return false;
	} 
}
function validateAddProds()
{
    if(DropDownListChk("aspnetForm","ctl00$CPHolder$cmbCategoryType","Category Type") == 0)
    {
        return false;
    }
    if(DropDownListChk("aspnetForm","ctl00$CPHolder$cmbCategoryName","Category Name") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm","ctl00$CPHolder$txtProductName","Product Name") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm","ctl00$CPHolder$txtProductCode","Product Code") == 0)
    {
        return false;
    }    
//    if(chkMandatoryPrice("aspnetForm","ctl00$CPHolder$txtINRPrice","Price In INR")== 0)
//    {
//        return false;
//    }
    if(chkMandatoryPrice("aspnetForm","ctl00$CPHolder$txtUSDPrice","Price")== 0)
    {
        return false;
    }
    var file = ".jpeg,.gif,.jpg";
    var thumbfileexts=eval('document.aspnetForm.ctl00$CPHolder$txtProductImage.value');   
	var thumbfileext=eval('document.aspnetForm.ctl00$CPHolder$txtProductImage.value.replace(/ /g,"")');
	thumbfileext=thumbfileext.replace(/\n/g, "");
	thumbfileext=thumbfileext.replace(/\r/g, "");
	if(thumbfileext=='')
	{
	    alert("Please select the Product Image");
	    return false;
	}
	if (thumbfileext!='')
	{	
		if(!LimitAttach("aspnetForm",thumbfileexts,file))
		{		
		    return false;	
		}
	}
	if(checkManCharLength("aspnetForm","ctl00$CPHolder$txtProductDesc","Product Description",500) == 0)
    {
        return false
    }
    if (validateSEO()==false)
	{
		return false;
	} 
}
function validateAssociateSizes()
{
    if(chkNonMandatoryPrice("aspnetForm","ctl00$CPHolder$txtINRPrice1","Price In INR")== 0)
    {
        return false;
    }
    if(chkNonMandatoryPrice("aspnetForm","ctl00$CPHolder$txtUSDPrice1","Price In USD")== 0)
    {
        return false;
    }
    if(chkViceVersaPrice("aspnetForm","ctl00$CPHolder$txtINRPrice1","ctl00$CPHolder$txtUSDPrice1","Price In USD")== 0)
    {
        return false;
    }
    if(chkNonMandatoryPrice("aspnetForm","ctl00$CPHolder$txtINRPrice2","Price In INR")== 0)
    {
        return false;
    }
    if(chkNonMandatoryPrice("aspnetForm","ctl00$CPHolder$txtUSDPrice2","Price In USD")== 0)
    {
        return false;
    }
    if(chkViceVersaPrice("aspnetForm","ctl00$CPHolder$txtINRPrice2","ctl00$CPHolder$txtUSDPrice2","Price In USD")== 0)
    {
        return false;
    }
}
function frmEditRecValidation()
{
    if(DropDownListChk("aspnetForm",strFinalRelationShip,"Relationship") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm",strFinalFirstName,"First Name") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm",strFinalLastName,"Last Name") == 0)
    {
        return false;
    }
    if(chkNonMandatory("aspnetForm",strFinalCompanyName,"Company Name") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm",strFinalAddress,"Address") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm",strFinalCity,"City") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm",strFinalPhoneNumber,"Phone Number") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm",strFinalState,"State") == 0)
    {
        return false;
    }
    if(chkMandatory("aspnetForm",strFinalCountry,"Country") == 0)
    {
        return false;
    }
}
function validateOrder()
{
    if(CompareDates("aspnetForm","ctl00$CPHolder$txtStartDate","ctl00$CPHolder$txtEndDate","Date From","Date To")==0)
    {
        return false;
    }
    if(chkNonMandatory("aspnetForm","ctl00$CPHolder$txtOrderNumber","Order No.") == 0)
    {
        return false;
    }
}
function MassUploadValidate()
{
    var file = ".xls";
    var thumbfileexts=eval('document.aspnetForm.ctl00$CPHolder$txtProductFile.value');
	var thumbfileext=eval('document.aspnetForm.ctl00$CPHolder$txtProductFile.value.replace(/ /g,"")');
	thumbfileext=thumbfileext.replace(/\n/g, "");
	thumbfileext=thumbfileext.replace(/\r/g, "");
	if(thumbfileext=='')
	{
	    alert("Please select the Product File");
	    return false;
	}
	if (thumbfileext!='')
	{	
		if(!LimitAttach("aspnetForm",thumbfileexts,file))
		{		
		    return false;	
		}
	}
}
 function frmFeedbackValidation()
{
    if(chkMandatory("aspnetForm","ctl00_ContentPlaceHolder1_txtName","Name") == 0)
    {
        return false
    }
    if(EmailChk("aspnetForm","ctl00_ContentPlaceHolder1_txtEmailId","Email") == 0)
    {
        return false
    }
    if(chkMandatory("aspnetForm","ctl00_ContentPlaceHolder1_txtPhone","Phone") == 0)
    {
        return false
    }
    if(PhoneNumberChk("aspnetForm","ctl00_ContentPlaceHolder1_txtPhone","Phone ") == 0)
    {  
        return false;
    }
    if(DropDownListChk("aspnetForm","ctl00_ContentPlaceHolder1_cmbFeedback","Feedback related to") == 0)
    {
        return false
    }
    if(checkCharLength("aspnetForm","ctl00_ContentPlaceHolder1_txtDesc","Description",500) == 0)
    {
        return false
    }
}
function frmForGotValidation()
{
    if(EmailChk("aspnetForm","ctl00_ContentPlaceHolder1_txtEmailId","E-mail ID") == 0)
    {
        return false
    }
}

/* Script for set enter key press on Login Button By Upper Div */
function onEnterKeyPress(e)
{
   var key = window.event ? e.keyCode : e.which;      
   if(event.keyCode==13) 
   {
        event.keyCode=9;
        var btn = document.getElementById('ctl00_uclTOPNAV_btnUpperLogin');   
        if(btn != null)
        {
          btn.click();
          return false; 
        }
        var Indexbtn = document.getElementById('uclTOPNAV_btnUpperLogin');
        if(Indexbtn!=null)
        {       
            Indexbtn.click();
            return false;
        }
        return true;
    }
}  

/* Script for set enter key press on Search Button */
function onEnterKeyPressForSearch(e)
{
   var key = window.event ? e.keyCode : e.which;      
   if(event.keyCode==13) 
   {
        event.keyCode=9;
        var btn = document.getElementById('ctl00_uclMainNav_btnSearch');   
        if(btn != null)
        {
          btn.click();
          return false; 
        }
        var Indexbtn = document.getElementById('uclMainNav_btnSearch');
        if(Indexbtn!=null)
        {       
            Indexbtn.click();
            return false;
        }
        return true;
    }
}     