
function GetDownloadInfo()
{
	var Info=navigator.appVersion;
	if( Info.indexOf( "NT 5.1")!= -1 )
		ret = 0;
	else if( Info.indexOf( "NT 5.0") != -1 )
		ret = 1;
	else if( Info.indexOf( "NT 6.0")!= -1 )
		ret = 4;
	else if( Info.indexOf( "NT 4") != -1 )
		ret = 1;
	else if( Info.indexOf( "95")!=-1 )
		ret = 2;
	else if( Info.indexOf( "98") != -1 )
		ret = 2;
	else if( Info.indexOf( "Me") != -1 )
		ret = 2;
	else 
		ret = 3;
	return ret;
}

function GetDownloadFileName()
{
	var nID = GetDownloadInfo();
	var fileName = "TheWorld2.2Final_2.2.1.0.exe";
	switch( nID )
	{
	case 0:
		fileName="TheWorld2.2Final_2.2.1.0_chs.exe";
		break;
	case 1:
		fileName="TheWorld2.2Final_2.2.1.0_2k_chs.exe";
		break;
	case 2:
		fileName="TheWorld2.2Final_2.2.1.0_9x_chs.exe";
		break;
	case 3:
		fileName="TheWorld2.2Final_2.2.1.0.exe";
		break;
	case 4:
		fileName="TheWorld2.2Final_2.2.1.0_chs.exe";
		break;
	}
	return fileName;
}

function GetDownloadUrl()
{
	var strURL = "http://download.theworld.cn/theworld/" + GetDownloadFileName();
//	var strURL = "http://www.ioage.com/download/" + GetDownloadFileName();
	return strURL;
}
