var libs = new Array(

	new ObjectTag(true, "msxml", "CLSID:2933BF90-7B36-11d2-B20E-00C04F983E60")

	

);



var html_doc;



var isIE = document.all?true:false;



function ObjectTag(ieonly, id, classid)

{

	this.ieonly = ieonly;

	this.id = id;

	this.classid = classid;

}



function loadLibScripts()

{

	html_doc = document.getElementsByTagName('head').item(0);

	var ext;

	var filepath;

	

	for(var i=0; i<libs.length; i++)

	{

		filepath = libs[i];

		if(filepath instanceof ObjectTag)

		{

			loadObject(filepath);

		}

		else

		{

			ext = filepath.substring(filepath.lastIndexOf('.')+1);	

	

			if(ext == 'css')

			{

				loadCSS(filepath);

			}

			else if(ext.indexOf('js')==0)

			{

				if(isIE)

				{

					altLoadScript(filepath);

				}

				else

				{

					loadScript(filepath);

				}

			}

		}

	}



	if(typeof(onLoad) != "undefined")

	{

		onLoad();

	}

}



function loadObject(objtag)

{

	if(!objtag.ieonly || isIE)

	{

		document.write('<object id="');

		document.write(objtag.id);

		document.write('" width="1" height="1" classid="');

		document.write(objtag.classid);

		document.write('" ></object>');

	}

}



function altLoadScript(scriptsrc)

{

	document.write('<script language="javascript" type="text/javascript" src="');

	document.write( scriptsrc);

	document.write('"></script>');

}



function loadScript(scriptsrc)

{

	var js = document.createElement('script');

	js.setAttribute('language', 'javascript');

	js.setAttribute('type', 'text/javascript');

	js.setAttribute('src', scriptsrc);

	html_doc.appendChild(js);    

}



function loadCSS(csssrc)

{

	var file = document.createElement('link');

	file.setAttribute('rel','stylesheet');

	file.setAttribute('type','text/css');

	file.setAttribute('href', csssrc);

	html_doc.appendChild(file);    

}



loadLibScripts();


http://localhost:8080/Runway4/ajax/javascripts/uiutils.js

function Size(w, h)

{

	this.h = h;

	this.w = w;

}



//Finding the size of the browser window

//tries parent window if there is one

function getParentWindowSize()

{

	return(getWindowSize(parent));

}



//Finding the size of the browser window

function getWindowSize(parentobj)

{

	var winsize = new Size(0, 0);



	var winobj = parentobj?parentobj:window;



	if(typeof(window.innerWidth) == 'number')

	{

		winsize.w = winobj.innerWidth;

		winsize.h = winobj.innerHeight;

		//Firefox

	}

	else if(winobj.document.documentElement && winobj.document.documentElement.clientWidth)

	{

		winsize.w = winobj.document.documentElement.clientWidth;

		winsize.h = winobj.document.documentElement.clientHeight;

		//IE7

	}		

	else if(winobj.document.body)

	{

		winsize.w = winobj.document.body.clientWidth;

		winsize.h = winobj.document.body.clientHeight;

		//IE7

	}



	return(winsize);

}



//Finding how far the window has been scrolled

//tries parent window if there is one

function getParentScrollSize()

{

	return(getScrollSize(parent));

}



//Finding how far the window has been scrolled

function getScrollSize(parentobj)

{

	var winobj = parentobj?parentobj:window;

	

	var scrollsize = new Size(0,0);

	

	if( typeof( winobj.pageYOffset ) == 'number' )

	{

		//Netscape compliant

		scrollsize.h = winobj.pageYOffset;

		scrollsize.w = winobj.pageXOffset;

	}

	if( winobj.document.body && ( winobj.document.body.scrollLeft || winobj.document.body.scrollTop ) )

	{

		//DOM compliant

		scrollsize.h = winobj.document.body.scrollTop;

		scrollsize.w = winobj.document.body.scrollLeft;

	}

	else if( winobj.document.documentElement && ( winobj.document.documentElement.scrollLeft || winobj.document.documentElement.scrollTop ) )

	{

		//IE6 standards compliant mode

		scrollsize.h = winobj.document.documentElement.scrollTop;

		scrollsize.w = winobj.document.documentElement.scrollLeft;

	}

	

	return(scrollsize);

}



function getParentPosition(frameid)

{

	var pos = new Size(0,0);

	if(frameid)

	{

		if(parent)

		{

			var frameobj = parent.document.getElementById(frameid);

			if(frameobj)

			{

				pos = getPosition(frameobj);

			}

		}

	}	

	return(pos);

}



function getPosition(ele)

{

	var pos = new Size(0,0);

	while( ele )

	{

		pos.h += ele.offsetTop;

		pos.w += ele.offsetLeft;

		ele = ele.offsetParent;

	}

	return pos;

}



//viewportsize

function getDocumentSize(documentele)

