// This is to make sure the page is secure or not
function chkHTTPS()	{		
	loc = document.location
	httpCheck1 = (loc.href).substr(0,4);	
	httpCheck2 = (loc.href).substr(0,5);	
	if(httpCheck1 != 'http' || httpCheck2 != "https"){
			locSplit  = loc.href.split('http://')
			if(locSplit[0] == null || locSplit[0].length == 0){
				gotoLoc = "https://" + locSplit[1];				
				document.location.href = gotoLoc;
			}else{
				gotoLoc = "https://" + locSplit[0];				
				document.location.href = gotoLoc;
			}		
	}
}

/*
function nonHTTPS()	{		
	loc = document.location
	httpCheck1 = (loc.href).substr(0,4);	
	httpCheck2 = (loc.href).substr(0,5);	
	if(httpCheck2 == "https"){
			locSplit  = loc.href.split('https://')
			if(locSplit[0] == null || locSplit[0].length == 0){
				gotoLoc = "http://" + locSplit[1];				
				document.location.href = gotoLoc;
			}else{
				gotoLoc = "http://" + locSplit[0];				
				document.location.href = gotoLoc;
			}		
	}
}
*/
