﻿linkarr = new Array();
picarr = new Array();
textarr = new Array();
var focus_width = 292;
var focus_height = 202;
var text_height = 23;
var xmlDoc = loadXML("/Images/focus/focus.xml");
var pics = xmlDoc.getElementsByTagName('pics')[0].getAttribute('value')
var links = xmlDoc.getElementsByTagName('links')[0].getAttribute('value');
var texts = xmlDoc.getElementsByTagName('texts')[0].getAttribute('value');
var swf_height = focus_height + text_height;
document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + focus_width + '" height="' + swf_height + '">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/Images/slide.swf"><param name="quality" value="high"><param name="bgcolor" value="#AFDBFE">');
document.write('<param name="menu" value="false"><param name=wmode value="transparent">');
document.write('<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">');
document.write('<embed ID="focus_flash" src="/Images/slide.swf" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="#5A9FB5" quality="high" width="' + focus_width + '" height="' + swf_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
function loadXML(xmlFile) {
	var xmlDoc;
	if (window.ActiveXObject) {
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.async = false;
		xmlDoc.load(xmlFile);
	}
	else if (document.implementation && document.implementation.createDocument) {
		try {
			xmlDoc = document.implementation.createDocument('', '', null);
			xmlDoc.async = false;
			xmlDoc.load(xmlFile);
        } catch (e) {
			var xmlhttp = new window.XMLHttpRequest();
			xmlhttp.open("GET", xmlFile, false);
			xmlhttp.send(null);
			xmlDoc = xmlhttp.responseXML.documentElement;
		}
	} else {
		alert('Your browser cannot handle this script');
	}
	return xmlDoc;
}