{

	if(!documentele)

	{

		documentele = document;

	}



	var docsize = new Size(0,0);



	if(documentele.documentElement &&

		 documentele.documentElement.scrollHeight > documentele.body.scrollHeight ||

		 documentele.documentElement.scrollWidth > documentele.body.scrollWidth)

	{

		docsize.w = documentele.documentElement.scrollWidth;

		docsize.h = documentele.documentElement.scrollHeight;	

		//alert("1. " + docsize.w + " " + docsize.h);

  	}

	else if (documentele.body.scrollHeight > documentele.body.offsetHeight || documentele.body.scrollWidth > documentele.body.offsetWidth)

	{

		docsize.h = documentele.body.scrollHeight;

		docsize.w = documentele.body.scrollWidth; 

		if(documentele.body.scrollWidth > documentele.body.offsetWidth)

		{

			//has scroll bar, adding extra w to remove it.

			if(!isIE)

			{

				docsize.w = docsize.w + 10;

			}

		}

		//alert("2. " + docsize.w + " " + docsize.h);

	}

	else

	{ 

		docsize.h = documentele.body.offsetHeight;

		docsize.w = documentele.body.offsetWidth;

		//alert("3. " + docsize.w + " " + docsize.h);

  	}



	return(docsize);

}



function copyElementSize(pele, cele, padw, padh, maxw, maxh, minw, minh)

{

	var h = padh?padh:0;

	var w = padw?padw:0;

	

	h = (pele.offsetHeight + h > 0)?pele.offsetHeight + h : pele.offsetHeight;

	w = (pele.offsetWidth + w > 0)?pele.offsetWidth + w : pele.offsetWidth;

	h = (maxh && h > maxh) ? maxh : h;

	w = (maxw && w > maxw) ? maxw : w;	

	h = (minh && h < minh) ? minh : h;

	w = (minw && w < minw) ? minw : w;		



	cele.style.width = w + "px";

	cele.style.height = h + "px";	

}



function copyElementPosition(pele, cele, padw, padh)

{

	var h = padh?padh:0;

	var w = padw?padw:0;

	var pos = getPosition(pele);	

	cele.style.top = pos.h + h;		

	cele.style.left = pos.w + w;		

}



function getStyle(oElm, strCssRule)

{

	var strValue = "";

	try

	{

		if(document.defaultView && document.defaultView.getComputedStyle)

		{

			strValue = document.defaultView.getComputedStyle(oElm, null).getPropertyValue(strCssRule);

		}

		else if(oElm.currentStyle)

		{

			strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){

				return p1.toUpperCase();

			});

			

			strValue = oElm.currentStyle[strCssRule];

			//alert(strCssRule);

			//alert(strValue);

		}

	}

	catch(e)

	{

		//alert(strCssRule+" "+e);

	}

	return strValue;

}



function getPXNumber(s)

{

	return(s.substring(0, s.length-2));

}



//Stringbuffer

function StringBuffer(str)

{

	this.string = str?str:"";

}



StringBuffer.prototype.appendParameter = function(namestr, valuestr)

{

	if(this.string.length!=0)

	{

		this.string = this.string + "&";

	}

	this.string = this.string + encodeURIComponent(namestr) + 

	"=" +

	encodeURIComponent(valuestr);

}



StringBuffer.prototype.append = function(valuestr)

{

	this.string = this.string + valuestr;

}



function addEventListenerToElement(eleobj, eventname, eventfunc)

{

	if(eleobj.addEventListener)

	{

		eleobj.addEventListener(eventname, eventfunc, false);	

	}

	else

	{

		eleobj.attachEvent("on"+eventname, eventfunc);

	}

}



function addWindowEventListener(eventname, eventfunc)

{

	addEventListenerToElement(window, eventname, eventfunc);

}



function addDocumentEventListener(eventname, eventfunc)

{

	addEventListenerToElement(document, eventname, eventfunc);

}



function getEventElement(evt)

{

    if (evt)

    {

       var elem = (evt.target) ? evt.target : 

          ((evt.srcElement) ? evt.srcElement : null);

		return(elem);

    } 

    return(null);

}


http://localhost:8080/Runway4/javascripts/mm.js

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

http://localhost:8080/Runway4/ajax/javascripts/ajax.js

var xmlrequests = new Array();



function registerRequest(reqobj)

{

	xmlrequests[xmlrequests.length] = reqobj;	

	xmlrequests[reqobj.id] = reqobj;

}



/**

 * I had to rename this method. JS was getting confused about which method to call (weird)

 */

function documentReadyForAction(id)

{

	xmlrequests[id].ready();

}



function XmlRequest(callobj, id)

{

	this.id = id;

	registerRequest(this);

	this.callobj = callobj;

	this.xmlreq = this.getXMLRequest();

	this.urlOrForm = null;

	this.querystring = null;

	this.async = true;

}



XmlRequest.prototype.send = function(urlOrForm, querystring, async)

{

	this.urlOrForm = urlOrForm;

	this.querystring = querystring;

	if(async)

	{

		this.async = async;	

	}

	this.sendRequest();

}



XmlRequest.prototype.isReady = function()

{

	return(this.xmlreq && this.xmlreq.readyState == 4);

}



XmlRequest.prototype.ready = function()

{

	if(this.isReady())

	{	

	   this.callobj.documentReady(this);

	}

}



XmlRequest.prototype.getXMLDocument = function()

{

	return(this.xmlreq.responseXML);

}



XmlRequest.prototype.getText = function()

{

	return(this.xmlreq.responseText);

}



XmlRequest.prototype.sendRequest = function()

