if (aURLreference == null) var aURLreference = "/assets/assist/";
if (aXMLfileName == null) var aXMLfileName = window.location.href.substring(window.location.href.lastIndexOf("/") + 1, window.location.href.lastIndexOf(".")) + ".xml";

if (location.protocol=="https:" && (location.hostname.indexOf("pib")!=-1))
	aXMLfileName = aXMLfileName.replace(/personal\//, "personal_p2/");

//if(navigator.userAgent.indexOf("Firefox") != -1)
//{
var requiredMajorVersion = 9;
var requiredMinorVersion = 0;
var requiredRevision = 0;

//if(navigator.appVersion.indexOf("MSIE") != -1) document.write('<span style="font-size:9px; color:#FFFFFF; visibility:hidden;">UOB ASSIST</span>');

function changeAssistHeight(targetHeight, animate) {
	var object = document.getElementById("assist_content").style;
	var currentHeight = parseInt(document.getElementById("assist_content").style.height);
	if(animate) {
		var addon = (navigator.appVersion.indexOf("MSIE") != -1) ? 12: 0;
		var t1 = new Tween(object, "height", Tween.strongEaseOut, currentHeight, targetHeight + addon, 0.5, 'px');
		t1.start();
	} else object.height = targetHeight + "px";
}

if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
	window.alert("This page requires AC_RunActiveContent.js.");
} else {
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) {  // if we've detected an acceptable version
		AC_FL_RunContent(
			'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'FlashVars', 'aURLreference='+aURLreference+'&aXMLfileName='+aXMLfileName,
			'width', '180',
			'height', '100%',
			'id', 'assist',
			'align', 'top',
			'src', 'assist',
			'menu', 'false',
			'quality', 'high',
			'scale', 'noscale',
			'salign', 'lt',
			'wmode', 'transparent',
			'bgcolor', '#ffffff',
			'name', 'assist',
			'allowscriptaccess', 'sameDomain',
			'allowfullscreen', 'false',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'movie', aURLreference+'assist'
			); //end AC code
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = 'Alternate HTML content should be placed here.'
			+ 'This content requires the Adobe Flash Player.'
			+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}
//}

	/*
if(navigator.userAgent.indexOf("MSIE") != -1)
{
	// document.write('<noscript>');
	alert ('Gah! IE!');
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="180" height="700" id="assist" align="top">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="allowFullScreen" value="false" />\n');
	document.write('<param name="movie" value="'+aURLreference+'assist.swf" />\n');
	document.write('<param name="menu" value="false" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="scale" value="noscale" />\n');
	document.write('<param name="salign" value="lt" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="bgcolor" value="#cccccc" />\n');
	document.write('<param name="FlashVars" value="aURLreference='+aURLreference+'&aXMLfileName='+aXMLfileName+'" />\n');
	document.write('<embed src="'+aURLreference+'assist.swf" FlashVars="aURLreference="'+aURLreference+'&aXMLfileName='+aXMLfileName+' menu="false" quality="high" scale="noscale" salign="lt" wmode="transparent" bgcolor="#cccccc" width="180" height="700" name="assist" align="top" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
	// document.write('</noscript>');
}
*/