/* ================================================ */
/*                                                  */
/*            Regus Business Centers JS             */
/*             Version 0.1 -- 12.2004               */
/*                                                  */
/* ================================================ */

function fnWindowOpen(url, name, options){
	if(!options) options="resizable=1,scrollbars=1";
	newWindow = window.open(url, name, options);
	newWindow.focus();
}

function BrowserCheck()
{
	var b = navigator.appName;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	var c = navigator.appVersion;
	this.AOL = (c.indexOf('AOL')>0);
	this.v = parseInt(c);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ns6 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie5b = (navigator.userAgent.indexOf('MSIE 5.5')>0);
	this.ie6 = (navigator.userAgent.indexOf('MSIE 6')>0);
	this.gecko = (navigator.userAgent.indexOf('Gecko') > 0);
	if (this.ie5) this.v = 5;
	if (this.ie6) this.v = 6;
}

is = new BrowserCheck();

function toggleDisplay (v) {
	var element = (typeof v == "string") ? document.getElementById(v) : v;
	menuToClear = v;
	if (element.style.display == 'block') {
		element.style.display = 'none';
	} else {
		element.style.display = 'block';
	}
	
}

var lastSearch = 'officesSearch';
var lastSearchLink = 'officesLink';

function swapSearch (id, link) {

	var toShow = document.getElementById(id);
	if (toShow.style.display != 'block') {
		document.getElementById(lastSearch).style.display = 'none';
		lastSearch = id;
		
		document.getElementById(lastSearchLink).className = '';
		lastSearchLink = link;
		
		toShow.style.display = 'block';
		document.getElementById(link).className = 'active';
	} 
	
}

var _processingStateToggle = false;
var countryRegistrationCount = 0;
var countryDropdownCollection = null;

function getObject(objectId) { 

	if(document.getElementById && document.getElementById(objectId)) { 
		return document.getElementById(objectId); 
	} 
	else if (document.all && document.all(objectId)) {  
		return document.all(objectId); } 
	else if (document.layers && document.layers[objectId]) { 
		document.layers[objectId]; 
	} 
	else 
	{ 
		return false; 
	} 
}

var functionIsCityTextboxDefaultLoaded = false;
var countryDataIslandLoaded = false;
function EnableCityControl(citytxtdiv, citycbodiv, countryguid)
{
	var showTextbox = true;
	if(functionIsCityTextboxDefaultLoaded)
	{
		showTextbox = IsCityTextboxDefault();
	}

   if(IsCountryRequireCityTextbox(countryguid))
   {
      showTextbox = true;
   }
   
   if(showTextbox)
   {
	citytxtdiv.style.display = '';
	citytxtdiv.style.visibility = "visible";
	citycbodiv.style.display = 'NONE';
	citycbodiv.style.visibility = "hidden";
   }
   else
   {
	citytxtdiv.style.display = 'NONE';
	citytxtdiv.style.visibility = "hidden";
	citycbodiv.style.display = '';
	citycbodiv.style.visibility = "visible";
   }
}
function IsCountryRequireCityTextbox(countryGuid)
{
	var isFound = false;
	
	if(countryDataIslandLoaded)
	{
		countryGuids.recordset.absoluteposition=1;
		while(!countryGuids.recordset.EOF)
		{
			if(countryGuids.recordset("guid") == countryGuid)
			{
				isFound = true;
			}
			countryGuids.recordset.MoveNext();
		}
	}
	return isFound;
}

var _callToggle = false;