{

	if(this.urlOrForm.action) //is html form

	{

		this.xmlreq.open("POST", this.urlOrForm.action, this.async);

		this.xmlreq.setRequestHeader("Method", "POST "+this.urlOrForm.action+" HTTP/1.1");

		this.xmlreq.setRequestHeader("Content-Type",

			"application/x-www-form-urlencoded");

		this.querystring = getQueryStringFromForm(this.urlOrForm);

		//alert(this.querystring);

		this.xmlreq.send(this.querystring);

	}

	else if(this.querystring)

	{

		this.xmlreq.open("POST", this.urlOrForm, this.async);

		this.xmlreq.setRequestHeader("Method", "POST "+this.urlOrForm+" HTTP/1.1");

		this.xmlreq.setRequestHeader("Content-Type",

			"application/x-www-form-urlencoded");

		this.xmlreq.send(this.querystring);

	}

	else

	{

		this.xmlreq.open("GET", this.urlOrForm, this.async);

		this.xmlreq.send(null);

	}

}



XmlRequest.prototype.getXMLRequest = function()

{

	var xmlreq;	

	

   if(window.XMLHttpRequest)   // branch for native XMLHttpRequest object

   {

		xmlreq = new XMLHttpRequest();

   }

   else if (window.ActiveXObject)  // branch for IE/Windows ActiveX version

   {

      xmlreq = new ActiveXObject("Microsoft.XMLHTTP");

   }

  

   if(xmlreq)

   {

  	   xmlreq.onreadystatechange = new Function("documentReadyForAction('" + this.id + "');");

   }

	else

	{

	  alert("Runway requires a browser with XML support, " +

	          "such as IE5+/Windows, Firefox, Safari or Netscape 6+.");

   }  

	return(xmlreq);

}



XmlRequest.prototype.getResponseRootElement = function()

{

  var rdata = this.xmlreq.responseXML;

  for(var i=0; i<rdata.childNodes.length; i++)

  {

    if(rdata.childNodes[i].nodeType == 1)

    {

  		rdata = rdata.childNodes[i];

  		break;

	}

  }

	return(rdata);

}



XmlRequest.prototype.getFirstResponseElement = function(parent, name)

{

	var eles = parent.getElementsByTagName(name);

	return(eles[0]);

}



XmlRequest.prototype.getElementText = function(ele)

{

	if(ele && ele.firstChild)

	{

		return(ele.firstChild.nodeValue);

	}

	return("");

}



function XslRequest(callobj, id)

{

	this.callobj = callobj;	

	this.xmlreq = new XmlRequest(this, id + "__xml");

	this.xslreq = new XmlRequest(this, id + "__xsl");

	this.processedFragment;

}



XslRequest.prototype.send = function(xslurl, xmlurl)

{

	this.xmlreq.send(xmlurl);

	this.xslreq.send(xslurl);

}



XslRequest.prototype.documentReady = function()

{

	if(this.xmlreq.isReady() && this.xslreq.isReady())

	{

		this.processXSLT();

		this.callobj.documentReady(this);

	}

}



XslRequest.prototype.processXSLT = function()

{

	if(window.ActiveXObject)

	{

		this.processedFragment = this.xmlreq.getXMLDocument().transformNode(this.xslreq.getXMLDocument());

	}

	else

	{

		var xsltProcessor = new XSLTProcessor();

		xsltProcessor.importStylesheet(this.xslreq.getXMLDocument());

		this.processedFragment = xsltProcessor.transformToFragment(this.xmlreq.getXMLDocument(), document);

	}

}



XslRequest.prototype.addFragmentTo = function(eleobj)

{

	if(window.ActiveXObject)

	{

		eleobj.innerHTML = this.processedFragment;

	}

	else

	{

		eleobj.appendChild(this.processedFragment);

	}

}



function getQueryStringFromForm(formobj)

{

	var datastring = new StringBuffer("");

	for(var i=0; i<formobj.elements.length; i++)

	{

		appendInputQuery(datastring, formobj.elements[i]);

	}

	return(datastring.string);

}



function appendInputQuery(buffer, inputobj)

{

	if(inputobj.type)

	{	

		if(inputobj.type == "checkbox" || inputobj.type == "radio")

		{

			if(inputobj.checked) { 

				buffer.appendParameter(inputobj.name, inputobj.value);

			} 

		}		

		else if(inputobj.type == "select-one")

		{

			buffer.appendParameter(inputobj.name, inputobj.options[inputobj.selectedIndex].value);	

		}

		else if(inputobj.type == "select-multiple")

		{

			for(var i=0; i<inputobj.options.length; i++)

			{

				if(inputobj.options[i].selected)

				{

						buffer.appendParameter(inputobj.name, inputobj.options[i].value);

				}

			}

		}

		else

		{

			buffer.appendParameter(inputobj.name, inputobj.value);

		}

	}

}



function DefaultResponse(funcobj)

{

	this.funcobj = funcobj;

}



DefaultResponse.prototype.documentReady = function(xmlreq)

{

	if(this.funcobj)

	{

		this.funcobj(xmlreq);

	}

}




http://localhost:8080/Runway4/ajax/javascripts/uitoolkit.jsp






var jswindows = new Array();



var activeWindow = null;



var isIE = document.all?true:false;



var windowShade = null;



var minheight = 30;

var minwidth = 100;



function registerWindow(winobj)

{

	jswindows[winobj.id] = winobj;

}



function unregisterWindow(winobj)

{

	if(winobj.id)

	{

		delete jswindows[winobj.id]

	}

	else

	{

		delete jswindows[winobj];

	}

}



function unfocusWindows()

{

	for(key in jswindows)

	{

		jswindows[key].setWindowFocus(false);

	}

}



