﻿// JScript File
var rules=new Array();
var rulesNews=new Array();
var extension;
count=0;
count1=0;
function ValidateEdge()
{
//alert("repoty");
count=0;
var currentURL =  window.location+"";
 strEditEnlargeFileName=currentURL;
	position=strEditEnlargeFileName.lastIndexOf("/")+ 1
	extension=strEditEnlargeFileName.substring(position,strEditEnlargeFileName.length)
	//alert(extension);
    //if(currentURL == 'http://localhost/ACBG/index.aspx' || currentURL == 'http://localhost/acbg/index.aspx')
    if(extension=='index.aspx' || currentURL=='http://www.acbg.net/acbg/' )
    {
        rules[count]='Right1_txtEmail|required|Please enter ACBG Edge Analysis email id !! ';
        count++;
        rules[count]='Right1_txtEmail|email|Please enter valid ACBG Edge Analysis email id !! ';
        count++;
       if(rules.length>0)
       {
            return performCheck('aspnetForm', rules, 'classic');
       }
    }
    else
    {
        rules[count]='ctl00_Innerright1_Right1_txtEmail|required|Please enter ACBG Edge Analysis email id !! ';
        count++;
        rules[count]='ctl00_Innerright1_Right1_txtEmail|email|Please enter ACBG Edge Analysis valid email id !! ';
        count++;
        if(rules.length>0)
        {
            return performCheck('aspnetForm', rules, 'classic');
        }
    }
}

function ValidateNews()
{//alert("newsletter");
count1=0;
currentURL =  window.location+"";
strEditEnlargeFileName=currentURL;
position=strEditEnlargeFileName.lastIndexOf("/")+ 1
extension=strEditEnlargeFileName.substring(position,strEditEnlargeFileName.length)
    //if(currentURL == 'http://localhost/ACBG/index.aspx' || currentURL == 'http://localhost/acbg/index.aspx')
    if(extension=='index.aspx'|| currentURL=='http://www.acbg.net/acbg/' )
    {
        rulesNews[count1]='Right1_txtNewsEmail|required|Please enter Subscribe Newsletter Email !! ';
        count1++;
        rulesNews[count1]='Right1_txtNewsEmail|email|Please enter  valid Subscribe Newsletter Email !! ';
        count1++;
         if(rulesNews.length>0)
    {
        return performCheck('aspnetForm', rulesNews, 'classic');
    }
    }
    else
    {
        rulesNews[count1]='ctl00_Innerright1_Right1_txtNewsEmail|required|Please enter Subscribe Newsletter Email !! ';
        count1++;
        rulesNews[count1]='ctl00_Innerright1_Right1_txtNewsEmail|email|Please enter Subscribe Newsletter valid Email !! ';
        count1++;
         if(rulesNews.length>0)
    {
        return performCheck('aspnetForm', rulesNews, 'classic');
    }
    }
   
     
}