function manageCountryBoundStateCity(state, citytxt, citycbo, country)
{
	if (_callToggle == false)
	{
		_callToggle = true;
		toggleStateDropdown(state,country);
		_callToggle = false;
	}
	
	var stateDiv = getObject(state);
	var countrySelect = getObject(country);
	var cityTxtDiv = getObject(citytxt);
	var cityCboDiv = getObject(citycbo);
	var selectedIndex = -1;
	
	if ((stateDiv != false) && (countrySelect != false) && (cityTxtDiv != false) && (cityCboDiv != false))
	{
		selectedIndex = countrySelect.selectedIndex;
		
		if ((selectedIndex != -1) && (countrySelect.options[selectedIndex].value == '25439b47-af53-46f4-bca8-6a8a2a854b07'))
			stateDiv.style.display = '';	
		else
			stateDiv.style.display = 'NONE';	
			
		if (selectedIndex != -1)
			EnableCityControl(cityTxtDiv, cityCboDiv, countrySelect.options[selectedIndex].value);
	}
		
	return true;	
}
function toggleStateDropdown(state,country)
{
	
	var stateDiv = getObject(state);
	var countrySelect = getObject(country);
	var selectedIndex = -1;

	if ((stateDiv != false) && (countrySelect != false))
	{
		selectedIndex = countrySelect.selectedIndex;
		
		if ((selectedIndex != -1) && (countrySelect.options[selectedIndex].value == '25439b47-af53-46f4-bca8-6a8a2a854b07'))
			stateDiv.style.display = '';	
		else
			stateDiv.style.display = 'NONE';	
	}
	else
	{
		return true;
	}

	if (_processingStateToggle == false)
	{
		if (typeof countryDropdownCollection == 'undefined')
		{
			return true;
		}		
		_processingStateToggle = true;
		if ((countryDropdownCollection != null) && (countryRegistrationCount != null))
		{
			var updateCountrySelect;
			for(var i=0; i<countryRegistrationCount; i++)
			{
				if (countryDropdownCollection[i] != country)
				{
					updateCountrySelect = getObject(countryDropdownCollection[i]);
					if (updateCountrySelect != false)
					{
						var _selectedIndex = false;
						var _us_index = -1;
						
						for(var x=0;x<updateCountrySelect.options.length;x++)
						{
							if (updateCountrySelect.options[x].value == '25439b47-af53-46f4-bca8-6a8a2a854b07')
							{
								_us_index = x;
							}
							if (updateCountrySelect.options[x].value == countrySelect.options[selectedIndex].value)
							{
								updateCountrySelect.selectedIndex = x;
								_selectedIndex = true;
							}

						}
						
						if (_selectedIndex == true)
						{
						}
						else
						{
							updateCountrySelect.onchange();	
						}
					}
				}
			}
		}
		_processingStateToggle = false;
	}
		
	
		
	return true;	
}

function getSelectedSearchTab()
{
	var tabs = new Array('officesSearch','meetingRoomsSearch','virtualOfficesSearch');
	for(var c=0;c<tabs.length;c++){if( document.getElementById(tabs[c]).style.display==('block'))return tabs[c];}
	return '';
}

var pLastSearch = 'quickFindSearch';
var pLastSearchLink = 'quickFindLink';

function pSwapSearch (id, link) {

	var toShow = document.getElementById(id);
	if (toShow.style.display != 'block') {
		document.getElementById(pLastSearch).style.display = 'none';
		pLastSearch = id;
		
		document.getElementById(pLastSearchLink).className = '';
		pLastSearchLink = link;
		
		toShow.style.display = 'block';
		document.getElementById(link).className = 'active';
	}
}

function pGetSelectedSearchTab()
{
	var tabs = new Array('quickFindSearch','addressSearch','POISearch','centerSearch');
	for(var c=0;c<tabs.length;c++){if( document.getElementById(tabs[c]).style.display==('block'))return tabs[c];}
	return '';
}

var lastParent = 'oList';
var lastGridImage = 'offices';

function swapgrid (id, parent) {
	document.getElementById(lastParent).className = 'productList';
	lastParent = parent;
	document.getElementById(parent).className = 'productList activeList';
	document.getElementById(lastGridImage + '2x4grid').style.display = 'none';
	lastGridImage = id;
	document.getElementById(id + '2x4grid').style.display = 'block';
}

function enableDisableSiblings(source,siblingIds,enable)
{
	var prefix=source.id.substr(0,source.id.lastIndexOf('_')+1);
	var ids=siblingIds.split('|');
	for(var c=0;c<ids.length;c++) document.getElementById(prefix+ids[c]).disabled=(!enable);
}

function getAbsoluteLeft(v) {
	var o = (typeof v == "string") ? document.getElementById(v) : v;
	oLeft = o.offsetLeft
	while(o.offsetParent!=null) {
		oParent = o.offsetParent
		oLeft += oParent.offsetLeft
		o = oParent;
	}
	return oLeft
}

function getAbsoluteTop(v) {
	var o = (typeof v == "string") ? document.getElementById(v) : v;
	oTop = o.offsetTop;
	while(o.offsetParent!=null) {
		oParent = o.offsetParent
		oTop += oParent.offsetTop
		o = oParent;
	}
	return oTop;
}

function switchWidget(id) {
	document.getElementById('photoGal').className = "";
	document.getElementById('virtualTour').className = "";
	document.getElementById('floorPlan').className = "";	
	document.getElementById(id).className = "active";
}

