/*****************************************************************************
* This file holds an example of printing a table of components
* In order to use this file the file "dependency.js" must be included also.
* This file contins settings that can be changed.
* The functions that prints the table are printDependency2D, and printDependency2DNoUserInfo
*
* V 5.0.0.0
******************************************************************************/

/************************************************************************
printDependency2D
	Prints a table of all the dependencies
Input:	
	arrComponents2D:	the array that was returned from compareSWHWdependency (in dependency.js)
	strOSMsgWin:	A url for a page the displays the OS dependency info
	strExetenderInstall:	the URL for installing the EXEtender client
	iconOK:	icon to be used when the installed versoion is OK (Recommended <= Detected)
	iconWarning:	icon to be used when the installed versoion is in the gray area (Min <= Detected < Recommended)
	iconNotOK: icon to be used when the installed versoion is not OK (Detected < Min)
	iconUnknown:	icon to be used when the installed versoion is unknown
	strPlatform:	The applications OS system. As written in the AoD database ("NT", or" 9X")
	strBGColor:	The background color fo the table
Return Value:	
************************************************************************/
function printDependency2D(	arrComponents2D, strOSMsgWin, strExetenderInstall, iconOK, iconWarning, iconNotOK, 
							iconUnknown, strPlatform, strBGColor )
{
	var iIndex;
	var arrSWComponents = new Array();
	var arrHWComponents = new Array();
	var Component;
	var strPrintTable = "";
	var strTemp;

	if(iconOK == null)
	{
		iconOK = "";
	}
	if(iconWarning == null)
	{
		iconWarning = "";
	}
	if(iconNotOK == null)
	{
		iconNotOK = "";
	}
	if(iconUnknown == null)
	{
		iconUnknown = "";
	}
	if(strPlatform == null)
	{
		strPlatform = "";
	}
	if(strBGColor == null)
	{
		strBGColor = "white";
	}

	// fill hardware and software components arrays 
	for(iIndex=0; iIndex<arrComponents2D.length; iIndex++)
	{
		Component = GetComponentPrintData(arrComponents2D, iIndex, strExetenderInstall);
		if(Component.iType == 1)
		{
			arrSWComponents[arrSWComponents.length] = Component;
		}
		else
		{
			arrHWComponents[arrHWComponents.length] = Component;
		}
	}

	arrSWComponents = CheckOSAndSetArry(arrSWComponents, strPlatform, strOSMsgWin );

	// Get the print SW table string
	strTemp = GetPrintTable(arrSWComponents, "SOFTWARE", iconOK, iconWarning,	iconNotOK, iconUnknown);

	// Get the print HW table string
	strTemp += GetPrintTable(arrHWComponents, "HARDWARE", iconOK, iconWarning,	iconNotOK, iconUnknown);

	if(strTemp != "" )
	{
		strPrintTable = "<table WIDTH='100%' bgcolor=" + strBGColor+ ">";
		strPrintTable += strTemp;
		strPrintTable += "</table>";
	}
	else
	{
      strPrintTable = "<table WIDTH='100%' bgcolor=" + strBGColor+ "><tr><td>";
		strPrintTable += "We are currently unable to provide System Requirements for this title. As a "+
				"result, your machine will not be qualified against this titles Minimum or "+ 
				"Recommended requirements. Please be advised that while you may still Rent "+
				"this application there is a small chance that it will not run efficiently. "+
				"If you experience difficulties playing the product after purchase, you may "+
				"be missing Hardware or Software components that are required to properly "+
				"activate the application. We appoligize for any inconvienience."
      strPrintTable += "</tr></td></table>";
	}

	return strPrintTable;
}


