// JavaScript Document
new function(){
if(!window.Class){window.Class={create:function(){return function(){if(typeof this.initialize==='function'){this.initialize.apply(this,arguments);}};}};}
if(!Object.extend){
	Object.extend=function extend(dest,source,override){for(prop in source){if(override||typeof dest[prop]==='undefined'){dest[prop]=source[prop];}}return dest;};
}
if(!Object.hasOwnProperty){
	Object.hasOwnProperty=function hasOwnProperty(property){
		try{var prototype=this.constructor.prototype;while(prototype){if(prototype[property]===this[property]){return false;}prototype=prototype.prototype;}}catch(e){}
		return true;
	};
}
Function.prototype.method=function(name,func){this.prototype[name]=func;return this;}
}
var Is;(function(){
	Is=Is||{};Is.func=function(a){return typeof a=='function';};Is.obj=function(a){return(a&&typeof a=='object')||Is.func(a);};Is.alien=function(a){return Is.obj(a)&&typeof a.constructor!='function';};Is.array=function(a){return Is.obj(a)&&a.constructor==Array;};Is.bool=function(a){return typeof a=='boolean';};Is.def=function(){for(var i=0,r=true;i<arguments.length&&r;++i){r=(typeof arguments[i]!='undefined');}return r;};Is.empty=function(o){var i,v;if(Is.obj(o)){for(i in o){v=o[i];if(!Is.def(v)&&Is.func(v)){return false;}}}return true;};Is.nul=function(a){return typeof a=='object'&&!a;};Is.num=function(a){for(var i=0,r=true;i<arguments.length&&r;++i){r=(typeof arguments[i]=='number'||isFinite(arguments[i]));}return r;};Is.str=function(){for(var i=0,r=true;i<arguments.length&&r;++i){r=(typeof arguments[i]=='string');}return r;};
	Is.all=document.all?1:0;Is.lay=document.getElementById?false:document.layers?1:0;Is.w3c=document.getElementById?1:0;
	Is.Ice=navigator.__ice_version?navigator.__ice_version:0;Is.NS4=Is.lay;Is.IE4=(!Is.w3c&&Is.all);Is.IE5=(Is.w3c&&Is.all);Is.IE55=(Is.IE5&&(document.body&&document.body.contentEditable));Is.IE6=(Is.IE5&&(typeof document.compatMode!='undefined'));Is.Mac=((Is.IE4||Is.IE5)&&(/mac/i.test(navigator.appVersion)));Is.NS6=(Is.w3c&&!Is.all);Is.Opera=((Is.w3c||Is.all)&&window.opera);Is.OperaVer=Is.Opera&&(/opera/i.test(navigator.appName))?parseFloat(navigator.userAgent.substring(navigator.userAgent.search(/opera.[^ ]+/i)+6)):0;
	Is.Safari=(/safari/i.test(navigator.appVersion));
	Is.getAttribute=document.getAttribute?1:0;Is.setAttribute=document.setAttribute?1:0;
	if(typeof Document!='undefined'){
		if(!Document.selectSingleNode){Document.prototype.selectSingleNode=function(path){var r=this.evaluate(path,this,this.createNSResolver(this.documentElement),9,null);if(r.singleNodeValue){return r.singleNodeValue;}else{return(new DOMParser()).parseFromString('<empty/>','text/xml').documentElement;}};}
	}
	if(!document.getElementById){document.getElementById=new Function('id','f','if(document.layers){f=f||self;if(f.document.layers[id]){return f.document.layers[id];}for(var W=0,t;W<f.document.layers.length;++W){t=document.getElementById(id,f.document.layers[W]);}return t;}if(document.all&&document.all[id]){return document.all[id];}return null;');}
	if(!document.getElementsByTagName){document.getElementsByTagName=function(tag){var r=[];if(document.all){if(tag=='*'){return document.all;}var i=-1,el;while((el=document.all[++i])){if(el.tagName.toLowerCase()==tag.toLowerCase()){r.push(el);}}}return r.length?r:null;};}
	if(!document.getElementTextNS){
		document.getElementTextNS=function(prefix,local,parent,index){
			var r='';
			if(prefix&&document.all){r=parent.getElementsByTagName(prefix+':'+local)[index];}
			else{r=parent.getElementsByTagNameNS(prefix,local)[index];}
			return r?r.childNodes.length>1?r.childNodes[1].nodeValue:r.firstChild.nodeValue:'';
		};
	}
})();