function switchTab(id) {
	var tabs = new Array('about','pricing','maps','amenities','nearby');
	for(i=0;i<tabs.length;i++) {
		document.getElementById(tabs[i]).style.display = "none";
	}
	document.getElementById(id).style.display = "block";
	
	for(i=0;i<tabsCollection.length;i++) {
		document.getElementById(tabsCollection[i]).className = "";
	}
	
	for(i=0;i<tabs.length;i++) {
		if(tabs[i] == id) {
			document.getElementById(tabsCollection[i]).className = "active";
		}
	}
	
	var activeIndex=-1;
	for(i=0;i<tabs.length;i++) {
		if(tabs[i] == id) {
			activeIndex = i;
		}
	}
	
	if((activeIndex != -1) && (activeIndex != tabs.length-1)) {
		document.getElementById(tabsCollection[activeIndex+1]).className = "pastActive";
	}
	
	var j;
	for(i=0;i<tabsCollection.length;i++) {
		if (document.getElementById(tabsCollection[i]).style.display != "none")
		{
			j = i;
		}	
	}
	document.getElementById(tabsCollection[j]).className += " last";
}

function switchPackage(side) {
	if(side=="left") {
		document.getElementById('tr').className="";
		document.getElementById('br').className="";
		document.getElementById('tl').className="active";
		document.getElementById('bl').className="active";
	}
	if(side=="right") {
		document.getElementById('tr').className="active";
		document.getElementById('br').className="active";
		document.getElementById('tl').className="";
		document.getElementById('bl').className="";
	}
}

function switchCard(which) {
	if(which=="left") {
		document.getElementById('tr').className="";
		document.getElementById('br').className="";
		document.getElementById('tc').className="";
		document.getElementById('bc').className="";
		document.getElementById('tl').className="active";
		document.getElementById('bl').className="active";
	}
	if(which=="right") {
		document.getElementById('tr').className="active";
		document.getElementById('br').className="active";
		document.getElementById('tl').className="";
		document.getElementById('bl').className="";
		document.getElementById('tc').className="";
		document.getElementById('bc').className="";
	}
	if(which=="center") {
		document.getElementById('tr').className="";
		document.getElementById('br').className="";
		document.getElementById('tl').className="";
		document.getElementById('bl').className="";
		document.getElementById('tc').className="active";
		document.getElementById('bc').className="active";
	}
}

function sml_easing_Regular_easeOut(t,b,c,d)
{ 
	return -c *(t/=d)*(t-2) + b; 
}
function sml_domApi_initDepths()
{
	sml.domApi.__z = 1000;
}
function sml_domApi_getNextHighestDepth()
{
	return ++sml.domApi.__z;
}
function sml_domApi_moveToHighest(v)
{
	var o = (typeof(v)== "string") ? document.getElementById(v) : v;
	if (document.body.style)
		o.style.zIndex = sml.domApi.getNextHighestDepth();
}
var sml = {};
sml.easing = {};
sml.easing.Regular = {};
sml.easing.Regular.easeOut = sml_easing_Regular_easeOut;
sml.domApi = {};

sml.domApi.__z=0;
sml.domApi.__depthInited=false;
sml.domApi.initDepths          = sml_domApi_initDepths;
sml.domApi.getNextHighestDepth = sml_domApi_getNextHighestDepth;
sml.domApi.moveToHighest       = sml_domApi_moveToHighest;

function RecentLoc(o)
{
	this.dropDownId   = o.dropDownId;
	this.toggleLinkId = o.toggleLinkId;
	
	
	this.id    = o.id;
	
	this.borderStyle = "";
	this.state = RecentLoc.STATE_OFF;
	this.tween = {interval:null, t:0, b:null, c:null, d:20};
	
	this.dropDown = null;
	this.toggleLink = null;
	
	this.boxHeight = null;
	this.boxPos = {x0:null, y0:null, x1:null, y1:null};
	this.affectedSelectBoxArray = null;
}

function RecentLoc_toggleLinkHandler()
{
	var rlc = RecentLocCollection.instance;
	var i = rlc.rl_arr.length;
	while (i--)
	{
		if (this==rlc.rl_arr[i].toggleLink)
		{
			rlc.rl_arr[i].toggleDropDown();
			RecentLocCollection.activeRL = rlc.rl_arr[i];
			break;
		}
	}
	return false;
}
function RecentLoc_animateActiveRL()
{
	var activeRL = RecentLocCollection.activeRL;
	var dd = activeRL.dropDown;
	
	with (activeRL.tween)
	{
		dd.style.height = Math.floor(sml.easing.Regular.easeOut(t, b, c, d))+"px";
		if (t==0) 
		{
			clearInterval(activeRL.tween.interval);
			activeRL.tween.interval = setInterval(RecentLoc.animateActiveRL, 20);
		}
		else if (t==d)
		{
			clearInterval(activeRL.tween.interval);
			
			activeRL.state = (activeRL.state == RecentLoc.STATE_TO_ON) ? RecentLoc.STATE_ON : RecentLoc.STATE_OFF;
			
			if (activeRL.state == RecentLoc.STATE_ON)
			{
				dd.style.visibility =  "visible";
			}
			else
			{
				if (activeRL.affectedSelectBoxArray)
					for (var i=0; i<activeRL.affectedSelectBoxArray.length; i++)
						activeRL.affectedSelectBoxArray[i].style.visibility = "visible";
				dd.style.visibility =  "hidden";
				RecentLocCollection.activeRL = null;
			}
		}
		t++;
	}
};
RecentLoc.mouseoutTO = 0;