/************************************************************************
printDependency2DNoUserInfo
	Prints a table of all the dependencies without the user info
Input:	
	arrComponents2D:	the array that was returned from compareSWHWdependency (in dependency.js)
	strOSMsgWin:	A url for a page the displays the OS dependency info
	strPlatform:	The applications OS system. As written in the AoD database ("NT", or" 9X")
	strBGColor:	The background color fo the table
Return Value:	
************************************************************************/
function printDependency2DNoUserInfo(	arrComponents2D, strOSMsgWin, strPlatform, strBGColor )
{
	var iIndex;
	var arrSWComponents = new Array();
	var arrHWComponents = new Array();
	var Component;
	var strPrintTable = "";
	var strTemp;

	if(strPlatform == null)
	{
		strPlatform = "";
	}
	if(strBGColor == null)
	{
		strBGColor = "white";
	}

	// fill hardware and software components arrays 
	for(iIndex=0; iIndex<arrComponents2D.length; iIndex++)
	{
		Component = GetComponentPrintData(arrComponents2D, iIndex, "");
		if(Component.iType == 1)
		{
			arrSWComponents[arrSWComponents.length] = Component;
		}
		else
		{
			arrHWComponents[arrHWComponents.length] = Component;
		}
	}

	arrSWComponents = CheckOSAndSetArry(arrSWComponents, strPlatform, strOSMsgWin );

	// Get the print SW table string
	strTemp = GetPrintTableNoUserInfo(arrSWComponents, "Software" );

	// Get the print HW table string
	strTemp += GetPrintTableNoUserInfo(arrHWComponents, "Hardware" );

	if(strTemp != "" )
	{
		strPrintTable = "<table WIDTH='100%'  bgcolor=" + strBGColor+ ">";
		strPrintTable += strTemp;
		strPrintTable += "</table>";
	}
	else
	{
      return "";
	}

	return strPrintTable;
}

/************************************************************************
structPrintComponentData
	a print component struct. This struct holds the information that is needed for 
	printing the component.
bValid:		Indicates whether the data that is stored in this struct is valid or not
bDisplay:	Indicates whether ot display this component or not
strExentName:	The name that Exent gave to the component
strPrintName:	The name  for printing
iStatus:	The overall status of the component 
			0:	Unknown
			1:	Detected < Min
			2:	Min <= Detected < Recommended
			3:	Recommended <= Detected
iType:	The type of the component
		1: Software
		2: Hardware
strMinimum:	The minimum version for this component from the AoD database
strRecommended:	The ewcommended version for this component from the AoD database
strDetected:	The installed version of this component on the end-user's computer
strExtention:	An Extention fot the printed version (e.g.Mhz, MB)
strUpgradeUrl: The URL for upgrading the component
strExtraData1:  Extra data
strExtraData2:  Extra data
************************************************************************/
function structPrintComponentData(bValid, bDisplay, strExentName, strPrintName, iType, iStatus,
					strMinimum, strRecommended, strDetected, strExtention, strUpgradeUrl, strExtraData1, strExtraData2)
{
	this.bValid = bValid;
	this.bDisplay = bDisplay
	this.strExentName = strExentName;
	this.strPrintName = strPrintName;
	this.iType = iType;
	this.iStatus = iStatus;
	this.strMinimum = strMinimum;
	this.strRecommended = strRecommended;
	this.strDetected = strDetected;
	this.strExtention = strExtention;
	this.strUpgradeUrl = strUpgradeUrl;
   this.strExtraData1 = strExtraData1;
   this.strExtraData2 = strExtraData2;
}