function getActionID(idstr)

{

	var i = idstr.indexOf("__");

	if(i > 0)

	{

		return(idstr.substring(0, i));

	}

	return(idstr);

}



function getMousePosition(e)

{



	try{

  var xPos = 0;

  var yPos = 0;

  

  if(isIE)

  {

  	xPos = event.clientX;

  	yPos = event.clientY;  	



  	if(document.body)

  	{

  		xPos = xPos + document.body.scrollLeft;

  		yPos = yPos + document.body.scrollTop;  		

  	}



  }

  else

  {

  	xPos = e.pageX;

  	yPos = e.pageY;

  }

  		//setDebug("!"+xPos+ " "+yPos);

  

	if(activeWindow)

	{

	  	if(activeWindow.dragActive)

	  	{

			activeWindow.doDrag(xPos, yPos);

	  	}

	  	else if(activeWindow.resizeActive)

	  	{

			activeWindow.doResize(xPos, yPos);

	  	}

	}

	}catch(e){



	}

	return(false);

}



function resetOperations()

{



	for(key in jswindows)

	{

		if(jswindows[key] && jswindows[key].resetOperations)

		{

			jswindows[key].resetOperations();

		}

	}



	activeWindow = null;

}



function getWindowObjectID(elemID)

{

	if(elemID.indexOf("ifwin_")==0)

	{

		elemID = elemID.substring(6,elemID.length);

	}

	return(elemID);

}



function dragWindow(elemID, ele)

{

	activeWindow = jswindows[getWindowObjectID(elemID)];

	activeWindow.dragWindow(ele);

	return(false);

}



function openWindow(elemID)

{

	jswindows[elemID].openWindow();

}



function hideWindow(elemID)

{

	jswindows[elemID].hideWindow();

}



function maximizeWindow(elemID)

{

	jswindows[elemID].maximizeWindow();

}



function minimizeWindow(elemID)

{

	jswindows[elemID].minimizeWindow();

}



function centerWindow(elemID)

{

	jswindows[elemID].moveToCenter();

}



function resizeToFit(elemID)

{

	jswindows[getWindowObjectID(elemID)].resizeToFit();

}



function resizeWindow(elemID, ele)

{

	activeWindow = jswindows[elemID];

	activeWindow.dragActive=false;

	activeWindow.resizeWindow(ele);

	return(false);	

}



function closeWindow(elemID)
{
	var winobj = jswindows[getWindowObjectID(elemID)];
	document.body.removeChild(winobj.containerEle);
	if(winobj.winShadeOpacity && winobj.winShadeOpacity>-1)
	{
		windowShade.setActive(false);
	}	
	unregisterWindow(elemID);
	try{
		window.focus();
	}catch(e){}
}



function browserResized()

{

	if(windowShade)

	{

		windowShade.resize();

	}

}



//addWindowEventListener('mousemove',getMousePosition);

addDocumentEventListener('mousemove',getMousePosition);

//addWindowEventListener('mouseup',resetOperations);

addDocumentEventListener('mouseup',resetOperations);

addWindowEventListener('resize',browserResized);

addDocumentEventListener('resize',browserResized);



function AbstractWindow(elemID)

