

		//DEPENDS ON getDimensions, document.getElementById(), $document.getElementById(), ClassFX, AjaxFX

		//notes: add expiry and toggle status bar option - also maybe an external stylesheet?
		//add container for ajax request...?
		
		
		function interstate(liProgenetorID, liWidth, liHeight, luAjaxRequestOrElement, llRefreshContents, lsTitleBarID ) { //simple interstitial implementation
			if(liProgenetorID>=0) { //check if this is valid index and return focus to existent interstitial
				if(!isNaN(liProgenetorID)) {
					liIndex=liProgenetorID; //reload contents?
					if(!Planetary[liIndex]) {
					} else {
						if(Planetary[liIndex].interGalactic.parentNode) {
							for (a=0;a<Planetary.length;a++) {
								Planetary[a].interGalactic.style.zIndex-=10;
							}
							Planetary[liIndex].interGalactic.style.zIndex+=10; //Planetary[liIndex].centerPosition();
							if(llRefreshContents) {
								Planetary[liIndex].refresh(luAjaxRequestOrElement);
							}
							Planetary[liIndex].show();
							Planetary[liIndex].centerPosition(); //styles messing with positioning a bit
							return liIndex;
						}
					}
				}
			} //

			var loContentElement;
			
			if(!document.getElementById(luAjaxRequestOrElement)) { //accepts a url for ajax request...
				if(luAjaxRequestOrElement.indexOf('/')>-1) { //url = XMLHTTPRequest
					loContentElement = document.createElement('div');
					var oLoadingAnimation = new loadingAnimation('large',false);
					loContentElement.appendChild(oLoadingAnimation.render());
					ajaxEvent(luAjaxRequestOrElement, loContentElement, false, true ); //load contents
					oLoadingAnimation.destroy();
				} else { //dom element
					loContentElement = document.getElementById(luAjaxRequestOrElement); //Get XMLHTTP response || Use Existing DOM Element
					if(!loContentElement) { //load pre-rendered contents
						loContentElement = document.createElement('div');
						loContentElement.innerHTML = 'The specified content element does not exist.';		
					} else {
						ClassFX.removeClass(loContentElement,'none');
						ClassFX.removeClass(loContentElement,'hidden');
						ClassFX.addClass(loContentElement,'block');
					}
				}
			} else {
				loContentElement = document.getElementById(luAjaxRequestOrElement); //Get XMLHTTP response || Use Existing DOM Element
				if(!loContentElement) { //load pre-rendered contents
					loContentElement = document.createElement('div');
					loContentElement.innerHTML = 'The specified content element does not exist.';		
				} else {
					ClassFX.removeClass(loContentElement,'none');
					ClassFX.removeClass(loContentElement,'hidden');
					ClassFX.addClass(loContentElement,'block');
				}
			}
			
			var iOffset = Planetary.length; //offset for stacked windows
			iOffset = iOffset*10;
			
			//new interstitial window added to global planetary collection
			Planetary.push(new interstitial(liWidth, liHeight, iOffset, iOffset, lsTitleBarID)); //create in global scope
			
			liIndex=Planetary.length-1;
			oParentNode = document.getElementById('body');
			oParentNode = document.getElementById('view'); //haxxing
			if(!typeof(oParentNode.appendChild)=="function"){ //hmmm @todo make a routine to get a valid top level parent node
				if (!oParentNode) {
					alert('unable to access the correct dom element for object placement, sorry.');
					return;
				}
			}
			oParentNode.appendChild(Planetary[liIndex].render()); //add interstitial
			
			Planetary[liIndex].interGalactic.appendChild(loContentElement); //loContentElement = either pre-rendered content or loading placeholder..
			if(loContentElement.id=='') {
				loContentElement.setAttribute('id', Planetary[liIndex].interGalactic.id + '_catcher');
			};
							
			EventListener.addEvent( window, 'resize',
				function( ) {
					for (a=0;a<Planetary.length;a++) {
						Planetary[a].centerPosition();
					}
				}
			); //
			Planetary[liIndex].centerPosition();
			Planetary[liIndex].show();

			return liIndex;
		}
		//*****************************************

		//INTERSTITIAL WINDOW
		//*****************************************
		function interstitial(liWidth, liHeight, iXOffset, iYOffset, sTitle) {
			
			var lsObjectID = 'planetary' + RID();
			this.interGalactic = document.createElement('div');
			this.interGalactic.setAttribute('id',lsObjectID);
			this.interGalactic.setAttribute('class',"intercontent");
			this.interGalactic.style.width=liWidth + 'px';
			this.interGalactic.style.height=liHeight + 'px';
			this.XOffset = iXOffset||0;
			this.YOffset = iYOffset||0;
			
			ClassFX.addClass(this.interGalactic,'interstitial'); //ClassFX.addClass(this.interGalactic,'default'); //hah this works, makes DD behaviour apply.
			//ClassFX.addClass(this.interGalactic,'scroll');

			//close link
			this.toolbar = document.createElement('div');
			ClassFX.addClass(this.toolbar,'interstitial_toolbar');
			
			this.closeButton = document.createElement('a');
			this.closeButton.innerHTML = '<img src="/box/icons/crystal/16x16/actions/cancel.png" />'; 
			ClassFX.addClass(this.closeButton,'close_interstitial');
			this.closeButton.setAttribute('href','javascript://');
			this.closeButton.onclick = function () { //add refresh toggle
				ClassFX.removeClass(this.parentNode.parentNode,'visible'); //this.parentNode.parentNode.removeChild(this.parentNode);
				ClassFX.addClass(this.parentNode.parentNode,'hidden'); //this.parentNode.parentNode.removeChild(this.parentNode);
				ClassFX.addClass(this.parentNode.parentNode,'none'); //this.parentNode.parentNode.removeChild(this.parentNode);
			};
			this.toolbar.appendChild(this.closeButton);

			//temp
			titlebar = document.getElementById(sTitle);
			if(titlebar) {
				titlebar = this.toolbar.appendChild(titlebar); //usurp reference
				ClassFX.removeClass(titlebar,'none'); //this.parentNode.parentNode.removeChild(this.parentNode);
			}
			//temp

			this.interGalactic.appendChild(this.toolbar);

			Dimensions.refresh(); //get document settings

			this.centerPosition(); //set position (need to add fixed/cached coordinates and offsets for existing windows here.)

		} interstitial.prototype = {
			render:function () {
				return this.interGalactic;
			},
			refresh:function (uAjaxRequestOrElement) { //Refresh XMLHTTP contents only for now
				var loContentElement; 
				if(luAjaxRequestOrElement.indexOf('/')>-1) { //url = XMLHTTPRequest
					loContentElement = document.getElementById(this.interGalactic.id+'_catcher');
					if(loContentElement) {
						var oLoadingAnimation = new loadingAnimation('large',false);
						loContentElement.appendChild(oLoadingAnimation.render());
						ajaxEvent(luAjaxRequestOrElement,loContentElement,true,false); //load contents (append + asynchronous mode)
						oLoadingAnimation.destroy();
					}
				}//
			},
			show:function () {
				ClassFX.removeClass(this.interGalactic,'none');
				ClassFX.removeClass(this.interGalactic,'hidden');
				ClassFX.addClass(this.interGalactic,'visible');
			},
			hide:function () { //build ClassSwitch();...
				ClassFX.removeClass(this.interGalactic,'visible');
				ClassFX.addClass(this.interGalactic,'hidden');
				ClassFX.addClass(this.interGalactic,'none'); //backwards compatibility
			},
			centerPosition:function () {
				Dimensions.refresh();
				this.iObjWidth = this.interGalactic.offsetWidth;
				this.iObjHeight = this.interGalactic.offsetHeight;
				this.iTop = (Dimensions.iDocHeight>this.iObjHeight) ? (Dimensions.iScrollTop+Dimensions.iDocHeight/2-this.iObjHeight/2+'px') : (Dimensions.iScrollTop+5+'px'); //Position interstitial box
				this.interGalactic.style.zIndex = 24000;
				this.interGalactic.style.left = this.XOffset + (Dimensions.iDocWidth/2-this.iObjWidth/2)+"px"; //Position interstitial box
				this.interGalactic.style.top = this.YOffset + Math.floor(parseInt(this.iTop))+"px";
			}
		}
		//*****************************************

		 //recycleable loading animated gif
		function loadingAnimation(sType,lsSource) {
			lsSystemPath = '/box/system/'; //defaults
			lsSystemPath += (sType=='large')?('loading.gif'):('loading-small.gif');
			lsSource=(lsSource||lsSystemPath);
			this.img=document.createElement('img');
			this.img.setAttribute('id','loading-' + RID() ); //attach random id
			ClassFX.addClass(this.img,'hidden');
			this.img.src=lsSource;
		} loadingAnimation.prototype = {
			render:function () {
				ClassFX.removeClass(this.img,'hidden');
				return this.img;
			},
			show:function () {
				this.img.style.visibility='visible';
			},
			hide:function () {
				this.img.style.visibility='hidden';
			},
			destroy:function () {
				if(this.img.parentNode) {
					return this.img.parentNode.removeChild(this.img);
				} else {
					this.img = null;
				}
			}
		}
		//*****************************************

 		//transparent grey overlay
		function cliche(lsID, liWidth, liHeight, lsClass) {
			this.element = document.createElement('DIV');
			this.element.id = lsID;
			this.element.width = liWidth+'px';
			this.element.height = liHeight+'px';
			this.element.className = lsClass;
			this.width = liWidth;
			this.height = liHeight;
		} cliche:prototype = {
			resize:function (liWidth, liHeight) {
				this.element.width = liWidth+'px';
				this.element.height = liHeight+'px';
			}
		}
		//*****************************************





		//DEPRECATED
 		function theLove(lsURI) { // some defaults for the overlay iframe container. +mlp.
			var loTheAggravatingIframe = new iframe('_IFRAME_Container',lsURI,'740','490','iFramedRogerRabbit'+RID(),false);
			loTheAggravatingIframe = loTheAggravatingIframe.iframe;
			return loTheAggravatingIframe;
		}
		
		//*****************************************
		//creates generic iFrame object
		function iframe(lsID, lsURI, liWidth, liHeight, lsClass,llScroll) {
			this.iframe = document.createElement('IFRAME');
			this.iframe.id=lsID;
			this.iframe.src=lsURI;
			this.iframe.frameborder='0';
			this.iframe.scrolling=(llScroll)?(''):('no');
			this.iframe.width=liWidth+'px';
			this.iframe.height=liHeight+'px';
			this.iframe.className=lsClass;
			this.width=liWidth;
			this.height=liHeight;
		} iframe:prototype = {
			resize:function (liWidth, liHeight) {
				this.iframe.width=liWidth+'px';
				this.iframe.height=liHeight+'px';
			},
			navigate:function (liWidth, liHeight) {
				this.iframe.src=lsURI;
			}
		}
		//*****************************************
		//interstitial group

		//INTERSTITIAL GROUP LIBRARY
		//*****************************************
