On Error Resume Next
' declare all variables
Dim objFSO, objFolder, objFiles, objFile
Dim strFiles, strImages, strPhysical, strFile
' this constant has the names of valid image file name
' extensions and can be modified for more image types
Const strValid = ".gif.jpg.png"
' make sure we have a trailing slash in the path
If Right(strPath,1) <> Chr(47) Then strPath = strPath & Chr(47)
' get the physical path of the folder
strPhysical = Server.MapPath(strPath)
' get a File System Object
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
' create a folder object
Set objFolder = objFSO.GetFolder(strPhysical)
' get the files collection
Set objFiles = objFolder.Files
' enumerate the files collection looking for images
For Each objFile in objFiles
strFile = LCase(objFile.Name)
If Instr(strValid,Right(strFile,4)) Then
' add vaild images to a string of image names
strFiles = strFiles & strFile & vbTab
' split the image names into an array
strImages = Split(strFiles,vbTab)
' if we have an array...
If UBound(strImages) > 1 Then
' get a random name
RandomImage = strPath & strImages(Int(Rnd(1)*UBound(strImages)))
' otherwise return the default
RandomImage = strDefault
Dozens of genes have been identified that cause epilepsy and EGI is dedicated to helping patients and advancing research. This page is designed to help families who have a genetic epilepsy to learn more and connect with others as we work to find the cures for epilepsy together!
Click a picture below to filter by age
or see all identified epilepsy genes. (Some genes cause more than one type of epilepsy and may be found on more than one page)
There are many genes that contribute to epilepsy and each is associated with a different age that the seizures start, the types of seizures, and other associated features. Click here to learn more about where the genes on this list come from.
Scroll through the list and click on a specific gene to see its detailed information.
The genes below have been identified as genes known to contribute to epilepsy in infants. Click one to learn more about that specific gene.
Adult genes are identified in persons over the age of 18. Currently, there are
identified that contribute to epilepsy in adults.
LEGAL NOTICE: The information contained herein is provided for general information only and does not offer medical advice or recommendations. Individuals should not rely on this information as a substitute for consultations with qualified health care professionals who are familiar with individual medical conditions and needs. CURE strongly recommends that care and treatment decisions related to epilepsy and any other medical condition be made in consultation with a patient's physician or other qualified health care professionals who are familiar with the individual's specific health situation.