/************************************************************************
GetComponentPrintData
	returns a structPrintComponentData of the requested component
Input:	
	arrComponents2D:	the array that was returned from compareSWHWdependency (in dependency.js)
	iIndex:		The index of the requested component	
	strExetenderInstall:	the URL for installing the EXEtender client
Return Value:
	structPrintComponentData
************************************************************************/
function GetComponentPrintData(arrComponents2D, iIndex, strExetenderInstall)
{
	var ComponentData = new structPrintComponentData(false, "", "", "", 0, 0, "", "", "", "", "", "");
	var bRes;

	// Get the regular data
	ComponentData.bDisplay = true;
	ComponentData.strExentName = arrComponents2D[iIndex][0];
	ComponentData.iStatus = arrComponents2D[iIndex][1];
	ComponentData.strMinimum = arrComponents2D[iIndex][2];
	ComponentData.strRecommended = arrComponents2D[iIndex][3];
	ComponentData.strDetected = arrComponents2D[iIndex][4];
   ComponentData.strExtraData1 = arrComponents2D[iIndex][5];
   ComponentData.strExtraData2 = arrComponents2D[iIndex][6];
	ComponentData.strExtention = "";
	ComponentData.strUpgradeUrl = "";
	ComponentData.bValid = true;	

	// Specific component data
	switch(ComponentData.strExentName)
	{
	case "DirectX":
	case "DirectPlay":
	case "DirectXMedia":
		ComponentData.strPrintName = ComponentData.strExentName;
		ComponentData.iType = 1;
		// override
		ComponentData.strMinimum = GetSubVersion(ComponentData.strMinimum, 1, 3);
		ComponentData.strRecommended = GetSubVersion(ComponentData.strRecommended, 1, 3);
		ComponentData.strDetected = GetSubVersion(ComponentData.strDetected, 1, 3);
		ComponentData.strUpgradeUrl = "http://www.microsoft.com/directx/homeuser/downloads";
	break;
	case "OS":
		ComponentData.strPrintName = "Operating System";
		ComponentData.iType = 1;
		// override
		if(ComponentData.strMinimum == "") 
		{	// no demand for this component
			ComponentData.bDisplay = false;
		}
	break;
	case "QuickTime32":
		ComponentData.strPrintName = ComponentData.strExentName;
		ComponentData.iType = 1;
		// override
		ComponentData.strMinimum = GetSubVersion(ComponentData.strMinimum, 0, 1);
		ComponentData.strRecommended = GetSubVersion(ComponentData.strRecommended, 0, 1);
		ComponentData.strDetected = GetSubVersion(ComponentData.strDetected, 0, 1);
		ComponentData.strUpgradeUrl = "http://www.apple.com/quicktime/download/support/";
	break;
	case "Indeo Video":
	case "Indeo Audio":
		ComponentData.strPrintName = ComponentData.strExentName;
		ComponentData.iType = 1;
		// override
		ComponentData.strMinimum = GetSubVersion(ComponentData.strMinimum, 0, 1);
		ComponentData.strRecommended = GetSubVersion(ComponentData.strRecommended, 0, 1);
		ComponentData.strDetected = GetSubVersion(ComponentData.strDetected, 0, 1);
		ComponentData.strUpgradeUrl = "http://www.ligos.com/index.phtml?&pi=103&n1=products&n2=indeo&n3=download";
	break;
	case "Internet Explorer":
		ComponentData.strPrintName = ComponentData.strExentName;
		ComponentData.iType = 1;
		// override
		ComponentData.strMinimum = GetSubVersion(ComponentData.strMinimum, 0, 1);
		ComponentData.strRecommended = GetSubVersion(ComponentData.strRecommended, 0, 1);
		ComponentData.strDetected = GetSubVersion(ComponentData.strDetected, 0, 1);
		ComponentData.strUpgradeUrl = "http://www.microsoft.com/windows/ie/default.htm";
	break;
	case "Shock Wave":
		ComponentData.strPrintName = ComponentData.strExentName;
		ComponentData.iType = 1;
		// override
		ComponentData.strMinimum = GetSubVersion(ComponentData.strMinimum, 0, 1);
		ComponentData.strRecommended = GetSubVersion(ComponentData.strRecommended, 0, 1);
		ComponentData.strDetected = GetSubVersion(ComponentData.strDetected, 0, 1);
		ComponentData.strUpgradeUrl = "http://www.shockwave.com";
	break;
	case "QuickTime":
	case "OpenGL":
	case "MSJet":
	case "Windows Installer":
		ComponentData.strPrintName = ComponentData.strExentName;
		ComponentData.iType = 1;
		// override
		ComponentData.strMinimum = GetSubVersion(ComponentData.strMinimum, 0, 1);
		ComponentData.strRecommended = GetSubVersion(ComponentData.strRecommended, 0, 1);
		ComponentData.strDetected = GetSubVersion(ComponentData.strDetected, 0, 1);
	break;
	case "Client":
		ComponentData.strPrintName = "EXEtender Player";
		ComponentData.iType = 1;
		// override
		ComponentData.strUpgradeUrl = strExetenderInstall;
   break;
	case "DisplayAdapter":
		ComponentData.strPrintName = GetDisplayAdapterName( ComponentData.strExtraData1 );
		ComponentData.iType = 1;
		// override
      ComponentData.strUpgradeUrl = GetDisplayAdapterUpgradeUrl( ComponentData.strExtraData2 );
		ComponentData.strMinimum = GetSubVersion(ComponentData.strMinimum, 0, 8);
		ComponentData.strRecommended = GetSubVersion(ComponentData.strRecommended, 0, 8);
		ComponentData.strDetected = GetSubVersion(ComponentData.strDetected, 0, 8);
	break;
	case "CPUSpeed":
		ComponentData.strPrintName = "Processor Speed";
		ComponentData.iType = 2;
		// override
		ComponentData.strExtention = "MHz";
	break;
	case "RAMPhysical":
		ComponentData.strPrintName = "Memory";
		ComponentData.iType = 2;
		// override
		ComponentData.strExtention = "MB";
	break;
	case "VideoMem":
		ComponentData.strPrintName = "Video Card Memory";
		ComponentData.iType = 2;
		// override
		ComponentData.strExtention = "MB";	
	break;
	case "SoundCard":
		ComponentData.strPrintName = "Sound Card";
		ComponentData.iType = 2;
		// override
		ComponentData.strMinimum = GetBolean(ComponentData.strMinimum, "Yes", "No");
		ComponentData.strRecommended = GetBolean(ComponentData.strRecommended, "Yes", "No");
		ComponentData.strDetected = GetBolean(ComponentData.strDetected, "Yes", "No");
	break;
	case "Video3DAcceleration":
		ComponentData.strPrintName = "3D Acceleration";
		ComponentData.iType = 2;
		// override
		ComponentData.strMinimum = GetBolean(ComponentData.strMinimum, "Yes", "No");
		ComponentData.strRecommended = GetBolean(ComponentData.strRecommended, "Yes", "No");
		ComponentData.strDetected = GetBolean(ComponentData.strDetected, "Yes", "No");
	break;
	case "Joystick":
	case "Mouse":
		ComponentData.strPrintName = ComponentData.strExentName;;
		ComponentData.iType = 2;
		// override
		ComponentData.strMinimum = GetBolean(ComponentData.strMinimum, "Yes", "No");
		ComponentData.strRecommended = GetBolean(ComponentData.strRecommended, "Yes", "No");
		ComponentData.strDetected = GetBolean(ComponentData.strDetected, "Yes", "No");
	break;
	default:
      ComponentData.bDisplay = false;
		return ComponentData;
	break;
	}

	if(ComponentData.strDetected == "" )
	{
		ComponentData.strDetected = "Unknown";
	}

	return ComponentData;
}

