//file redirects http to https when menu items are clicked

function SendVisitorToSecureSite(pRelUrl,pIsUrlCapableOfHttps)
{    
        var protocol = document.location.protocol;
        var host = document.location.hostname;
        
            if(pIsUrlCapableOfHttps == true)
            {  
                var path = 'https://' + host + pRelUrl;

			/* This block of code is searching ".alpha." in the variable "host". 
			 * -1 : means ".alpha."  is not present.
			 * By - Indranil Basu. date - 16/12/09
			 */
				var myRegExp = /.alpha./;
				var matchPos1 = host.search(myRegExp);
                if(matchPos1 == -1)
                {
                    window.location.href=path;
                    return false;
                }          
			/************************** The code ends here *********************/
                    
            }
        /*    else if(protocol == 'https:' && pIsUrlCapableOfHttps == false)
            {
                 var path = 'http://' + host + pRelUrl;
                 window.location.href=path;
                 return false;  
            }          */

}