function RecentLoc_mouseOutHandler(e)
{
	if (RecentLocCollection.activeRL)
		RecentLoc.mouseoutTO = setTimeout(RecentLoc.mouseOutLimiter, 500);
}
function RecentLoc_mouseOutLimiter()
{
	if (RecentLocCollection.activeRL)
		RecentLocCollection.activeRL.toggleDropDown();
}
function RecentLoc_mouseOverHandler(e)
{
	if (RecentLocCollection.activeRL)
		clearTimeout(RecentLoc.mouseoutTO);;
}

function RecentLoc_p_init()
{
	var dropDown   = document.getElementById(this.dropDownId);
	var toggleLink = document.getElementById(this.toggleLinkId);
	
	if (dropDown && toggleLink)
	{
		this.dropDown = dropDown;
		this.toggleLink = toggleLink;
		this.toggleLink.onclick = RecentLoc.toggleLinkHandler;
		return true;
	}
	return false;	
}

function RecentLoc_p_animate()
{
	if (RecentLocCollection.activeRL != null && RecentLocCollection.activeRL != this)
		RecentLocCollection.activeRL.stopAnimate();
	RecentLocCollection.activeRL = this;
	RecentLoc.animateActiveRL();
}
function RecentLoc_p_stopAnimate()
{
	clearInterval(this.tween.interval);
	this.state = RecentLoc.STATE_OFF;
	if (this.affectedSelectBoxArray)
		for (var i=0; i<this.affectedSelectBoxArray.length; i++)
			this.affectedSelectBoxArray[i].style.visibility = "visible";
	this.dropDown.style.height = "0px";
	this.dropDown.style.visibility = "hidden";
}
function RecentLoc_p_toggleDropDown()
{
	if (this.state != RecentLoc.STATE_OFF && this.state != RecentLoc.STATE_ON)
		return;
	
	clearTimeout(RecentLoc.mouseoutTO);
	var dd = this.dropDown;
	if (this.boxHeight == null)
	{
		dd.style.visibility = "hidden";
		dd.style.display = "block";
		this.boxHeight = dd.offsetHeight;
		dd.style.height = "0";
	
	}
	
	dd.style.visibility = "visible";
	sml.domApi.moveToHighest(dd);
	
	if (!this.affectedSelectBoxArray)
		this.initAffectedSelectBoxArray();

	if (this.affectedSelectBoxArray)
	{
		if (this.state == RecentLoc.STATE_TO_ON || this.state == RecentLoc.STATE_OFF)
		{
			this.state = RecentLoc.STATE_TO_ON;
			this.tween = {t:0, b:parseInt(dd.style.height), c:this.boxHeight-parseInt(dd.style.height), d:10};
			for (var i=0; i<this.affectedSelectBoxArray.length; i++)
				this.affectedSelectBoxArray[i].style.visibility = "hidden";
			this.trackMouseOut(true);
		}	
		else
		{
			this.state = RecentLoc.STATE_TO_OFF;
			this.tween = {t:0, b:parseInt(dd.style.height), c:-parseInt(dd.style.height), d:10};
			this.trackMouseOut(false);
		}
	}
	this.animate();
	
	
}
function RecentLoc_p_initAffectedSelectBoxArray()
{
	var box = this.dropDown;
	var boxPos_y = getAbsoluteTop(box);

	var return_arr = new Array();
	var arr = document.getElementsByTagName("select");

	for (var i=0; i<arr.length; i++)
	{
		var selObj = arr[i];
		var selObj_y = getAbsoluteTop(selObj);
		
		var fail = Math.abs(selObj_y-boxPos_y) < this.boxHeight;
		
		if (fail)
			return_arr.push(arr[i]);
	}
	
	this.affectedSelectBoxArray = return_arr
}
function RecentLoc_p_trackMouseOut(track)
{
	if (RecentLocCollection.activeRL)
	{
		clearTimeout(RecentLoc.mouseoutTO);
		this.dropDown.onmouseout  = track ? RecentLoc.mouseOutHandler  : null;
		this.dropDown.onmouseover = track ? RecentLoc.mouseOverHandler : null;
	}
}