/************************************************************************
GetDisplayAdapterName
Input:	
   strCardName: the card name
Return Value:
	The Display Adapter printable name
************************************************************************/
function GetDisplayAdapterName( strCardName )
{
   var str;

   str = "Display Driver";
   
   if(strCardName == "" )
   {
      return str;
   }

   str += " ("+strCardName+")";
   return str;
}

/************************************************************************
GetDisplayAdapterUpgradeUrl
Input:	
   strVendorId: The vendor Id
      4318 - NVIDIA
      4098 - ATI
Return Value:
	The Display Adapter upgrade url
************************************************************************/
function GetDisplayAdapterUpgradeUrl( strVendorId )
{
   if( strVendorId == "4318" )
   {  // NVIDIA
      return "http://www.nvidia.com/content/drivers/drivers.asp";
   }

   if( strVendorId == "4098" )
   {  // ATI
      return "http://www.ati.com/support/driver.html";
   }

   return "";
}

/************************************************************************
GetBolean
	returns a sub version string
Input:	
	strOrgValue:	A string with the original value. Should be "0" or "1".
	strTrue:	A string to be returned in case of true (strOrgValue=="1")
	strFalse	A string to be returned in case of false (strOrgValue!="1")
Return Value:
	strTrue or strFalse
************************************************************************/
function GetBolean(strOrgValue, strTrue, strFalse)
{
	if(strOrgValue == "1")
	{
		return strTrue;
	}

	return strFalse;
}

