//This is script is for detecting and displaying flash file.



var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function new_win(flashfile)
{
if ( MM_FlashCanPlay ) {
	//var myOptions = 'scrollbars=no,width=500,height=400,resizable=no';
	if (flashfile == "payroll")
	{
	var bb = window.open('payroll_online_demo.html','abc','status=yes,scrollbars=no,width=790,height=521,top=0,left=0');
	}
	else if (flashfile == "asap")
	{
	var aa = window.open('asap_online_demo.html','xyz','status=yes,scrollbars=no,width=790,height=521,top=0,left=0');
	}
	else if (flashfile == "care")
	{
	var cc = window.open('care_homes_online_demo.html','xyz','status=yes,scrollbars=no,width=790,height=521,top=0,left=0');
	}

} else{	
	var bc = window.open('get_flashplayer.html','abc','scrollbars=no,width=500,height=300,top=0,left=0');
}
}

function dispMesg(fileType)
{
	if (fileType == "payroll")
		window.status = "Andica Payroll (TM) is HMRC (IR) accredited. Tel: 020 8900 8400. Andica is a registered trademark of Andica Ltd.";
	else if (fileType == "ASAP")
		window.status = "Andica Self Assessment (TM) online filing is HMRC (IR) approved. Andica is a registered trademark of Andica Ltd.";	
	else if (fileType == "care")
		window.status = "Andica Care Homes (TM). Andica is a registered trademark of Andica Ltd.";	
}