RecentLoc.STATE_OFF = 0;
RecentLoc.STATE_TO_ON = 1;
RecentLoc.STATE_ON = 2;
RecentLoc.STATE_TO_OFF = 3;

RecentLoc.animateActiveRL  = RecentLoc_animateActiveRL;
RecentLoc.mouseOverHandler = RecentLoc_mouseOverHandler;
RecentLoc.mouseOutHandler  = RecentLoc_mouseOutHandler;
RecentLoc.mouseOutLimiter  = RecentLoc_mouseOutLimiter;
RecentLoc.toggleLinkHandler = RecentLoc_toggleLinkHandler;

RecentLoc.prototype.init            = RecentLoc_p_init;
RecentLoc.prototype.animate         = RecentLoc_p_animate;
RecentLoc.prototype.stopAnimate     = RecentLoc_p_stopAnimate;
RecentLoc.prototype.toggleDropDown  = RecentLoc_p_toggleDropDown;
RecentLoc.prototype.trackMouseOut   = RecentLoc_p_trackMouseOut;
RecentLoc.prototype.initAffectedSelectBoxArray = RecentLoc_p_initAffectedSelectBoxArray;

function RecentLocCollection()
{
	this.rl_arr = new Array();
	this.className = "RecentLocCollection";
	RecentLocCollection.instance = this;
}
function RecentLocCollection_p_addItem(o)
{
	var rl = new RecentLoc(o);
	if (rl.init())
	{
		this.rl_arr.push(rl);
	}
}

RecentLocCollection.instance = null;
RecentLocCollection.activeRL = null;
RecentLocCollection.prototype.addItem = RecentLocCollection_p_addItem;

function ContextHelpItem(o)
{
	this.id      = o.id;
	this.linkId  = o.linkId;
	this.blockId = o.blockId;
	this.closeId = o.closeId;
	this.oLink  = null;
	this.oBlock = null;
	this.oClose = null;
}
function ContextHelpItem_p_init()
{
	
	if (document.getElementById)
	{
		var oLink  = document.getElementById(this.linkId);
		var oBlock = document.getElementById(this.blockId);
		var oClose = document.getElementById(this.closeId);
	}
	
	if (!(oLink && oBlock && oClose))
 	{
 		return false;
 	}
	
	this.oLink  = oLink;
	this.oBlock = oBlock;
	this.oClose = oClose; 	

 	this.oLink.onclick  = ContextHelp.linkHandler;
	this.oClose.onclick = ContextHelp.closeHandler;
	
 	return true;
 }
function ContextHelpItem_p_activate(x,y)
{
	if (this.oBlock.style)
	{
		this.oBlock.style.display = "block";
		this.oBlock.style.left = x + "px";
		this.oBlock.style.top  = y + "px";
	}
}
function ContextHelpItem_p_deactivate()
{
	this.oBlock.style.display = "none";
}
ContextHelpItem.prototype.init       = ContextHelpItem_p_init;
ContextHelpItem.prototype.activate   = ContextHelpItem_p_activate;
ContextHelpItem.prototype.deactivate = ContextHelpItem_p_deactivate;

function ContextHelp()
{
	this.chiArray   = new Array();
	this.activeItem = undefined;
	ContextHelp.instance = this;
}
ContextHelp.instance = undefined;
function ContextHelp_linkHandler(e)
{
	ContextHelp.instance.onItemLink(this);
	return false;
}
function ContextHelp_closeHandler(e)
{
	ContextHelp.instance.onItemClose(this);
	return false;
}
function ContextHelp_getOffendingContainer()
{
	var divTwoCol = document.getElementById("quickSearchTwoCol");
	var divOneCol = document.getElementById("quickSearchOneCol");
	return (divTwoCol || divOneCol);
}

function ContextHelp_p_onItemLink(o)
{
	for (var i=0; i<this.chiArray.length; i++)
	{
		if (this.chiArray[i].oLink==o)
		{
			if (typeof(this.activeItem)!='undefined')
			{
				this.activeItem.deactivate();
			}
			this.activeItem = this.chiArray[i];
			var x = getAbsoluteLeft(o)-2;
			var y = getAbsoluteTop(o) -2;
			
			var offendingDiv = ContextHelp.getOffendingContainer();
			if (offendingDiv)
			{
				x -= getAbsoluteLeft(offendingDiv);
				y -= getAbsoluteTop (offendingDiv);
			}
			this.activeItem.activate(x,y);
		}
	}
}
function ContextHelp_p_onItemClose(o)
{
	for (var i=0; i<this.chiArray.length; i++)
	{
		if (typeof(this.activeItem)!='undefined')
		{
			this.activeItem.deactivate();
			this.activeItem = undefined;
		}

	}
}
function ContextHelp_p_addItem(o)
{
	if (document.getElementById)
	{
		o.id = this.chiArray.length;
		var item = new ContextHelpItem(o);
		if (item.init())
		{
			this.chiArray.push(item);
		}
	}
}