/************************************************************************
GetSubVersion
	returns a sub version string
Input:	
	strVersion:	The original version
	iSrart:	A 0 based number of the start point
	iEnd:	A 0 based number of the end point
Return Value:
	The sub version
Example:
	The returned value of ("a.bb.c.d",1,2) is "bb.c"
	The returned value of ("a.bb.c.d",0,2) is "a.bb.c"
	The returned value of ("a.bb.c.d",1,8) is "bb.c.d"
************************************************************************/
function GetSubVersion(strVersion, iStart, iEnd)
{
	var strSubVersion = ""
	var iIndex;
	var arrVersion = strVersion.split(".");
	var iTemp;

   if(strVersion == "")
   {
      return "";
   }

	if(iStart < 0)
	{
		iStart = 0;
	}
	if(iEnd > arrVersion.length-1)
	{
		iEnd = arrVersion.length-1;
	}

	for(iIndex=iStart; iIndex<=iEnd; iIndex++)
	{
      if(iIndex == iStart)
      {
         //convert only the major part to a number
         iTemp = Number(arrVersion[iIndex]);
         if( isNaN(iTemp) )
         {
            iTemp = 0;
         }
         strSubVersion += iTemp.toString();
      }     
      else
      {
         strSubVersion += arrVersion[iIndex];
      }

      strSubVersion += "."
	}

	// remove the "." from the end
	strSubVersion = strSubVersion.slice(0, strSubVersion.length-1);
	return strSubVersion;
}

/************************************************************************
CheckOSAndSetArry
	set the content of arrSWComponents according to the OS dependency. 
	If the OS dependency is OK, no need to display it. If the OS dependency is not OK
	this is the only SW dependency that we need to display.
Input:	
	arrSWComponents:	An array of structPrintComponentData
	strPlatform:	The applications OS system. As written in the AoD database ("NT", or" 9X")
	strOSMsgWin:	A url for a page the displays the OS dependency info
Return Value:	
	a formated arrSWComponents
************************************************************************/
function CheckOSAndSetArry( arrSWComponents, strPlatform, strOSMsgWin )
{
	var iIndex;
	var Componet = null;
	var strDetectedOS = "";
	var arrReturn = new Array();
	var iOSIndex;

	// if the OS dependency is not OK, do not display the other SW components.
	for(iIndex=0; iIndex<arrSWComponents.length; iIndex++ )
	{	// the detected OS is always in the SW components
		if(arrSWComponents[iIndex].strExentName=="OS")
		{
			iOSIndex = iIndex;
			Componet = arrSWComponents[iIndex];
			break;
		}
	}

	if(Componet == null || Componet.bValid!=true || Componet.strDetected=="" )
	{	// no OS valid dependency
		return arrSWComponents;
	}
	
	if(	Componet.strDetected.charAt(0) == "1")
	{
		strDetectedOS = "9X";
	}
	else if(Componet.strDetected.charAt(0) == "2")
	{
		strDetectedOS = "NT";
	}
	else
	{	// strDetected is not valid
		return arrSWComponents;
	}
	
	if(Componet.strMinimum=="" && strPlatform!="" && strDetectedOS!=strPlatform )
	{ // No request in AoD BD - do the check according to application platform
		Componet.iStatus = 1; //Detected < Min
	}
	
	if(Componet.iStatus!=1)
	{	// no need to display tbe OS component
		arrSWComponents[iOSIndex].bDisplay = false;
		return arrSWComponents;
	}

	// set the right platform
	if(Componet.strMinimum!="")
	{
		if(Componet.strMinimum.charAt(0) == "1")
		{
			strPlatform = "9X";
		}
		else
		{
			strPlatform = "NT";
		}
	}
	
	// need to display the SO only
	Componet.strDetected = "<font size =1><a href='' onclick='PopUpWin(\""+strPlatform+"\",\""+Componet.strDetected+"\",\""+strOSMsgWin+"\"); return false;'>Details...</a></td></font>";
	Componet.strMinimum = Componet.strDetected;
	Componet.strRecommended = Componet.strDetected;
	Componet.bDisplay = true;

	arrReturn[0] = Componet;
	return arrReturn;
}