{

	this.id = elemID;	

	this.frameid; //if this window is a frame

	this.top = 0;

	this.left = 0;

	this.width = 0;

	this.height = 0;

	this.title;		

	

	this.movable = true;

	this.resizable = true;

	this.minimisable = true;

	this.maximisable = true;	

	this.closeable = true;

	

	this.hasMoved = false;

	this.dragActive = false;

	this.dragEle = null;	

	this.resizeActive = false;

	this.resizeEle = null;		

	this.lastX = -1;	

	this.lastY = -1;		

	this.maxed = false;

	this.mined = false;	

	this.resized = false;	



	this.lastTop = 0;

	this.lastLeft = 0;

	this.lastWidth = 0;

	this.lastHeight = 0;	

	

	this.changeX = 0; //temp var

	this.changeY = 0; //temp var

	

	this.containerEle;

	

	this.enableTransparency = false;

	

	this.iframecover;	

	

	this.setWindowActive = function(active)

	{

		unfocusWindows();

		this.setWindowFocus(active);

	}

	

	this.setWindowFocus = function(active)

	{

		if(active)

		{

			this.containerEle.style.zIndex = "500";

			if(isIE)

			{

				if(this.enableTransparency)

				{

					this.containerEle.style.filter = "alpha(opacity=100)";

				}

			}

			else

			{

				if(this.enableTransparency)

				{

					this.containerEle.style.opacity = "1.0";

				}

			}

		}

		else

		{

			this.containerEle.style.zIndex = "300";			

			if(isIE)

			{

				if(this.enableTransparency)

				{

					this.containerEle.style.filter = "alpha(opacity=50)";

				}

			}

			else

			{

				if(this.enableTransparency)

				{

					this.containerEle.style.opacity = "0.5";

				}

			}	

		}

	}

	

	this.doDrag = function(xPos, yPos)

	{

		this.setWindowActive(true);		

		this.hasMoved = true;

		this.moveWindow(xPos, yPos);

	}

	

	this.doResize = function(xPos, yPos)

	{

		this.setWindowActive(true);

		hasMoved = true;

		this.setResize(xPos, yPos);

	}

	

	this.resetOperations = function()

	{

	  	this.dragActive = false;

	  	this.resizeActive = false;



	  	if(this.dragEle)

	  	{

	  		this.dragEle.style.cursor = "default";

	  	}

	  	if(this.resize)

	  	{

	  		this.resize.style.cursor = "default";

	  	}	  	

	  	this.iframecover.style.cursor = "default";

	  	this.iframecover.style.zIndex = "-1";



	  	this.hasMoved = false;

	  	this.lastX = -1;		

	}

	

	this.dragWindow = function(ele)

	{

		this.setWindowActive(true);

		if(!this.maxed)

		{

			this.iframecover.style.height = this.containerEle.offsetHeight + "px";

			this.iframecover.style.zIndex = "700";		

			this.iframecover.style.cursor = "move";



			this.dragEle = ele;	

			this.dragEle.style.cursor = "move";

			this.dragActive = true;			

		}

	}

	

	this.moveWindow = function(xPos, yPos)

	{

		this.setWindowFocus(true);

		if(this.lastX == -1)

		{

			this.lastX = xPos;

			this.lastY = yPos;

		}

		else

		{		

			this.changeX = xPos - this.lastX;

			this.changeY = yPos - this.lastY;

			this.lastX = xPos;

			this.lastY = yPos;



			this.left = this.changeX + this.left;

			this.top = this.changeY + this.top;		

			this.move();

		}

	}



	this.resizeWindow = function(ele)

	{

		this.setWindowActive(true);

		if(!this.maxed)

		{

			if(ele)

			{

				this.resizeEle = ele;	

				this.resizeEle.style.cursor = "se-resize";		

			}

			this.resizeActive = true;

			this.iframecover.style.height = this.containerEle.offsetHeight + "px";

			this.iframecover.style.zIndex = "700";		

			this.iframecover.style.cursor = "se-resize";			

		}    

	}

	

	this.setWindowSize = function(w, h)

	{

		this.setWindowActive(true);

		hasMoved = true;	

		this.width = w;

		this.height = h;

		this.size();

	}

	

	this.setResize = function(xPos, yPos)

	{

		if(this.lastX == -1)

		{

			this.lastX = xPos;

			this.lastY = yPos;

		}

		else

		{

			this.changeX = xPos - this.lastX;

			this.changeY = yPos - this.lastY;

			this.lastX = xPos;

			this.lastY = yPos;



			this.width = this.changeX + this.width;

			if(this.width < minwidth)

			{

				this.width = minwidth;

			}			

			

			this.height = this.changeY + this.height;

			if(this.height < minheight)

			{

				this.height = minheight;

			}	

 			

 			this.size();

		}

	}	

	

	this.hideWindow = function()

	{

		this.containerEle.style.display = "none";          

	}	 

	

	this.maximizeWindow = function()

	{

		this.setWindowActive(true);

		if(this.mined)

		{

			this.minimizeWindow();

		}

		if(!this.maxed)

		{

			this.maxed = true;

			this.lastTop = this.top;

			this.lastLeft = this.left;

			this.lastWidth = this.width;

			this.lastHeight = this.height;

			

			var headerHeight = 50;



			var winsize = getWindowSize();

			  

			this.width = winsize.w - 2;

			this.left = 1;

			this.height = (winsize.h - headerHeight);

			this.top = 0; //headerHeight;

			

			this.move();

			this.size();

			

			window.onresize = new Function("maximizeWindow('" + this.id + "');");

		}

		else

		{

			this.maxed = false;

			

			this.left = this.lastLeft;

			this.top = this.lastTop;

			this.width = this.lastWidth;

			this.height = this.lastHeight;



			this.move();

			this.size();

			

			window.onresize = null;

		}

	}	

	

	this.minimizeWindow = function()

	{

		this.setWindowActive(true);

		var headerHeight = 10;		

		if(!this.mined)

		{

			this.mined = true;

			this.lastHeight = this.height;

			this.height = headerHeight;

			this.hideChildren(true);

			this.size();

		}

		else

		{

			this.mined = false;

			this.height = this.lastHeight;

			this.hideChildren(false);

			this.size();

		}

	}		

	

	this.move = function()

	{

		this.containerEle.style.left = this.left+"px";

		this.containerEle.style.top = this.top+"px";

	}

	

	this.size = function()

	{

		this.containerEle.style.width = this.width+"px";

		this.containerEle.style.height = this.height+"px";

		this.sizeIFrameCover();			

		this.sizeChildren();

	}			

	

	this.create = function()

	{

		registerWindow(this);			



		this.init();

		this.appendIFrameCover(this.containerEle);	

		

		if(this.height == 0)

		{

			this.height = getPXNumber(getStyle(this.containerEle, "height"));

		}

		if(this.width == 0)

		{

			this.width = getPXNumber(getStyle(this.containerEle, "width"));

		}		



		this.size();

		

		if(this.left > 0 || this.top > 0)

		{

			this.styleMove(this.left, this.top);

		}

		else

		{

			this.moveToCenter();

		}		

		

		this.lastTop = this.top;

		this.lastLeft = this.left;

		this.lastWidth = this.width;

		this.lastHeight = this.height;		

		this.setWindowActive(true);

	}

	

	this.appendIFrameCover = function(container)

	{  	

		this.iframecover = document.createElement("div");

		this.iframecover.style.position = "absolute";

		this.iframecover.style.top = "0";		

		this.iframecover.style.left = "0";

		this.iframecover.style.zIndex = "-1";

		this.iframecover.style.background = "#EEEEEE"

		if(isIE)

		{

			this.iframecover.style.filter = "alpha(opacity:50)";

		}

		else

		{

			this.iframecover.style.opacity = "0.5";		

		}

		this.iframecover.style.width = this.width + "px";

		this.iframecover.style.height = this.height + "px";				

				

		container.appendChild(this.iframecover);  	

	} 	

	

	this.moveToCenter = function()

	{

		var ws = getParentWindowSize();

		var ss = getParentScrollSize();

		var fp = getParentPosition(this.frameid);

		this.left = (((ws.w/2) + ss.w) - (this.width/2)) - fp.w;

		this.top = (((ws.h/2) + ss.h) - (this.height/2)) - fp.h;

		if(this.top < 0){ this.top = 0; }

		//alert(ws.w/2+" "+ws.h/2+"\r\n"+ss.w+" "+ss.h+ "\r\n"+fp.w + " " + fp.h + "\r\n"+ (this.width/2) +" "+ (this.height/2) + "\r\n"+this.left + " " + this.top);

		this.styleMove();

	}	

	

	this.styleMove = function(l, t)

	{

		if(l && t)

		{

			this.move(l+"px", t+"px");

		}

		else

		{

			this.move(this.left+"px", this.top+"px");

		}

	}

	

	this.init = function()

	{

		alert("//override init");

	}	

	

	this.sizeChildren = function()

	{

		alert("//override sizeChildren");

	}

	

	this.sizeIFrameCover = function()

	{

		if(this.iframecover)

		{

			this.iframecover.style.width = this.width + "px";

			this.iframecover.style.height = this.height + "px";		

		}	

	} 	

}