ContextHelp.linkHandler           = ContextHelp_linkHandler;
ContextHelp.closeHandler          = ContextHelp_closeHandler;
ContextHelp.getOffendingContainer = ContextHelp_getOffendingContainer;

ContextHelp.prototype.onItemLink  = ContextHelp_p_onItemLink;
ContextHelp.prototype.onItemClose = ContextHelp_p_onItemClose;
ContextHelp.prototype.addItem     = ContextHelp_p_addItem;

if(!Array.prototype.push) 
{
	Array.prototype.push = function()
	{
		for (var i=0; i<arguments.length; i++)
		{
			this[this.length] = arguments[i];
		}
		return this.length;
	}
}

window.onload = function()
{
	sml.domApi.initDepths();
}

function setGLTimeout() {
	document.getElementById('globalList').timeout = setTimeout(toggleGL,1000);
}

function killGLTimeout() {
	clearTimeout(document.getElementById('globalList').timeout);
}

function toggleGL() {
	toggleDisplay('globalList');
}

// -------------------------------------------------------------------
// DHTML Window Widget- By Dynamic Drive, available at: http://www.dynamicdrive.com
// -------------------------------------------------------------------

var dhtmlwindow={
imagefiles:['zsys/windowfiles/min.gif', 'zsys/windowfiles/close.gif', 'zsys/windowfiles/restore.gif', 'zsys/windowfiles/resize.gif'], //Path to 4 images used by script, in that order
ajaxbustcache: true,

minimizeorder: 0,
tobjects: [],

init:function(t){
	var domwindow=document.createElement("div") //create dhtml window div
	domwindow.id=t
	domwindow.className="dhtmlwindow"
	var domwindowdata=''
	domwindowdata='<div class="drag-handle">'
	domwindowdata+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>'
	domwindowdata+='</div>'
	domwindowdata+='<div class="drag-contentarea"></div>'
	domwindowdata+='<div class="drag-statusarea"><div class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;">&nbsp;</div></div>'
	domwindowdata+='</div>'
	domwindow.innerHTML=domwindowdata
	document.getElementById("dhtmlwindowholder").appendChild(domwindow)
	this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 100
	var t=document.getElementById(t)
	var divs=t.getElementsByTagName("div")
	for (var i=0; i<divs.length; i++){
		if (/drag-/.test(divs[i].className))
			t[divs[i].className.replace(/drag-/, "")]=divs[i]
	}
	t.style.zIndex=this.zIndexvalue
	t.handle._parent=t
	t.resizearea._parent=t
	t.controls._parent=t
	t.onclose=function(){return true}
	t.onmousedown=function(){dhtmlwindow.zIndexvalue++; this.style.zIndex=dhtmlwindow.zIndexvalue}
	t.handle.onmousedown=dhtmlwindow.setupdrag
	t.resizearea.onmousedown=dhtmlwindow.setupdrag
	t.controls.onclick=dhtmlwindow.enablecontrols
	t.show=function(){dhtmlwindow.show(this)}
	t.hide=function(){dhtmlwindow.close(this)}
	t.setSize=function(w, h){dhtmlwindow.setSize(this, w, h)}
	t.moveTo=function(x, y){dhtmlwindow.moveTo(this, x, y)}
	t.isResize=function(bol){dhtmlwindow.isResize(this, bol)}
	t.isScrolling=function(bol){dhtmlwindow.isScrolling(this, bol)}
	t.load=function(contenttype, contentsource, title){dhtmlwindow.load(this, contenttype, contentsource, title)}
	this.tobjects[this.tobjects.length]=t
	return t
},

open:function(t, contenttype, contentsource, title, attr, recalonload){
	var d=dhtmlwindow
	function getValue(Name){
		var config=new RegExp(Name+"=([^,]+)", "i")
		return (config.test(attr))? parseInt(RegExp.$1) : 0
	}
	if (document.getElementById(t)==null)
		t=this.init(t)
	else
		t=document.getElementById(t)
	t.setSize(getValue(("width")), (getValue("height")))
	var xpos=getValue("center")? "middle" : getValue("left")
	var ypos=getValue("center")? "middle" : getValue("top")
	//t.moveTo(xpos, ypos)
	if (typeof recalonload!="undefined" && recalonload=="recal" && this.scroll_top==0){
		if (window.attachEvent && !window.opera)
			this.addEvent(window, function(){setTimeout(function(){t.moveTo(xpos, ypos)}, 400)}, "load")
		else
			this.addEvent(window, function(){t.moveTo(xpos, ypos)}, "load")
	}
	t.isResize(getValue("resize"))
	t.isScrolling(getValue("scrolling"))
	t.style.visibility="visible"
	t.style.display="block"
	t.contentarea.style.display="block"
	t.moveTo(xpos, ypos) //Position window
	t.load(contenttype, contentsource, title)
	if (t.state=="minimized" && t.controls.firstChild.title=="Restore"){
		t.controls.firstChild.setAttribute("src", dhtmlwindow.imagefiles[0])
		t.controls.firstChild.setAttribute("title", "Minimize")
		t.state="fullview"
	}
	return t
},

setSize:function(t, w, h){
	t.style.width=Math.max(parseInt(w), 150)+"px"
	t.contentarea.style.height=Math.max(parseInt(h), 100)+"px"
},

moveTo:function(t, x, y){
	this.getviewpoint()
	t.style.left=(x=="middle")? this.scroll_left+(this.docwidth-t.offsetWidth)/2+"px" : this.scroll_left+parseInt(x)+"px"
	t.style.top=(y=="middle")? this.scroll_top+(this.docheight-t.offsetHeight)/2+"px" : this.scroll_top+parseInt(y)+"px"
},

isResize:function(t, bol){
	t.statusarea.style.display=(bol)? "block" : "none"
	t.resizeBool=(bol)? 1 : 0
},

isScrolling:function(t, bol){
	t.contentarea.style.overflow=(bol)? "auto" : "hidden"
},

load:function(t, contenttype, contentsource, title){
	var contenttype=contenttype.toLowerCase()
	if (typeof title!="undefined")
		t.handle.firstChild.nodeValue=title
	if (contenttype=="inline")
		t.contentarea.innerHTML=contentsource
	else if (contenttype=="div"){
		t.contentarea.innerHTML=document.getElementById(contentsource).innerHTML
		document.getElementById(contentsource).style.display="none"
	}
	else if (contenttype=="iframe"){
		t.contentarea.style.overflow="hidden"
		if (!t.contentarea.firstChild || t.contentarea.firstChild.tagName!="IFRAME")
			t.contentarea.innerHTML='<iframe src="" style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+t.id+'"></iframe>'
		window.frames["_iframe-"+t.id].location.replace(contentsource)
		}
	else if (contenttype=="ajax"){
		this.ajax_connect(contentsource, t)
	}
	t.contentarea.datatype=contenttype
},

setupdrag:function(e){
	var d=dhtmlwindow
	var t=this._parent
	d.etarget=this
	var e=window.event || e
	d.initmousex=e.clientX
	d.initmousey=e.clientY
	d.initx=parseInt(t.offsetLeft)
	d.inity=parseInt(t.offsetTop)
	d.width=parseInt(t.offsetWidth)
	d.contentheight=parseInt(t.contentarea.offsetHeight)
	if (t.contentarea.datatype=="iframe"){
		t.style.backgroundColor="#F8F8F8"
		t.contentarea.style.visibility="hidden"
	}
	document.onmousemove=d.getdistance
	document.onmouseup=function(){
		if (t.contentarea.datatype=="iframe"){
			t.contentarea.style.backgroundColor="white"
			t.contentarea.style.visibility="visible"
		}
		d.stop()
	}
	return false
},

getdistance:function(e){
	var d=dhtmlwindow
	var etarget=d.etarget
	var e=window.event || e
	d.distancex=e.clientX-d.initmousex
	d.distancey=e.clientY-d.initmousey
	if (etarget.className=="drag-handle")
		d.move(etarget._parent, e)
	else if (etarget.className=="drag-resizearea")
		d.resize(etarget._parent, e)
	return false
},

getviewpoint:function(){
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
},

rememberattrs:function(t){
	this.getviewpoint()
	t.lastx=parseInt((t.style.left || t.offsetLeft))-dhtmlwindow.scroll_left
	t.lasty=parseInt((t.style.top || t.offsetTop))-dhtmlwindow.scroll_top
	t.lastwidth=parseInt(t.style.width)
},

move:function(t, e){
	t.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px"
	t.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"
},

resize:function(t, e){
	t.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex, 150)+"px"
	t.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey, 100)+"px"
},