/************************************************************************
GetPrintTable
	returns an  html string that displays the table
Input:	
	arrComponents2D:	An array of structPrintComponentData
	strTitle:	Title for the table
	iconOK:	icon to be used when the installed versoion is OK (Recommended <= Detected)
	iconWarning:	icon to be used when the installed versoion is in the gray area (Min <= Detected < Recommended)
	iconNotOK: icon to be used when the installed versoion is not OK (Detected < Min)
	iconUnknown:	icon to be used when the installed versoion is unknown
Return Value:	
************************************************************************/
function GetPrintTable(arrComponents2D, strTitle, iconOK, iconWarning, iconNotOK, iconUnknown)
{
	var iIndex;
	var strPrintTable = ""
	var strHeader = "";
	var strTemp;

	if(arrComponents2D.length == 0)
	{
		return "";
	}

	// Add Header
	strHeader = "<tr><td><b>"+ strTitle + "</b></td></tr><tr><td><u>Status</u></td><td><u>Component</u></td><td><u>Minimum</u></td><td><u>Recommended</u></td><td><u>Detected</u></td></tr>";
	
	for(iIndex=0; iIndex<arrComponents2D.length; iIndex++ )
	{
		if(arrComponents2D[iIndex].bValid==false || arrComponents2D[iIndex].bDisplay==false)
		{
			continue;
		}

		// add the icon
		switch(arrComponents2D[iIndex].iStatus)
		{
		case 0: // Unknown
		case 2: // Min <= Detected < Recommended
			strTemp = iconWarning;
			break;
		case 1: // Detected < Min
			strTemp = iconNotOK;
			break;
		case 3: // Recommended <= Detected
			strTemp = iconOK;
			break;
		default: // Error
			strTemp = iconWarning;
			break;
		}
		strPrintTable += "<tr>";
		strPrintTable += "<td>&nbsp;&nbsp;&nbsp;&nbsp;" + strTemp + "</td>";
				
		// Add name
		strPrintTable += "<td>" + arrComponents2D[iIndex].strPrintName + "</td>";

		// Add Minimum
		strPrintTable += "<td>" + arrComponents2D[iIndex].strMinimum + arrComponents2D[iIndex].strExtention + "</td>";
	
		// Add Recommended
		strPrintTable += "<td>" + arrComponents2D[iIndex].strRecommended + arrComponents2D[iIndex].strExtention + "</td>";

		// Add Detected
		strPrintTable += "<td>" + arrComponents2D[iIndex].strDetected;
		if(arrComponents2D[iIndex].strDetected != "Unknown")
		{
			strPrintTable += arrComponents2D[iIndex].strExtention;
		}
		strPrintTable += "</td>";

		// Add upgrade link
		if((arrComponents2D[iIndex].iStatus!=3) && arrComponents2D[iIndex].strUpgradeUrl!="")
		{
			strPrintTable += "<td><a href=" + arrComponents2D[iIndex].strUpgradeUrl + " target=_blank>Upgrade</a></td>"
		}
		
		strPrintTable += "</tr>";
	}

	if(strPrintTable == "")
	{
		return "";
	}

	// add empty line at the end
	strPrintTable = strHeader + strPrintTable;
	strPrintTable += "<td></td>";
	return strPrintTable;
}