// inheritance stuff...
(function(){
	Function.prototype.method=function(name,func){this.prototype[name]=func;return this;}
	Function.method('selfName',function(){var s;return(s=/function (\w+)/.exec(this.toString()))?s[1]:'(anonymous)';});
	if(!Is.func(Function.apply)){
		Function.method('apply',function(o,a){
			var r,x='____apply';if(!Is.obj(o)){o={};}o[x]=this;switch((a&&a.length)||0){
				case 0:r=o[x]();break;case 1:r=o[x](a[0]);break;case 2:r=o[x](a[0],a[1]);break;case 3:r=o[x](a[0],a[1],a[2]);break;case 4:r=o[x](a[0],a[1],a[2],a[3]);break;case 5:r=o[x](a[0],a[1],a[2],a[3],a[4]);break;case 6:r=o[x](a[0],a[1],a[2],a[3],a[4],a[5]);break;
				default:alert('Too many arguments to apply.');
			}delete o[x];return r;
		});
	}
	Function.method('inherits',function(parent){var d=0,p=(this.prototype=new parent());this.uber=function uber(name){var f,r,t=d,v=parent.prototype;if(t){while(t){v=v.constructor.prototype;--t;}f=v[name];}else{f=p[name];if(f==this[name]){f=v[name];}}++d;r=f.apply(this,Array.prototype.slice.apply(arguments,[1]));--d;return r;};return this;});
	Function.method('swiss',function(parent){for(var i=1,name;i<arguments.length;++i){name=arguments[i];this.prototype[name]=parent.prototype[name];}return this;});
})();

var Browser=Class.create();
Object.extend(Browser,{
	__db:(document.compatMode&&document.compatMode.toLowerCase()!='backcompat'||document.documentElement)?document.documentElement:(document.body||null),
	__n6:!!((typeof window.getComputedStyle!=='undefined')&&(typeof document.createRange!=='undefined')),
	IE:!!(document.all&&!Browser.Opera&&Browser.__db&&(/microsoft/i.test(navigator.appName))),IEVer:Browser.IE?(/mac/i.test(navigator.platform))?5.2:!!(document.createComment)?6:!!(document.fireEvent)?5.5:!!(document.getElementById)?5:4:0,
	IEMac:!!(Browser.IE&&(Browser.IEVer===5.2)),
	NN4:!!(!Browser.w3c&&document.layers&&(typeof document.classes!=='undefined')),
	Opera:!!(window.opera),OperaVer:Browser.Opera?!!(window.getSelection)?9:!!(opera.defineMagicFunction)?8:!!(opera.version)?7.6:!!(document.createComment)?7:!!(opera.buildNumber)?6:5:0,
	Safari:!!(!document.all&&document.childNodes&&!navigator.taintEnabled),
	w3c:!!(!Browser.Opera&&!Browser.IE&&!Browser.__n6&&document.getElementById)
});

if(typeof HTMLElement!='undefined'){
	HTMLElement.method=Function.prototype.method;
	if(!HTMLElement.prototype.outerHTML){
		if(Is.Opera){HTMLElement.method('outerHTML',function(s){return s?(document.documentElement.outerHTML=s):document.documentElement.outerHTML;});}
		else{HTMLElement.prototype.__defineSetter__('outerHTML',function(s){var r=this.ownerDocument.createRange();r.setStartBefore(this);var df=r.createContextualFragment(s);this.parentNode.replaceChild(df,this);return this;});HTMLElement.prototype.__defineGetter__('outerHTML',function(){var aA=this.attributes,eT=['area','base','basefont','br','col','frame','hr','img','input','isindex','link','meta','param'],cA=['checked','compact','declare','defer','disabled','ismap','multiple','nohref','noresize','noshade','nowrap','readonly','selected'],t=this.tagName.toLowerCase(),s='<'+t;for(var i=0,a=aA[i].name.toLowerCase(),p=cA.within(a,true),v=aA[i].value,l=aA.length;i<l;++i){s+=' '+a+'="'+((p>-1&&!v.length)?cA[p]:v)+'"';}s+=(eT.within(t))?' />':'>'+this.innerHTML+'</'+t+'>';return s;});}
	}
	if(!HTMLElement.prototype.innerText){
		if(Is.Opera){HTMLElement.method('innerText',function(s){return s?(document.documentElement.innerText=s):document.documentElement.innerText;});}
		else{HTMLElement.prototype.__defineSetter__('innerText',function(s){this.innerHTML=s.escapeHTML();return this;});HTMLElement.prototype.__defineGetter__('innerText',function(){var r=this.ownerDocument.createRange();r.selectNodeContents(this);return String(r);});}
	}
	if(!HTMLElement.prototype.outerText){
		if(Is.Opera){HTMLElement.method('outerText',function(s){return s?(document.documentElement.outerText=s):document.documentElement.outerText;});}
		else{HTMLElement.prototype.__defineSetter__('outerText',function(s){this.outerHTML=s.escapeHTML();return this;});HTMLElement.prototype.__defineGetter__('outerText',function(){return this.innerText();});}
	}
	if(!HTMLElement.prototype.insertAdjacentElement){
		HTMLElement.method('insertAdjacentElement',function(w,pN){switch(String(w).toLowerCase()){case 'afterbegin':this.insertBefore(pN,this.firstChild);break;case 'afterend':if(this.nextSibling){this.parentNode.insertBefore(pN,this.nextSibling);}else{this.parentNode.appendChild(pN);}break;case 'beforebegin':this.parentNode.insertBefore(pN,this);break;case 'beforeend':this.appendChild(pN);break;}return this;});
		HTMLElement.method('insertAdjacentHTML',function(w,S){var r=this.ownerDocument.createRange();switch(String(w).toLowerCase()){case 'beforebegin':r.setStartBefore(this);break;case 'beforeend':case 'afterbegin':r.selectNodeContents(this);r.collapse(false);break;case 'afterend':r.setStartAfter(this);break;}var pH=r.createContextualFragment(S);this.insertAdjacentElement(w,pH);return this;});
		HTMLElement.method('insertAdjacentText',function(w,s){this.insertAdjacentHTML(w,s.escapeHTML());return this;});
	}
}

