PersonalAssistant = function (layerID, trigger, proporties) {
	// URL of Flash Template, ending with a ?
	this.url = "http://portal.fciconnect.com/res/en/pat/onTopMovies.swf?"
	
	this.trigger = trigger;
	this.layerID = (typeof (layerID)=="undefined")? "divPA" : layerID;
	this.objFlash = undefined;
				
	this.setProporties(proporties);
	
	if (document.body == null || typeof(document.body) == "undefined") {
		//document is not loaded yet, add init to document.onload
		if (this.trigger!="") this.setOnLoadInterval()
	} else {
		//When object is created after the document is loaded, run init
		if (this.trigger!="" && typeof(this.interval) == "undefined") this.init();
	}
}
PersonalAssistant.prototype = {
	setProporties: function (proporties) {
		if (typeof(proporties)=="undefined" || proporties==null) proporties = new Object();
		this.url = (typeof(proporties.url)!="undefined")? proporties.url : ((this.url)?this.url:"");		//Wait n seconds after start playing to log movie view
		this.autoplay = (typeof(proporties.autoplay)!="undefined")? proporties.autoplay : true;			//Start playing flash immediately or fire stopevent after creation
		this.logMethod =(typeof(proporties.logMethod)!="undefined")? proporties.logMethod : "cookie";		//Log a user view by cookie (logs by trigger), database (logs by movieID) or none (doesn't log at all)
		this.skipLogCheck =(typeof(proporties.skipLogCheck)!="undefined")? proporties.skipLogCheck : false;		//Skips check if movie is logged. Doesn't prevent writing
		this.checkOnLoadInterval = (typeof(proporties.checkOnLoadInterval)!="undefined")? proporties.checkOnLoadInterval : 500;		//Check every n milliseconds if document is loaded (and init() can be executed)
		this.logDelay = (typeof(proporties.logDelay)!="undefined")? proporties.logDelay : 0;			//Wait n seconds after start playing to log movie view
	 	this.moviesPath = (typeof(proporties.logDelay)!="undefined")? proporties.logDelay : ".";		// Path where the Flash movies are located, ending with a /  (Cannot use absolute paths because of security issues (url in querystring))
	 	this.templatePath = (typeof(proporties.templatePath)!="undefined")? proporties.templatePath: "";		// Path where the Flash movies are located, ending with a /  (Cannot use, absolute paths because of security issues (url in querystring))
		this.layerID = (typeof(proporties.layerID)!="undefined")? proporties.layerID : ((this.layerID)?this.layerID:"divPA");			//Wait n seconds after start playing to log movie view
		this.trigger = (typeof(proporties.trigger)!="undefined")? proporties.trigger : ((this.trigger)?this.trigger:"");			//Wait n seconds after start playing to log movie view
		
		//Events
		this.onBeforeMovieCreate= (typeof(proporties.onBeforeMovieCreate)!="undefined")? proporties.onBeforeMovieCreate : null;
		this.onAfterMovieCreate= (typeof(proporties.onAfterMovieCreate)!="undefined")? proporties.onAfterMovieCreate : null;
		this.onPlay= (typeof(proporties.onPlay)!="undefined")? proporties.onPlay : null;
		this.onStop= (typeof(proporties.onStop)!="undefined")? proporties.onStop : null;
		this.onBeforeLogMovie= (typeof(proporties.onBeforeLogMovie)!="undefined")? proporties.onBeforeLogMovie : null;
		this.onErrorLogMovie= (typeof(proporties.onAfterLogMovie)!="undefined")? proporties.onErrorLogMovie : null;
		this.onAfterLogMovie= (typeof(proporties.onAfterLogMovie)!="undefined")? proporties.onAfterLogMovie : null;
		this.onUserClose = (typeof(proporties.onUserClose)!="undefined")? proporties.onUserClose : null;
		this.onMovieEnd = (typeof(proporties.onMovieEnd)!="undefined")? proporties.onMovieEnd : null;
		this.onDocumentLoaded = (typeof(proporties.onDocumentLoaded)!="undefined")? proporties.onDocumentLoaded : null;
	},
	init: function (trigger) {
		this.statusLog = "";
		this.status("STA", "Initialising PersonalAssistant");
		if (this.logMethod=="cookie") {
			this.cookieID = "FCI_PA_";
			this.cookieExpireDays = 3 *7*52;	//3 years*daysperweek*weeks
			if (!this.detectCookiesEnabled()) {this.logMethod = "none"; this.status("WRN", "Logging set to cookies, but cookies are not enabled")};
		}

		//Prepare layer and fill with Flash
		if (typeof(trigger)!="undefined") {this.trigger=trigger;} else { if (typeof(this.trigger) != "undefined") { trigger = this.trigger; } else {
			this.status("ERR", "Trigger is not set, cannot load movie."); return false;
		}}

		if (typeof(this.url)=="undefined") {this.status("ERR", "URL is not set, cannot load movie."); return false; }
		if (trigger.indexOf(" ")>-1) {this.status("ERR", "MovieID is invalid. Spaces are not allowed."); return false;}
		if (this.getGlobalLogView("userClose")==true && this.skipLogCheck!=true) {this.status("STA", "Global logview is set, abort movie"); return;}
		if (this.getLogView(this.trigger) == true && this.skipLogCheck!=true) {this.status("STA", "Logview for "+ this.trigger +" is set, abort movie"); return;}
		if (this.objFlash == undefined) {
			this.createLayer(this.layerID)
			this.insertMovie();
		}
		this.updatePosition();
	},
	insertMovie: function () {
		// Set proporties of layer
		// Set AJAX to insert Flash object
		if (typeof(trigger)!="undefined") {this.status("ERR", "Trigger is not set, cannot load movie."); return false }
		if (this.fireEvent("onBeforeMovieCreate", this.$(this.layerID)) == false) {return};
		this.createIframe();
		this.createFlash();
	},
	createFlash: function () {
		//Create Flash Object
		var movieID = this.trigger;
		this.status("STA", "Creating Flash Object: "+this.layerID+"_flash (url:"+ this.url + "MovieID="+movieID+"&FlashID="+this.layerID+"_flash&moviesPath="+ this.moviesPath +"&templatePath="+ this.templatePath +")")
		try {
			element = document.createElement('<object codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="'+this.layerID+'_flash" align="middle" height="180" width="230"><param name="allowScriptAccess" value="sameDomain"><param name="wmode" value="transparent"><param name="movie" value="'+ this.url +'MovieID=MOV_12122006122944_189907_814720&amp;FlashID='+this.layerID+'_flash&amp;templatePath='+ this.templatePath +'"><param name="quality" value="high"><param name="bgcolor" value="#ffffff"><embed src="'+ this.url +'MovieID=MOV_12122006122944_189907_814720&amp;FlashID='+this.layerID+'_flash" wmode="transparent" quality="high" bgcolor="#ffffff" name="'+this.layerID+'_flash" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swliveconnect="true" align="middle" height="180" width="230"></object><iframe id="frm'+this.layerID+'_flash" name="frm'+this.layerID+'_flash" runat="server" frameborder="0" height="1" scrolling="no" width="1"></iframe>');
			
			element = document.createElement('<object id="divPA_flash" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" align="middle" height="180" width="230" />')
			subEl =  document.createElement('<param name="movie" value="'+this.url + 'MovieID='+movieID+'&FlashID='+ this.layerID +'_flash&moviesPath='+ this.moviesPath +'&templatePath='+ this.templatePath +'" />'); 
			element.appendChild(subEl);
			subEl =  document.createElement('<param value="sameDomain" name="allowScriptAccess" />'); 
			element.appendChild(subEl);
			subEl =  document.createElement('<param name="wmode" value="transparent" />'); 
			element.appendChild(subEl);
			subEl =  document.createElement('<param value="high" name="quality" />'); 
			element.appendChild(subEl);
			subEl =  document.createElement('<param value="#ffffff" name="bgcolor" />'); 
			element.appendChild(subEl);
			this.$(this.layerID).appendChild(element);
			this.status("ADD", " ..created");
		} catch (e) {
			element = document.createElement("object");
			element.setAttribute("codebase", "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0");
			element.setAttribute("id", this.layerID+"_flash");
			element.setAttribute("align", "middle");
			element.setAttribute("height", "180");
			element.setAttribute("width", "230");
			subEl =  document.createElement("param");
			subEl.setAttribute("name", "allowScriptAccess");
			subEl.setAttribute("value", "sameDomain");
			element.appendChild(subEl);
			subEl =  document.createElement("param");
			subEl.setAttribute("value", "transparent");
			subEl.setAttribute("name", "wmode");
			element.appendChild(subEl);
			subEl =  document.createElement("param");
			subEl.setAttribute("name", "movie");
			subEl.setAttribute("value", this.url + "MovieID="+movieID+"&FlashID="+this.layerID+"_flash&moviesPath="+ this.moviesPath+"&templatePath="+ this.templatePath );
			element.appendChild(subEl);
			subEl =  document.createElement("param");
			subEl.setAttribute("name", "quality");
			subEl.setAttribute("value", "high");
			element.appendChild(subEl);
			subEl =  document.createElement("param");
			subEl.setAttribute("name", "bgcolor");
			subEl.setAttribute("value", "#ffffff");
			element.appendChild(subEl);
			subEl =  document.createElement("embed");
			subEl.setAttribute("src", this.url + "MovieID="+movieID+"&FlashID="+this.layerID+"_flash&moviesPath="+ this.moviesPath+"&templatePath="+ this.templatePath);
			subEl.setAttribute("name", this.layerID+"_flash");
			subEl.setAttribute("quality", "high");
			subEl.setAttribute("bgcolor", "#ffffff");
			subEl.setAttribute("allowscriptaccess", "sameDomain");
			subEl.setAttribute("type", "application/x-shockwave-flash");
			subEl.setAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
			subEl.setAttribute("swliveconnect", "true");
			subEl.setAttribute("align", "middle");
			subEl.setAttribute("height", "180");
			subEl.setAttribute("height", "230");
			subEl.setAttribute("wmode", "transparent");
			element.appendChild(subEl);
			this.$(this.layerID).appendChild(element);
			this.status("ADD", " ..created");
		}
		
		this.objFlash = this.$(this.layerID+"_flash");
		this.objFlash = window.document[this.layerID+"_flash"]
		this.objFlash.classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
		
		if (!this.fireEvent("onAfterMovieCreate", this.$(this.objFlash))) {return};
		if (!this.autoplay) {
			this.stop();
		} else {
			this.timer = setTimeout( function () { PA.setLogView(PA.trigger); }, this.logDelay );
			this.fireEvent("onPlay", this.$(this.objFlash))
		}
	},
	createIframe: function () {
		this.status("STA", "Creating iframe: frm"+this.layerID+"_flash")
		try {
			element = document.createElement('<iframe name="frm'+this.layerID+'_flash" id="frm'+this.layerID+'_flash" runat="server" quality="high" frameborder="0" height="1" scrolling="no" width="1"></iframe>')
			this.$(this.layerID).appendChild(element);
			this.status("ADD", " ..created")
		} catch(e) {
			element =  document.createElement("iframe");
			element.setAttribute("quality", "high");
			element.setAttribute("runat", "server");
			element.setAttribute("id", "frm"+this.layerID+"_flash");
			element.setAttribute("name", "frm"+this.layerID+"_flash");
			element.setAttribute("frameborder", "0");
			element.setAttribute("height", "1");
			element.setAttribute("width", "1");
			element.setAttribute("scrolling", "no");
			this.$(this.layerID).appendChild(element);
			this.status("ADD", " ..created")
		}
	},
	createIframe2: function () {
		this.status("STA", "Creating iframe: frm"+this.layerID+"_flash")
		try {
			element = document.createElement('<iframe name="frm'+this.layerID+'_flash" id="frm'+this.layerID+'_flash" runat="server" quality="high" frameborder="0" height="1" scrolling="no" width="1"></iframe>')
			this.$(this.layerID).appendChild(element);
			this.status("Add", " ..created")
		} catch(e) {
			element =  document.createElement("iframe");
			element.setAttribute("quality", "high");
			element.setAttribute("runat", "server");
			element.setAttribute("id", "frm"+this.layerID+"_flash");
			element.setAttribute("name", "frm"+this.layerID+"_flash");
			element.setAttribute("frameborder", "0");
			element.setAttribute("height", "1");
			element.setAttribute("width", "1");
			element.setAttribute("scrolling", "no");
			this.$(this.layerID).appendChild(element);
			this.status("ADD", " ..created")
		}
	},
	createLayer: function (layerID) {
		//Create layer
		this.status("STA", "Creating layer: "+layerID)
		if (this.$(layerID) == null) {
			try {
//				element = document.createElement("<div id='"+ layerID +"' style='position:absolute;	bottom:0px; right:20px; background:none; padding:0px; '></div>");
				element = document.createElement("<div id='"+ layerID +"' ></div>");				
			} catch (e) {
				element = document.createElement("div");
				element.setAttribute("id", layerID);
//				element.setAttribute("style", "position:absolute; bottom:0px; right:20px; background:none; padding:0px; ");
			}
			document.body.appendChild(element);
			this.status("ADD", " ..created")
		}
		return this.$(layerID);
	},
	flashCmd: function (command, args) {
		//Make sure custom function exists and execute
		if (!this.objFlash) {
			this.status("WRN", "Sending "+ command +" failed, because Flash Object doesn't exist")
			return;
		}
		var arrArgs = new Array();
		for (var i=1; i<arguments.length; i++) {
			arrArgs.push((typeof(arguments[i])=="string")? "'"+arguments[i]+"'":arguments[i]); 
		}
		
		this.status("STA", "Sending "+ command +"("+ arrArgs.toString() +") to "+ this.objFlash.name +"...")
		try {
			if (arrArgs.length==0) {
				result = this.objFlash[command]()
			} else {
				result = this.objFlash[command](arrArgs)
			}
			if (typeof(result)!="undefined") {
				this.status("ADD", " result: "+ result)
				return result;
			} else {
				this.status("ADD", " no result is returned")
			}
			return false;
		} catch (e) {
			this.status("WRN", "Command "+ command +" failed")
			return false;
		}
	},
	play: function () {
		this.status("STA", "Playing movie "+this.objFlash.id+" manually")
		if (this.objFlash) {
			this.objFlash.Play();
		}
		if (this.autoplay==false) this.logView();
		this.fireEvent("onPlay", this.objFlash);
	},
	stop: function () {
		this.status("STA", "Stop movie "+this.objFlash.id+" manually")
		if (this.objFlash) {
			this.objFlash.StopPlay();
		}
		this.fireEvent("onStop", this.objFlash);
	},
	setLogView: function (trigger) {
		if(trigger!="PA_Global") this.status("STA", "Logging view for "+trigger+"...")
		if (!this.fireEvent("onBeforeLogMovie")) {return};
		if (this.logMethod=="none") return;
		switch (this.logMethod) {
			case "cookie":
				sContents = (this.readCookie(this.cookieID+"logViews") != null && this.readCookie(this.cookieID+"logViews").indexOf(trigger) > -1) ? this.readCookie(this.cookieID+"logViews") : this.addToString(this.readCookie(this.cookieID+"logViews"), trigger)
				this.createCookie(this.cookieID+"logViews", sContents , this.cookieExpireDays)
				if (false) {
					this.status("ERR", "Error setting cookie")
					if (!this.fireEvent("onErrorLogMovie", this.$(this.objFlash))) {return false};
				}
			break;
		}
		if (!this.fireEvent("onAfterLogMovie")) {return};
		this.status("ADD", " Logged")
		return true;
	},
	getLogView: function (trigger) {
		if(trigger!="PA_Global") this.status("STA", "Get LogView for "+trigger+"...")
		if (this.logMethod=="none") {this.status("ADD", " no logging method, disable movie"); return false;}
		switch (this.logMethod) {
			case "cookie":
				//Check if cookie is set
				//Get cookie contents
				//Check if trigger exists in cookie
				//Return value
				if (this.readCookie(this.cookieID+"logViews") == null || this.readCookie(this.cookieID+"logViews").indexOf(trigger) == -1) {
					this.status("ADD", " value is '"+ this.readCookie(this.cookieID+trigger) +"'")
					return false;
				} else {
					this.status("ADD", " value is '"+ this.readCookie(this.cookieID+trigger) +"'")
					return true;
				}
			break;
		}
	},
	setGlobalLogView: function (trigger) {
		this.status("STA", "Setting global log view for "+trigger+"...")
		this.setLogView("PA_global");
	},
	getGlobalLogView: function (trigger) {
		this.status("STA", "Getting global log view for "+trigger+"...")
		return this.getLogView("PA_global");
	},
	remInString: function (sHaystack, sNeedle) {
		//Remove from field
		delimiter = ", "
		sNeedle = delimiter + sNeedle;
		var iStart = sHaystack.indexOf(sNeedle);
		var iEnd = iStart + sNeedle.length
		if (iStart > -1) {
			tmp="";
			if (iStart > 0) tmp += sHaystack.substring(0,iStart);
			if (iEnd < sHaystack.length) tmp += sHaystack.substring(iEnd, sHaystack.length);
			sHaystack=tmp;
		}
		return sHaystack;
	},
	addToString: function (sHaystack, sNeedle) {
		//Add to field
		delimiter = ", "
		sHaystack += delimiter+sNeedle;
		return sHaystack;
	},
	detectCookiesEnabled: function () {
		this.createCookie (this.cookieID+"detect", "enabled", 0);
		var result= (this.readCookie(this.cookieID+"detect") != null)
		this.eraseCookie (this.cookieID+"detect");
		return result;
	},
	createCookie: function (name,value,days) {
		if (name.indexOf(" ")>-1) {this.status("WRN", "Cookie name invalid"); return;}
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	},
	readCookie:function (name)	{
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	},
	eraseCookie: function (name) {
		this.createCookie(name,"",-1);
	},
	eraseLogViews: function () {
		this.status("STA", "Erasing all logs")
		var nameEQ = this.cookieID;
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) {
				name= c.substring(0,c.indexOf("="));
				this.eraseCookie(name);
			}
		}
		return null;
	},
	setOnLoadInterval: function (interval) {
		if (typeof(interval) == "undefined") interval = this.checkOnLoadInterval;
		if (interval != false && typeof(this.interval) == "undefined") {
			this.interval = setInterval(function () {  if (PA.checkOnLoad()) { clearInterval(PA.interval); PA.status("STA","Document is loaded"); PA.init(); }}, this.checkOnLoadInterval);
			this.checkOnLoadInterval = interval;
		}
		else if (this.interval == false) {clearInterval(this.interval); this.checkOnLoadInterval= false;}
	},
	getOnLoadInterval: function () {
		return this.checkOnLoadInterval;
	},
	checkOnLoad: function () {
		return !(document.body == null || typeof(document.body) == "undefined");
	},
	startOnLoad: function (trigger, proporties) {
		if (typeof(proporties)!="undefined") { this.setProporties(proporties); }
		this.setTrigger(trigger);
		this.setOnLoadInterval();
	},
	startNewMovie: function (trigger, proporties) {
		this.status("EVT", "Starting new movie");
		if (typeof(trigger)!="undefined") {this.trigger = trigger; }
		tmpSkipLogCheck = this.skipLogCheck;
		this.skipLogCheck = true;
		if (this.$(this.layerID)==null) {
			this.status("ADD", " (create new layer)");
			this.createLayer(this.layerID);
			this.insertMovie();
		} else {
			this.status("ADD", " (refill layer)");
			this.removeMovie();
			this.createFlash();
		}
		this.$(this.layerID).style.display='block';
		this.skipLogCheck = tmpSkipLogCheck;
	},
	removeMovie: function () {
		if (this.$(this.layerID) != null) {
			this.status("STA", "Removing movie");
			this.$(this.layerID+"_flash").parentNode.removeChild(this.$(this.layerID+"_flash"))
		}
	},
	status: function (type, msg, extMsg) {
		var style;
		switch (type) {
			case "ADD":
				this.statusLog += msg;
			break;
			case "STA":
				this.statusLog += "<br/>&nbsp;&nbsp;&nbsp;"+": "+ msg;
			break;
			case "WRN":
				style= "color: #996600;"
				this.statusLog += "<br/><span style='"+ style +"'>"+type+": "+ msg+ "</span>";
			break;
			case "ERR":
				style= "color: red; font-weight:bold;"
				this.statusLog += "<br/><span style='"+ style +"'>"+type+": "+ msg+ "</span>";
			break;
			case "EVT":
				style= "color: green;"
				this.statusLog += "<br/><span style='"+ style +"'>"+type+": "+ msg+ "</span>";
			break;
			default:
				this.statusLog += "<br/>"+type+": "+ msg;
			break;
		}
		style = "color:gray; font-size:smaller;"
		if (typeof(extMsg) != "undefined") this.statusLog += "<span style='"+ style +"'>("+ extMsg +")</span>"
		//Write to possible existing text area
		if (this.$("PA_debug")) this.$("PA_debug").innerHTML = this.statusLog;
	},
	move_DIV: function (layerID) {
		var y = (typeof window.pageYOffset!='undefined')? window.pageYOffset :
			( (document.documentElement && typeof document.documentElement.scrollTop!='undefined') && (document.body && typeof document.body.scrollTop!='undefined')) ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) :
			 (document.documentElement && typeof document.documentElement.scrollTop!='undefined') ? document.documentElement.scrollTop : document.body.scrollTop;
		y+=0;
		y*=-1;
		y=-100;