enablecontrols:function(e){
	var d=dhtmlwindow
	var sourceobj=window.event? window.event.srcElement : e.target
	if (/Minimize/i.test(sourceobj.getAttribute("title")))
		d.minimize(sourceobj, this._parent)
	else if (/Restore/i.test(sourceobj.getAttribute("title")))
		d.restore(sourceobj, this._parent)
	else if (/Close/i.test(sourceobj.getAttribute("title")))
		d.close(this._parent)
	return false
},

minimize:function(button, t){
	dhtmlwindow.rememberattrs(t)
	button.setAttribute("src", dhtmlwindow.imagefiles[2])
	button.setAttribute("title", "Restore")
	t.state="minimized"
	t.contentarea.style.display="none"
	t.statusarea.style.display="none"
	if (typeof t.minimizeorder=="undefined"){
		dhtmlwindow.minimizeorder++
		t.minimizeorder=dhtmlwindow.minimizeorder
	}
	t.style.left="10px"
	t.style.width="200px"
	var windowspacing=t.minimizeorder*10
	t.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(t.handle.offsetHeight*t.minimizeorder)-windowspacing+"px"
},

restore:function(button, t){
	dhtmlwindow.getviewpoint()
	button.setAttribute("src", dhtmlwindow.imagefiles[0])
	button.setAttribute("title", "Minimize")
	t.state="fullview"
	t.style.display="block"
	t.contentarea.style.display="block"
	if (t.resizeBool)
		t.statusarea.style.display="block"
	t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px"
	t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
	t.style.width=parseInt(t.lastwidth)+"px"
},