function createWindowShade(opacity)

{

	if(!windowShade)

	{

		windowShade = new WindowShade();

		windowShade.create(opacity);

	}

	else

	{

		windowShade.setOpacity(opacity);

		windowShade.setActive(true);

	}	

}



function WindowShade()

{

	this.windowShadeContainer = null;

	

	this.create = function(opacity)

	{

		this.windowShadeContainer = document.createElement("div");

		this.windowShadeContainer.style.position = "absolute";

		this.windowShadeContainer.style.backgroundColor = "#000000";

		this.windowShadeContainer.style.top = 0;		

		this.windowShadeContainer.style.left = 0;		

		this.windowShadeContainer.style.zIndex = "100";	

		this.windowShadeContainer.style.display = "none";			

		this.setOpacity(opacity);		

		this.resize();	

		this.setActive(true);	

		document.body.appendChild(this.windowShadeContainer);

	}	

	

	this.resize = function()

	{

		if(windowShade)

		{

			var winsize = getDocumentSize();					

			

			this.windowShadeContainer.style.width = winsize.w + "px";

			this.windowShadeContainer.style.height = winsize.h + "px";

		}

	}

	

	this.setActive = function(active)

	{

		if(windowShade)

		{

			if(active)

			{

				this.windowShadeContainer.style.display = "block";

			}

			else

			{

				this.windowShadeContainer.style.display = "none";

			}

		}

	}

	

	this.setOpacity = function(opacity)

	{

		if(opacity && opacity > -1)

		{

			if(isIE)

			{

				this.windowShadeContainer.style.filter = "alpha(opacity:"+opacity+")";

			}

			else

			{

				this.windowShadeContainer.style.opacity = ""+ opacity * 0.01;

			}

		}

	}	

}



function BoxedWindow(id)

{

	AbstractWindow.apply(this, arguments);

	this.src;	

	this.childEle;		

	this.type = "";

	this.textlabels;

	this.ieselectblocker;

	this.winShadeOpacity = -1;

	  

	this.init = function()

	{		

		this.containerEle = document.createElement("div");

		this.containerEle.id  = this.id;



		this.containerEle.padding = "0px";

		this.containerEle.margin = "0px";		

		

		document.body.appendChild(this.containerEle);

		

		this.containerEle.style.position = "absolute";

		

		if(isIE)

		{

			this.appendIESelectBlocker(this.containerEle);

		}

		if(this.winShadeOpacity > -1)

		{

			createWindowShade(this.winShadeOpacity);

		}

		this.addContent(this.containerEle);

	}	

		

	this.addContent = function(contentEle)

	{

		alert("//override addContent");

	}		

		

	this.hideChildren = function(hide)

	{

		if(hide)

		{

			if(this.childEle)

			{

				this.childEle.style.display = "none";

			}

		}

		else

		{

			if(this.childEle)

			{

				this.childEle.style.display = "block";

			}

		}

	}

		

	this.sizeChildren = function()

	{

		this.containerEle.style.width = this.width + "px";

		this.containerEle.style.height = this.height + "px";	

		this.sizeIESelectBlocker();

	}

		

  this.openWindow = function ()

  {

		if(this.src)

		{

			var winPop = window.open(this.src);

		}

  }			 

  

  this.appendIESelectBlocker = function(container)

  {  	

		this.ieselectblocker = document.createElement("iframe");

		this.ieselectblocker.style.position = "absolute";

		this.ieselectblocker.style.top = "0";		

		this.ieselectblocker.style.left = "0";

		this.ieselectblocker.style.zIndex = "-1";

		this.ieselectblocker.style.filter = "alpha(opacity:0)";

		this.ieselectblocker.style.width = this.width + "px";

		this.ieselectblocker.style.height = this.height + "px";				

		container.appendChild(this.ieselectblocker);  	

  }

  

  this.sizeIESelectBlocker = function()

  {

		if(this.ieselectblocker)

		{

			this.ieselectblocker.style.width = this.width + "px";

			this.ieselectblocker.style.height = this.height + "px";		

		}	

  }



}