var Events;
(function(){
	Events=Events||{};
	Events.Add=function(obj,type,fn,cap){
		if((fn.constructor==Array)&&(typeof fn=='array')){while(fn.length){Events.Add(obj,type,fn.shift(),cap);}return this;}
		type=type.toLowerCase();if(typeof cap!=='boolean'){cap=new Boolean(false);}
		if(obj===window&&!window.addEventListener&&document.addEventListener){obj=document;} // Opera 7 check
		if(obj.addEventListener){obj.addEventListener(type,fn,cap);}
		else if(obj.attachEvent){obj.attachEvent('on'+type,fn);}
		else{var oe=Is.func(obj['on'+type])?obj['on'+type]:function(){};obj['on'+type]=function(e){e=e||window.event;oe();fn();};if(obj.captureEvents){obj.captureEvents(Event[type.toUpperCase()]);}}
		return this;
	};
	Events.Cancel=function(event){try{event.preventDefault();}catch(ex){event.returnValue=false;}};
	Events.Remove=function(obj,type,fn,cap){ // can't be used with anonymous functions (or for individual funcs in crap browsers)...
		var ret;type=type.toLowerCase();if(typeof cap!=='boolean'){cap=new Boolean(false);}
		if(obj==window&&!window.addEventListener&&document.addEventListener){obj=document;} // Opera 7 check
		if(obj.removeEventListener){obj.removeEventListener(type,fn,cap);}
		else if(obj.detachEvent){obj.detachEvent('on'+type,fn);}
		else{obj['on'+type]=null;if(obj.releaseEvents){obj.releaseEvents(Event[type.toUpperCase()]);}}
		return this;
	};
})();


function setCollapse(){
	var i=-1,el,n,span='<span class="plusminus">+</span>';while((el=document.getElementsByTagName('*')[++i])){
		if(el.id&&/^Q/.test(el.id)){
			n=el.id.replace(/\D/g,'');switch(el.tagName.toUpperCase()){case 'DT':break;case 'TR':el=el.getElementsByTagName('td')[0];break;default:el=null;break;}
			if(el){el.onclick=el.onkeypress=new Function('return collapse('+n+');');el.style.cursor=document.evaluate?'pointer':'hand';el.insertAdjacentHTML('afterbegin',span);}
		}
	}
}

function collapse(n){
	function plusminus(el){el.innerHTML=el.innerHTML=='+'?'&ndash;':'+';el.style.paddingLeft=el.innerHTML=='+'?'0.1em':'0.2em';el.style.fontSize=el.innerHTML=='+'?'0.72em':'0.67em';}
	if(!n){n=-1;}var i=-1,el,id,s=null;while((el=document.getElementsByTagName('*')[++i])){
		if(el.id&&el.id.length&&/^(Q|Row)/.test(el.id)){
			s=(el.tagName.toLowerCase()=='tr'&&document.evaluate&&!s)?'table-row':'block';id=el.id.replace(/\D/g,'');
			if(/^Row/.test(el.id)){el.style.display=(el.style.display!=s&&id==n)?s:'none';}else{if((el=el.getElementsByTagName('span')[0])){if(id==n||el.innerHTML!='+'){plusminus(el);}}}
		}
	}return false;
}

/* Run on DOM loaded code */
/* this is the function that will run */
function domInit(){
	if(arguments.callee.done){return;}arguments.callee.done=true; //double execution check
	if(Browser.IEMac||Browser.NN4){return;} // we don't run script on IE5.2/Mac or NN4...
	if(window.__WebKitTimer){window.clearInterval(window.__WebKitTimer);try{delete window.__WebKitTimer;}catch(ex){window.__WebKitTimer=null;}}
	loadedInit();
}
/* conditional IE/Win code */
/*@cc_on
@if (@_win32)
	document.write('<script id="__ie_onload" defer src="//0"><\/script>');
	document.getElementById('__ie_onload').onreadystatechange=function(){if(this.readyState=='complete'){domInit();}};// call the onload handler
@end
@*/
/* End IE/Win conditional code */
if(document.addEventListener){document.addEventListener('DOMContentLoaded',domInit,null);} // Mozilla only...
/* for Safari */
else if(/WebKit|KHTML/i.test(navigator.userAgent)){
    window.__WebKitTimer=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){domInit();}},10); // call the onload handler
}
else{Events.Add(window,'load',domInit);}

function loadedInit(){
	setCollapse();
	collapse()
}