close:function(t){
	try{
		var closewinbol=t.onclose()
	}
	catch(err){
		var closewinbol=true
 }
	finally{
		if (typeof closewinbol=="undefined"){
			alert("An error has occured somwhere inside your \"onclose\" event handler")
			var closewinbol=true
		}
	}
	if (closewinbol){
		if (t.state!="minimized")
			dhtmlwindow.rememberattrs(t)
		t.style.display="none"
	}
	return closewinbol
},

show:function(t){
	if (t.lastx)
		dhtmlwindow.restore(t.controls.firstChild, t)
	else
		t.style.display="block"
	t.state="fullview"
},

ajax_connect:function(url, t){
	var page_request = false
	var bustcacheparameter=""
	if (window.XMLHttpRequest)
		page_request = new XMLHttpRequest()
	else if (window.ActiveXObject){
		try {
		page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
			page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else
		return false
	page_request.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(page_request, t)}
	if (this.ajaxbustcache)
		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', url+bustcacheparameter, true)
	page_request.send(null)
},

ajax_loadpage:function(page_request, t){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
	t.contentarea.innerHTML=page_request.responseText
	}
},


stop:function(){
	dhtmlwindow.etarget=null
	document.onmousemove=null
	document.onmouseup=null
},

addEvent:function(target, functionref, tasktype){
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
},

cleanup:function(){
	for (var i=0; i<dhtmlwindow.tobjects.length; i++){
		dhtmlwindow.tobjects[i].handle._parent=dhtmlwindow.tobjects[i].resizearea._parent=dhtmlwindow.tobjects[i].controls._parent=null
	}
	window.onload=null
}

}

document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>') //container that holds all dhtml window divs on page
window.onunload=dhtmlwindow.cleanup

// sIFR (FLash Fonts) added 07/11/2007 by GY from Webexpectations.com
/*	sIFR 2.0.2
	Copyright 2004 - 2006 Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben

	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.charAt(b.indexOf(".")-1))>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.charAt(aj.indexOf(".")-1))}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||(al.body==null||al.getElementsByTagName("body").length==0))return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,"?",Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();

if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac){
  sIFR.setup();

};

function attachPopup(el) {
  el.onclick = function() {
    if (el.className.indexOf('size') != -1) {
      dimensions = (((el.className.replace('popup','')).replace('size','')).replace(' ','')).split('x');
      elwidth = dimensions[0];
      elheight = dimensions[1];
	} else {
      elwidth = '640';
      elheight = '480';
	}
    popup = window.open(el.href,'popup','width='+elwidth+',height='+elheight+',resizable=yes,scrollbars=yes,toolbar=no,status=no,directories=no');
	if (window.focus) popup.focus();
	return false;
  }
}
function attachPopups() {
  if (document.getElementsByTagName) {
    var links = document.getElementsByTagName('a');
    for (var i=0; i<links.length; i++) {
      if (links[i].className.indexOf('popup') != -1) {
        attachPopup(links[i]);
      }
    }
  }
}

function init() {
  attachPopups();  
}