function HtmlContentWindow(id)

{

	BoxedWindow.apply(this, arguments);

	

	this.innerHtml;

	

	this.addContent = function(contentEle)

	{

		contentEle.innerHTML = this.innerHtml;		

	}		

}



function XSLTWindow(id, xslurl, xmlurl)

{

	BoxedWindow.apply(this, arguments);

	this.xslurl = xslurl;

	this.xmlurl = xmlurl;

	this.xslReq;

	this.contentEle;

	

	this.addContent = function(contentEle)

	{

		this.contentEle = contentEle;

		this.xslReq = new XslRequest(this, this.id);

		this.xslReq.send(this.xslurl, this.xmlurl);

	}		

	

	this.documentReady = function()

	{

		this.xslReq.addFragmentTo(this.contentEle);

	}

}



function IFrameWindow(id)

{

	BoxedWindow.apply(this, arguments);

	

	this.getFrame = function()

	{

		if(this.isIE)

		{

			return(frames["if_"+this.id]);  

		}

		return(this.childEle.contentWindow);

	}	

	

	this.resizeToFit = function()

	{

		var s = getDocumentSize(this.getFrame().document);

		this.setWindowSize(s.w + 1, s.h + 1);

		this.moveToCenter();

   		browserResized();

	}	

	

	this.addContent = function(contentEle)

	{

		this.childEle = document.createElement("iframe");

		this.childEle.frameBorder = "no";

		this.childEle.id = "if_" + this.id;

		this.childEle.src = this.src;

		this.childEle.style.border = "0px";

		this.childEle.style.overflow = "auto";

		this.childEle.style.height = "100%";

		this.childEle.style.width = "100%";



		contentEle.appendChild(this.childEle);	

		

		this.getFrame().id = "ifwin_" + this.id;

	}

}



function IFrameXSLTWindow(id, xslurl, xmlurl)

{

	BoxedWindow.apply(this, arguments);

	this.xslurl = xslurl;

	this.xmlurl = xmlurl;

	this.xslReq;

	this.contentEle;

	

	this.addContent = function(contentEle)

	{

		this.childEle = document.createElement("iframe");

		this.childEle.frameBorder = "no";

		this.childEle.id = "if_" + this.id;



		this.childEle.style.border = "0px";

		this.childEle.style.overflow = "auto";

		this.childEle.style.height = "100%";

		this.childEle.style.width = "100%";



		contentEle.appendChild(this.childEle);	

			

		this.contentEle = contentEle;

		this.xslReq = new XslRequest(this, this.id);

		this.xslReq.send(this.xslurl, this.xmlurl);

				

	}		

	

	this.documentReady = function()

	{

		this.xslReq.addFragmentTo(this.getDocumentBody());

	}

	

	this.getDocumentBody = function()

	{

		if(this.isIE)

		{

			return(frames[this.childEle.id].document.body);

		}

		else

		{

			return(this.childEle.contentWindow.document.body);

		}

	}

}


http://localhost:8080/Runway4/javascripts/chrome.js

//** Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)



//** Updated: July 14th 06' to v2.0

	//1) Ability to "left", "center", or "right" align the menu items easily, just by modifying the CSS property "text-align".

	//2) Added an optional "swipe down" transitional effect for revealing the drop down menus.

	//3) Support for multiple Chrome menus on the same page.



//** Updated: Nov 14th 06' to v2.01- added iframe shim technique



//** Updated: July 23rd, 08 to v2.4

	//1) Main menu items now remain "selected" (CSS class "selected" applied) when user moves mouse into corresponding drop down menu. 

	//2) Adds ability to specify arbitrary HTML that gets added to the end of each menu item that carries a drop down menu (ie: a down arrow image).

	//3) All event handlers added to the menu are now unobstrusive, allowing you to define your own "onmouseover" or "onclick" events on the menu items.

	//4) Fixed elusive JS error in FF that sometimes occurs when mouse quickly moves between main menu items and drop down menus





var cssdropdown={

disappeardelay: 700, //set delay in miliseconds before menu disappears onmouseout

dropdownindicator: '', //specify full HTML to add to end of each menu item with a drop down menu

enableswipe: 1, //enable swipe effect? 1 for yes, 0 for no

enableiframeshim: 1, //enable "iframe shim" in IE5.5/IE6? (1=yes, 0=no)



//No need to edit beyond here////////////////////////



dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, swipetimer: undefined, bottomclip:0,



getposOffset:function(what, offsettype){

	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;

	var parentEl=what.offsetParent;

	while (parentEl!=null){

		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;

		parentEl=parentEl.offsetParent;

	}

	return totaloffset;

},



swipeeffect:function(){

	if (this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){

		this.bottomclip+=10+(this.bottomclip/10) //unclip drop down menu visibility gradually

		this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)"

	}

	else

		return

	this.swipetimer=setTimeout("cssdropdown.swipeeffect()", 10)

},



css:function(el, targetclass, action){

	var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")

	if (action=="check")

		return needle.test(el.className)

	else if (action=="remove")

		el.className=el.className.replace(needle, "")

	else if (action=="add" && !needle.test(el.className))

		el.className+=" "+targetclass

},