//		if (y!=this.LastPosY) {
			if (window.opera) {
				document.getElementById(layerID).style.pixelBottom=y;
			}
			else if (document.layers) {
				document.layers[layerID].top=y;
			}
			else if (document.getElementById) {
				document.getElementById(layerID).style.bottom=y+'px';
			}
			else if (document.all) {
				document.all[layerID].style.pixelBottom=y;
			}
			this.LastPosY=y;
		//}
		if (this.LastPosY==undefined) {this.LastPosY=0;}
//		if (TimeScroll)	window.setTimeout('move_DIV()',100);
	},
	updatePosition: function () {
		//Make sure that layer stays on screen, even when user scrolls
		var theTop = 0;
		//this.move_DIV(this.layerID);
//		temp = setTimeout('PA.updatePosition()',100);
		return;
		if (this.$(this.layerID)) {
			if (window.innerHeight) { pos = window.pageYOffset; }
			else if (document.documentElement && document.documentElement.scrollTop) { /*pos = document.documentElement.scrollTop/100;*/ pos=0; }
			else if (document.body) { pos = document.body.scrollTop; }
			if (pos < theTop) pos = theTop;
			else pos += 00;
			//if (pos == this.old)	{
			this.$(this.layerID).style.bottom = (-pos+240)+"px";
//			}
		}
		this.old = pos;
		//temp = setTimeout('PA.updatePosition()',100);
	},
	fireEvent: function (eventID, args) {
		//Make sure custom function exists and execute
		if (!this[eventID]) return true;
		var arrArgs = new Array();
		for (var i=1; i<arguments.length; i++) {arrArgs.push(arguments[i]);}
		return !(this[eventID].apply(arrArgs) === false)
	},
	setTrigger: function (trigger) {
		this.trigger = trigger;
	},
	getTrigger: function () {
		return this.trigger;
	},
	movieEnd: function () {
		this.$(this.layerID).style.display='none';
		this.fireEvent("onMovieEnd", this.$(this.objFlash))
	},
	userClose: function () {
		this.$(this.layerID).style.display='none';
		this.setGlobalLogView("userClose"); 
		this.fireEvent("onUserClose", this.$(this.objFlash))
	},
	$: function () {
		var results = [], element;
		for (var i = 0; i < arguments.length; i++) {
			element = arguments[i];
			if (typeof element == 'string')
			  element = document.getElementById(element);
			results.push(element);
		}
		return results.length < 2 ? results[0] : results;
	}
	,//From http://www.bigbold.com/snippets/posts/show/2025
	x: function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP')}catch(e){return new XMLHttpRequest()}}}
	,send: function(u,f,m,a){var x=this.x();x.open(m,u,true);x.onreadystatechange=function(){if(x.readyState==4)f(x.responseText)};if(m=='POST')x.setRequestHeader('Content-type','application/x-www-form-urlencoded');x.send(a)}
	,get: function(url,func){this.send(url,func,'GET')}
	,update: function(url,elm,obj,fnc){var e=this.$(elm);var f=function(r){e.innerHTML=r;fnc.apply(obj)};this.get(url,f)}
}

var PA = new PersonalAssistant("divPA");
if (true) {
document.write('<style type="text/css">');
document.write('#'+ PA.layerID +'{');
document.write('  /* Netscape 4, IE 4.x-5.0/Win and other lesser browsers will use this */');
document.write('  position: absolute; right: 20px; bottom: 0px;');
document.write('}');
document.write('body > div#'+ PA.layerID +' {');
document.write('  /* used by Opera 5+, Netscape6+/Mozilla, Konqueror, Safari, OmniWeb 4.5+, iCab, ICEbrowser */');
document.write('  position: fixed;right: 22px; ');
document.write('}');
document.write('</style>');
document.write('<!--[if gte IE 5.5]>');
document.write('<![if lt IE 7]>');
document.write('<style type="text/css">');
document.write('div#'+ PA.layerID +' {');
document.write('  /* IE5.5+/Win - this is more specific than the IE 5.0 version */');
document.write('  right: auto; bottom: auto;');
document.write("  left: expression( ( -21 - "+ PA.layerID +".offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );");
document.write("  top: expression( ( -0 - "+ PA.layerID +".offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );");
document.write('}');
document.write('</style>');
document.write('<![endif]>');
document.write('<![endif]-->');
}