/************************************************************************
GetPrintTableNoUserInfo
	returns an  html string that displays the table
Input:	
	arrComponents2D:	An array of structPrintComponentData
	strTitle:	Title for the table
Return Value:	
************************************************************************/
function GetPrintTableNoUserInfo(arrComponents2D, strTitle)
{
	var iIndex;
	var strPrintTable = ""
	var strHeader = "";
	var strTemp;

	if(arrComponents2D.length == 0)
	{
		return "";
	}

	// Add Header
	strHeader = "<tr><td><b>"+ strTitle + "</b></td></tr><tr><td><u>Component</u></td><td><u>Minimum</u></td><td><u>Recommended</u></td></tr>";
	
	for(iIndex=0; iIndex<arrComponents2D.length; iIndex++ )
	{
		if(arrComponents2D[iIndex].bValid==false || arrComponents2D[iIndex].bDisplay==false)
		{
			continue;
		}
				
		// Add name
		strPrintTable += "<td>" + arrComponents2D[iIndex].strPrintName + "</td>";

		// Add Minimum
		strPrintTable += "<td>" + arrComponents2D[iIndex].strMinimum + arrComponents2D[iIndex].strExtention + "</td>";
	
		// Add Recommended
		strPrintTable += "<td>" + arrComponents2D[iIndex].strRecommended + arrComponents2D[iIndex].strExtention + "</td>";
		
		strPrintTable += "</tr>";
	}

	if(strPrintTable == "")
	{
		return "";
	}

	// add empty line at the end
	strPrintTable = strHeader + strPrintTable;
	strPrintTable += "<td></td>";
	return strPrintTable;
}


/************************************************************************
PopUpWin
Input:	
	strPlatform:	The applications OS system. As written in the AoD database ("NT", or" 9X")
	strUserOsDetect:	The detected end user OS
	strOSMsgWin:	A url for a page the displays the OS dependency info
Return Value:	
	a formated arrSWComponents
************************************************************************/
function PopUpWin(strPlatform, strUserOsDetect, strOSMsgWin)
{
	var strUserOs = "";
	var strPage = "";
	var strName = "name";
	var strWinprops = "";


	if(strUserOsDetect.charAt(0) == "1" )
	{
		strUserOs = "xp";
	}
	else
	{
		strUserOs = "me";
	}

	strPage = strOSMsgWin + "?UserOsFlag=" + strUserOs + "&platform=" + strPlatform + "&UserOsDetect=" + strUserOsDetect

	strWinprops = "width=490,height=190,scrollbars=yes,location=no,menubar=yes,resizable=yes,toolbar=no,menubar=no";
	 win = window.open(strPage, strName, strWinprops)
	 if (parseInt(navigator.appVersion) >= 4){
	     win.window.focus();
	 }	 
}

function PrintComponentData( Component )
{
	var strReturn ="";

	strReturn = "bValid: " + Component.bValid;
	strReturn += ", bDisplay: " + Component.bDisplay;
	strReturn += ", strExentName: " + Component.strExentName;
	strReturn += ", strPrintName: " + Component.strPrintName;
	strReturn += ", iType: " + Component.iType;
	strReturn += ", iStatus: " + Component.iStatus;
	strReturn += ", strMinimum: " + Component.strMinimum;
	strReturn += ", strRecommended: " + Component.strRecommended;
	strReturn += ", strDetected: " + Component.strDetected;
	strReturn += ", strExtention: " + Component.strExtention;
	strReturn += ", strUpgradeUrl: " + Component.strUpgradeUrl;

	return strReturn;
}