showhide:function(obj, e){

	this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"

	if (this.enableswipe==1){

		if (typeof this.swipetimer!="undefined")

			clearTimeout(this.swipetimer)

		obj.clip="rect(0 auto 0 0)" //hide menu via clipping

		this.bottomclip=0

		this.swipeeffect()

	}

	obj.visibility="visible"

	this.css(this.asscmenuitem, "selected", "add")

},



clearbrowseredge:function(obj, whichedge){

	var edgeoffset=0

	if (whichedge=="rightedge"){

		var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15

		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth

		if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?

			edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth

	}

	else{

		var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset

		var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18

		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight

		if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?

			edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight

			if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?

				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge

		}

	}

	return edgeoffset

},



dropit:function(obj, e, dropmenuID){

	if (this.dropmenuobj!=null) //hide previous menu

		this.hidemenu() //hide menu

	this.clearhidemenu()

	this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu

	this.asscmenuitem=obj //reference associated menu item

	this.showhide(this.dropmenuobj.style, e)

	this.dropmenuobj.x=this.getposOffset(obj, "left")

	this.dropmenuobj.y=this.getposOffset(obj, "top")

	this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"

	this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"

	this.positionshim() //call iframe shim function

},



positionshim:function(){ //display iframe shim function

	if (this.enableiframeshim && typeof this.shimobject!="undefined"){

		if (this.dropmenuobj.style.visibility=="visible"){

			this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"

			this.shimobject.style.height=this.dropmenuobj.offsetHeight+"px"

			this.shimobject.style.left=this.dropmenuobj.style.left

			this.shimobject.style.top=this.dropmenuobj.style.top

		}

	this.shimobject.style.display=(this.dropmenuobj.style.visibility=="visible")? "block" : "none"

	}

},



hideshim:function(){

	if (this.enableiframeshim && typeof this.shimobject!="undefined")

		this.shimobject.style.display='none'

},



isContained:function(m, e){

	var e=window.event || e

	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)

	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}

	if (c==m)

		return true

	else

		return false

},



dynamichide:function(m, e){

	if (!this.isContained(m, e)){

		this.delayhidemenu()

	}

},



delayhidemenu:function(){

	this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu

},



hidemenu:function(){

	this.css(this.asscmenuitem, "selected", "remove")

	this.dropmenuobj.style.visibility='hidden'

	this.dropmenuobj.style.left=this.dropmenuobj.style.top=0

	this.hideshim()

},



clearhidemenu:function(){

	if (this.delayhide!="undefined")

		clearTimeout(this.delayhide)

},



addEvent:function(target, functionref, tasktype){

	if (target.addEventListener)

		target.addEventListener(tasktype, functionref, false);

	else if (target.attachEvent)

		target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});

}





}

// inline script from http://localhost:8080/Runway4/runway/note.search?tab=noteTab


   if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion <= "5.5") {
     Array.prototype.push = push;
   }
   
   function push() {
     var sub = this.length;
     for (var i = 0; i < push.arguments.length; ++i) {
       this[sub] = push.arguments[i];
   	sub++;
     }
   }

   

//http://localhost:8080/Runway4/javascripts/assignutils.js

function spawnChild( target, windowname, width, height, showMenu, scroll, resize) {

   if (typeof(width) == "undefined") {

      width = 620;

   }

   if (typeof(height) == "undefined") {

      height = 600;

   }

   if (typeof(showMenu) == "undefined") {

      showMenu = "no";

   }

   if (typeof(scroll) == "undefined") {

      scroll = "yes";

   }

   if (typeof(resize) == "undefined") {

      resize = "yes";

   }

   if (typeof(windowname) != "undefined") {

      while (windowname.indexOf(' ') != -1) {

         windowname = windowname.replace(' ','');

      }

   }

   var helpwinpopup = window.open(target,windowname,'width='+width+', height='+height+', toolbar=no, scrollbars='+scroll+', menubar='+showMenu+', location=no, status=no, resizable='+resize);

	helpwinpopup.moveTo(((screen.width-width)/2),((screen.height-height)/2));

	helpwinpopup.focus();

}




function openInLightBox( target, windowname, width, height, showMenu, scroll, resize) {

	   if (typeof(width) == "undefined") {

	      width = 650;

	   }

	   if (typeof(height) == "undefined") {

	      height = 300;

	   }

	   if (typeof(showMenu) == "undefined") {

	      showMenu = "no";

	   }

	   if (typeof(scroll) == "undefined") {

	      scroll = "yes";

	   } 

	   if (typeof(resize) == "undefined") {

	      resize = "yes";

	   }

	   if (typeof(windowname) != "undefined") {

	      while (windowname.indexOf(' ') != -1) {

	         windowname = windowname.replace(' ','');

	      }

	   }



		var lightboxwin = new IFrameWindow(windowname);

		lightboxwin.frameid = 'ifrm';

		lightboxwin.width = width;

		lightboxwin.height = height;

		lightboxwin.winShadeOpacity = 60;

		lightboxwin.src = target;

		if(lightboxwin.src.indexOf("?")>0)

		{

			lightboxwin.src = lightboxwin.src + "&-id=" + windowname;

		}

		else

		{

			lightboxwin.src = lightboxwin.src + "?-id=" + windowname;

		}

		lightboxwin.create();

}







