<!--
function CalculateRaid()
{
	NumberOfDisks = parseInt(document.FORM_Raid.txtNumberOfDisks.value);
	SpaceOnDrives = parseFloat(document.FORM_Raid.txtSpaceofDrives.value);
	DiskSpace = NumberOfDisks*SpaceOnDrives;
	
	strTitle = "";
	strDef = "";
	strRedundancy = "";
	strPerformance = "";
	strUtilization = "";
	strDrawbacks = "";

	if (document.FORM_Raid.txtNumberOfDisks.value == "" || document.FORM_Raid.txtSpaceofDrives.value == "")
	{
	}
	else
	{
		for (i=0;i<document.FORM_Raid.rRAIDTYPE.length;i++)
		{
			if (document.FORM_Raid.rRAIDTYPE[i].checked)
			{
				strRaidType = document.FORM_Raid.rRAIDTYPE[i].value; 
			}		
		}
	
		if (parseInt(document.FORM_Raid.txtNumberOfDisks.value) != 2 && strRaidType == "RAID1")
		{
			strRaidType = "XRAID1";
		}
		if (parseInt(document.FORM_Raid.txtNumberOfDisks.value)%2 != 0 && strRaidType == "RAID01")
		{
			strRaidType = "XVALUE2";
		}
		if (document.FORM_Raid.txtSpaceofDrives.value == "" || document.FORM_Raid.txtNumberOfDisks.value == "")
		{
			strRaidType = "XVALUE";	
		}
		switch(strRaidType)
		{
			case "XVALUE2":
				strString = "";
				strString = strString + "ERROR \n";
				strString = strString + "You must enter a multiple of '2' for the Number Of Disks.";
				document.FORM_Raid.Results.value = strString;
				document.FORM_Raid.txtDiskSpace.value = "ERROR";
				document.FORM_Raid.txtDiskSpace2.value = "ERROR";
			break;
			case "XRAID1":
				strString = "";
				strString = strString + "ERROR \n";
				strString = strString + "ERROR \n";
				strString = strString + "You must enter '2' for the Number Of Disks.";
				document.FORM_Raid.Results.value = strString;
				document.FORM_Raid.txtDiskSpace.value = "ERROR";
				document.FORM_Raid.txtDiskSpace2.value = "ERROR";
			break;
			case "XVALUE":
				strString = "";
				strString = strString + "ERROR \n";
				strString = strString + "Missing required data.";
				document.FORM_Raid.Results.value = strString;
				document.FORM_Raid.txtDiskSpace.value = "ERROR";
				document.FORM_Raid.txtDiskSpace2.value = "ERROR";
			break;
			case "RAID0":
				strString = "";
				strString = strString + "RAID Level 0-Data Striping \n\n";
				strString = strString + "Definition \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "By definition RAID level 0 is not RAID because it does not provide data redundancy.  Data is striped across all drives without parity. \n\n";
				strString = strString + "Redundancy \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "None.  If a drive fails all data is lost.\n\n";
				strString = strString + "Performance \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "High.  Provides the best performance and storage efficiency in I/O intensive environments because there is no parity related overhead. \n\n";
				strString = strString + "Drawbacks \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "No Data Redundancy \n\n";
				strUtilization = DiskSpace ;
				strUtilization2 = ((DiskSpace*1000000000)/1073741824) ;
				document.FORM_Raid.txtDiskSpace.value = parseInt(strUtilization*100)/100;
				document.FORM_Raid.txtDiskSpace2.value = parseInt(strUtilization2*100)/100;	
				document.FORM_Raid.Results.value = strString;
			break;
			case "RAID1":
				strString = "";
				strString = strString + "RAID Level 1-Disk Mirroring \n\n";
				strString = strString + "Definition \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "Data is written to a primary disk and a secondary disk.  Identical data is stored on both disks. \n\n";
				strString = strString + "Redundancy \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "A mirrored set of drives is created.\n\n";
				strString = strString + "Performance \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "High performance in read intensive applications.  If one drive is busy data can be accessed from the secondary disk.  High write performance because of no parity overhead. \n\n";
				strString = strString + "Drawbacks \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "High cost per megabyte because double the amount of drives is required to achieve desired capacity. \n\n";
				strUtilization = DiskSpace/2 ;
				strUtilization2 = ((DiskSpace*1000000000)/1073741824)/2 ;
				document.FORM_Raid.txtDiskSpace.value = parseInt(strUtilization*100)/100;
				document.FORM_Raid.txtDiskSpace2.value = parseInt(strUtilization2*100)/100;			
				document.FORM_Raid.Results.value = strString;
			break;
			case "RAID01":
				strString = "";
				strString = strString + "RAID Level 0+1-Data Striping with Mirroring \n\n";
				strString = strString + "Definition \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "RAID 0+1 is a combination of RAID levels 0 and 1 by striping data across pairs of mirrored disk drives. \n\n";
				strString = strString + "Redundancy \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "A striped array (RAID 0) of mirrored drive pairs (RAID 1) is created.  You can sustain more than one drive failure as long as they are not in the same mirrored set. \n\n";
				strString = strString + "Performance \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "High performance because data is striped and there is no parity overhead. \n\n";
				strString = strString + "Drawbacks \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "High cost per megabyte because double the amount of drives is required to achieve desired capacity. \n\n";
				strUtilization = DiskSpace/2 ;
				strUtilization2 = ((DiskSpace*1000000000)/1073741824)/2 ;
				document.FORM_Raid.txtDiskSpace.value = parseInt(strUtilization*100)/100;
				document.FORM_Raid.txtDiskSpace2.value = parseInt(strUtilization2*100)/100;			
				document.FORM_Raid.Results.value = strString;
			break;
			case "RAID5":
				strString = "";
				strString = strString + "RAID Level 5- Data Striping with Distributed Parity \n\n";
				strString = strString + "Definition \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "Data is striped across a group of disk drives with distributed parity.  Parity information is written to a different disk in the array for each stripe. \n\n";
				strString = strString + "Redundancy \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "Parity is distributed across the disks in the array.  Data is regenerated in the event of a drive failure. \n\n";
				strString = strString + "Performance \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "High performance in small record, multiprocessing environments because there is no contention for the parity disk and read and write operations can be overlapped.  No write bottlenecks as with RAID 4. \n\n";
				strString = strString + "Drawbacks \n";
				strString = strString + "---------------------------------------------- \n";
				strString = strString + "Distributed parity causes overhead on write operations. There is also overhead created when data is changed, because parity information must be located and then recalculated. \n\n";
				strUtilization = (DiskSpace * ((parseInt(((NumberOfDisks-1)/NumberOfDisks)*10000)/100)/100)) ;
				
				strUtilization2 = (((DiskSpace*1000000000)/1073741824) * ((parseInt(((NumberOfDisks-1)/NumberOfDisks)*10000)/100)/100))
				document.FORM_Raid.txtDiskSpace.value = parseInt(strUtilization*100)/100;
				document.FORM_Raid.txtDiskSpace2.value = parseInt(strUtilization2*100)/100;
				document.FORM_Raid.Results.value = strString
			break;
		}
	}	
}
function openStatic()
{
	document.FORM_Raid.Results.value = "    Please Enter Your Information and then Click on a RAID Selection.";
}

//-->

