

Function IsXpSP2()
'{
	if  InStr( UCase( window.navigator.appVersion ), "IE 6" ) > 0 and _
			InStr( UCase( window.navigator.appMinorVersion ), "SP2" ) > 0 then
		IsXpSP2 = true
	else
		IsXpSP2 = false
	end if
'}
End Function 

Function CertificateImageSrc(sLangID)
'{
	if IsXpSP2() then
		CertificateImageSrc = "/apps/appcommon2/require/" & sLangID & PARTNER_WEB_FOLDER & "/images/installWarning_220x103.gif"
	else
		CertificateImageSrc = "/apps/appcommon2/require/" & sLangID & PARTNER_WEB_FOLDER & "/images/activex_certificate_220x164.gif"
	end if
'}
end Function

Function CertificateImageWidth()
'{
	CertificateImageWidth = "220"
'}
end Function

Function CertificateImageHeight()
'{
	if IsXpSP2() then
		CertificateImageHeight = "103"
	else
		CertificateImageHeight = "164"
	end if
'}
end Function

Function WhichButtonToClick()
'{
	if IsXpSP2() then
		WhichButtonToClick = strDownloading5
	else
		WhichButtonToClick = strDownloading2
	end if
'}
end Function


Function ShowActiveXDownloadError(sAppName, sLangID)
'{
	Dim sTitleDesc

	If True = IsXpSP2() Then
	'{
		sTitleDesc = Replace(strSP2ActiveXNtfyDesc, "%info_bar%", "href='#' onclick=" & chr(34) & "javascript:js_Help( 'activex', '#InfoBar' )" & chr(34) & "")
		sTitleDesc = Replace(sTitleDesc, "%activex_strl%", "href='#' onclick=" & chr(34) & "javascript:js_Help( 'activex', '' )" & chr(34) & "")
		sTitleDesc = Replace(sTitleDesc, "%prod_name%", sAppName)
		
		document.write	"<div class='alertBox'>"
		document.write	"<h5>" & strSP2ActiveXNtfyTitle & "</h5>"
		document.write	"<p>" & sTitleDesc & "</p>"
		document.write	"</div>"
		
		document.write	"<table width=100% height='50' cellpadding='0' cellspacing='0'><tr>"
		document.write	"<td>" & CommonstrSP2ObjectError1 & "</td>"
		document.write	"</tr></table>"

		document.write	"<table border='0' width=100% cellpadding='0' cellspacing='0'><tr>"
		document.write	"<td width='250' align='left' style='border-right:solid;padding-right:10px;'>" & strSP2Step1 & "</td><td width='250' align='left' style='padding-left=5px;'>" & strSP2Step2 & "</td>"
		document.write	"<tr><td width='250' align='left'  style='border-right:solid;padding-right:10px;'>" & CommonstrSP2ObjectError2 & "</td><td width='250' align='left'  style='padding-left=5px;'>" & CommonstrSP2ObjectError4 & "</td></tr>"
		document.write	"<tr><td width='200' height='160' style='padding-top=20px;padding-left=25px;border-right:solid;padding-right:10px;'><img src='/apps/appcommon2/require/" & sLangID & PARTNER_WEB_FOLDER & "/images/activex_bar_200x160.gif' border='0'></td>"
		document.write	"<td width='200' height='160' style='padding-top=20px;padding-left=25px;'><img src='/apps/appcommon2/require/" & sLangID & PARTNER_WEB_FOLDER & "/images/activex_menu_200x160.gif' border='0'></td></tr>"
		document.write	"<tr><td colspan='2' style='padding-top:15px;'>" & Replace( CommonstrSP2ObjectError3, "%activex_url%", "href='#' onclick=" & chr(34) & "javascript:js_Help( 'activex','' )" & chr(34) & "" ) & "</td></tr>"
		document.write	"</tr></table>"
		
		document.write	"<br>"

		document.write	"<table width=100% cellpadding='0' cellspacing='0'><tr>"
		document.write	"<td>" & Replace( strSP2QLink1, "%activex_url%", "href='#' onclick=" & chr(34) & "javascript:js_Help( 'activex', '' )" & chr(34) & "" ) & "</td>"
		document.write	"<tr><td>" & Replace( strSP2QLink2, "%info_bar%", "href='#' onclick=" & chr(34) & "javascript:js_Help( 'activex', '#InfoBar'  )" & chr(34) & "" ) & "</td></tr>"
		document.write	"</tr></table>"

	'}
	Else
	'{
		document.write	"<p>" & strObjectError1 & "</p>"
		document.write	"<p><a href='#' onclick=" & chr(34) & "javascript: js_Help( 'activex', '' );" & chr(34) & ">" & strObjectError2 & "</a></p>"
	'}
	End If
	
'}
End Function

Function CreateActiveXDownloadHTML(sAppName, sLangID)
'{
	document.write "<p align='center'><img alt='downloading' src='/apps/appcommon2/require/" & sLangID & PARTNER_WEB_FOLDER & "/images/download_animation_365x70.gif'></p>"
	document.write "<p>" & Replace(strDownloading1, "%PRODUCT_NAME%", sAppName) & "</p>"
	document.write "<p>" & WhichButtonToClick() & "</p>"
	document.write "<p align='center'><img id='idCertificateImage' border='0'></p>"
	document.write "<p>" & Replace(strDownloading3, "%PRODUCT_NAME%", sAppName) & "<br>"
	document.write "<a href='#' onclick=" & chr(34) & "javascript:js_Help( 'activex', '' )" & chr(34) & ">" & strDownloading4 & "</a></p>"
'}
End Function


Function ShowDownloadPageWithPopupInfo(sAppName, sButtonTag, sButtonText)
'{
	Dim strPopupDesc, strSP2Addon, strTemp

	If True = IsXpSP2() Then
	'{
		strSP2Addon = Replace(strPopupNoteDescSP2Addon, "%popup_url%", "href='#' onclick=" & chr(34) & "javascript:js_Help( 'popup', '' )" & chr(34) & "" )
		strPopupDesc = Replace(strPopupNoteDesc, "%sp2_addon%", strSP2Addon)
	'}
	Else
	'{
		strPopupDesc = Replace(strPopupNoteDesc, "%sp2_addon%", "")
		
	'}
	End If

	strPopupDesc = Replace(strPopupDesc, "%PRODUCT_NAME%", sAppName)
 
 	document.write	"<div class='alertBox'>"
	document.write	"<h5>" & strPopupNoteTitle & "</h5>"
	document.write	"<p>" & strPopupDesc & "</p>"
	document.write	"</div>"

	document.write	"<br>"

	document.write	"<table width=100% height='50' cellpadding='0' cellspacing='0'><tr>"
	document.write	"<td>" & strInstallInstructions1 & "</td>"
	document.write	"</tr></table>"

	document.write	"<br>"

	strTemp = Replace(strInstallInstructions2, "%PRODUCT_NAME%", sAppName)
	strTemp = Replace(strTemp, "%BUTTON_TEXT%", sButtonText)

	document.write	"<table width=100% height='50' cellpadding='0' cellspacing='0'><tr>"
	document.write	"<td>" & strTemp & "</td>"
	document.write	"</tr></table>"

	document.write sButtonTag

	document.write	"<br>"

	document.write	"<table width=100% height='50' cellpadding='0' cellspacing='0'><tr>"
	document.write	"<td>" & Replace(strInstallInstructions3, "%PRODUCT_NAME%", sAppName) & "</td>"
	document.write	"</tr></table>"
	
'}
End Function