/*
   Milonic JavaScript API webplugs.js version 1.0 - May 20 2009
   Copyright 2008 (c) Milonic Solutions Limited. All Rights Reserved.
   This is a commercial software product, please visit http://www.milonic.com/ for more information.
   Open Source and Non-Profit Licenses are available on request.
*/ 

(function() {

	var wp=window.wp=window.$=function(v){
		return new wp.fN.init(v);
	}

	wp.fN=wp.prototype={
		init:function(v){
			this.v=wp.element.v=v			
			this.v=v
			return this
		}
	}
	
	wp.extend=wp.fN.extend=function(d,s){
		if(!s)s=this;
		for(var i in d){
			s[i]=d[i]
			wp.fN[i]=d[i]
		}
	}
	
	wp.extend({
		version:"1.0",
		defaultTheme:"Office2003",
		server:"php",
		zindex:500,
		inc:[],
		dep:[],
		fire:{},
		uId:0,
		/*@cc_on
			msie:navigator.appVersion.match(/MSIE (\d\.\d)/)[1], // We only need to to browser checks for IE, all code is developed to work accross browsers but IE does very different things depending on its version
		@*/
		// if(window.WebKitPoint) - Safari or Chrome
		element:{},
		DELETE_get_Obj:function(o,t)
		{
			if(o&&o.object)wp.v=o.object;
			for(var C in o)if(C!="object")t[C]=o[C];
			return wp.v
		},
		edit:function()
		{
			var W=wp.get("wpEd")
			if(W){
				wp(W).openWindow()
			}
			else{
				var W=wp.addNode(document.body,"DIV");
				W.id="wpEd";
				wp(W).into("htmleditor",{windowable:true});
				
				wp.addEvent(document.body,'mousemove',function(e){
					E=wp.getE(e)
					N=wp.get("wpEdH");
					if(N)wp.removeNode(N);
					N=wp.addNode(E,"DIV");
					N.id="wpEdH";
					N.style.position="absolute";
					N.style.border="2px solid #3789ef";
					N.style.MozBorderRadius="5px"
					N.style.WebkitBorderRadius="5px"
					
					var T=N
					var P=wp.getPosition(E);
					var D=wp.getDimension(E);
					var S=wp.getScrolling(document);
					
					if(E.id!="wpEdH")
					{
						wp(T).setPosition({top:P.top-4,left:P.left-4}).setDimension({height:D.height+4,width:D.width+4})
					}
					
					T.style.zIndex=0
					
					//T.style.display="block"
					
					
					
				var a=wp.get(W.id+"contentEdit")
				//alert(a.contentWindow)
				a.contentWindow.document.body.innerHTML=E.innerHTML
				
				//wp.debug.objects(a.contentWindow.document.body)
					

					if(E.tagName=="A")
					{
						wp.addEvent(E,'click',function(e){
							//alert("click")
							wp.cancelEvent(e);
							return false
						})
					}
					


				})


				wp.addEvent(document.body,'mousedown',function(e){
					//wp.cancelEvent(e);
					//return false
					
				})



				wp.addEvent(document.body,'click',function(e){
					
					
					//wp.cancelEvent(e);
					//return false
					
				})

			}
		},
		msg:function(v,o)
		{
			var m=wp.addNode(document.body,"div");
			wp.hide(m)
			m.innerHTML=v
			wp(m).into("dialog",o)
		},
		bob:function(o,S)
		{
			if(!o)o={};
			if(typeof(o.theme)=="undefined")o.theme=wp.defaultTheme;
			if(S&&!o.style)o.style="Default"
			return o
		},
		getE:function(e)
		{
			return e.target?e.target:e.srcElement;
		},
		iePngFix:function(T)
		{
			if(!T)T="scale"
			if(wp.msie<7){
				wp.each(wp.seek(this.v),function(a,i){
					var IM=wp.css.get(a[i],"background-image")   // Get the background image rule from CSS
					if(IM.search(/.png/ig)>-1){                  // Only apply if image is a .png
						a[i].style.backgroundImage="url('')";    // Need to remove the backgroundImage rule, replacing with AlphaImageLoader rule instead
						IM=IM.replace(/^url\(\"+|\"\)+$/g,'');   // Extract filename from CSS rule
						a[i].style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+IM+",sizingMethod="+T+")";
					}
				})
			}
			return this
		},
		/*
		getType:function(v) // Gets the type of wpObject from the className
		{
			v=v.className.split(v.wpObject.theme)
			v=v[1].split(" ")[0].toLowerCase()
			return v
		},
		*/
		changeTheme:function(v,newTheme)
		{
			var V=wp.get(v)
			var aa=V.getElementsByTagName("*")
			aa[aa.length]=V
			wp.each(aa,function(a,i){
				if(a[i].wpObject){
					
					
					//alert(a[i].className  + " - " + a[i].type)
					
					a[i].className=a[i].className.replace("wp"+a[i].wpObject.theme,"wp"+newTheme);
					a[i].wpObject.theme=newTheme
					wp.css.add(a[i].wpObject,a[i].webplug);
				}
			})
		},		
		seek:function(v,L)
		{
			if(!this.fN)v=this.v;
			//alert(v)
			var output=[],i,c,e,s,I,a,A,R=[],O,o,S,OBJ,J=0,K;
			if(typeof(v)=="string"){
				s=v.split(".");
				i=s[0];
				c=s[1];
				s=i.split("+");
				i=s[0];
				e=s[1]?s[1]:"*";
				I=wp.get(i);
				if(c){
					if(!I)I=document;
					if(L)I=L;
	
					OBJ=I.getElementsByTagName(e);
					if(OBJ.length==0){
						OBJ=[]
						OBJ[0]=I
					}
					//alert()
					//if(!OBJ.length)output.push(I);
					//alert(OBJ.length + " - " + J)
					K=OBJ.length
					while(J<K){
						var found=0;
						if(OBJ[J].className){
							wp.each(OBJ[J].className.split(" "),function(a,i){
								if(a[i]==c)found=1;
							})
						}
						if(O&&e!=OBJ[J].id)found=0;
						if(found)output.push(OBJ[J]);
						J++
					}
					//alert(OBJ.length)
				}
				else{
					if(i&&e=="*")return I?[I]:[];
					else{
						//alert(L)
						if(!L)L=document
						output=L.getElementsByTagName(e);
					}
				}
				if(output.length==0)output=null
				return output;
			}
			else{
				return v
			}
		},

	DELETE_all:function(o,f)
	{
		alert(wp.all.caller)
		var v=wp.get_Obj(o,this);
		if(v.length){
			for(O in v)f.call(this,v[O],O)
		}
		else{
			f.call(this,v)
		}
	},
	each:function(o,f,a) // a parameter forces each to scan through all elements in an object
	{
		
		if(!o)return
		
		//alert(typeof(o))
		
		//if(typeof(o)!="object")return
		
		
		
		
		
		
		
		if(a||o.length){
			for(var O in o){
				
				
			
				
				if(O!="length")f.call(this,o,O)
			}
		}
		else{
			
			
			f.call(this,[o],0)
		}
	},
	loadFunc:[],
	onload:function(f)
	{
		wp.loadFunc.push(function(){return f.apply(f)})
	},
	setready:function()
	{
		for(var x=0;x<wp.loadFunc.length;x++)wp.loadFunc[x].apply();
		wp.docState="complete";
		
		//setInterval("wp.intv()",0)
		try{document.execCommand("BackgroundImageCache",false,true)}catch(err){}
	},
	ready:function()
	{
		var d=document;
		if(d.addEventListener){
			d.addEventListener('DOMContentLoaded',wp.setready,false);
		}
		else if(wp.msie){
			try{d.documentElement.doScroll("left")}catch(error){
				setTimeout("wp.ready()",10);
				return;
			}
			wp.setready()
		}
		else wp.addEvent(window,"load",wp.setready())
	},	
	getPath:function(F)
	{
		if(wp.path)return wp.path
		if(F)return F;
		var S,a,s,V;
		S=document.getElementsByTagName("script");
		for(a=0;a<S.length;a++){
			V=S[a].src;
			//alert(V)
			s=V.split("\/");
			if(s[s.length-1]=="webplugs.js"){
				wp.path=V.substr(0,V.length-11)
				return wp.path
			}
		}
	},
	include:function(f,F)
	{
		var S
		if(!wp.inc[f]){
			if(!wp.docState){
				document.write('<scr'+'ipt type="text/javascript" src="'+wp.getPath(F)+f+'.js"></scr'+'ipt>');
			}
			else{
				S=document.createElement('script');
				S.type='text/javascript';
				S.src=wp.getPath(F)+f+".js"
				
				document.getElementsByTagName("head")[0].appendChild(S);
				//alert(S.src)
			}
			//alert(wp.dep)
			wp.dep.push(f)
			wp.inc[f]=1
		}
		return this;
	},
	incOnLoad:function(f,p)
	{
		for(var d in wp.dep){
			if(!wp[wp.dep[d]]){
			//	alert("aa "+this.v)
			
			
			
			
			
			var V=this.v
				setTimeout(function(){wp(V).incOnLoad(f,p)},10);
				return
			}
		}
		
		//alert(wp.css)
		
		//alert("bb "+this.v)
		//alert(wp[f])
		//wp(this).debug.objects()
		if(wp[f]&&wp[f].exec)
		{
			//alert(this.v)
			//alert(p)
			wp[f].exec(this.v,p)
		}
		return this
	},
	into:function(v,p)
	{
		//alert(v)
		wp(this.v).include(v).incOnLoad(v,p)
		return this;
	},
	create:function(v,o)
	{
		if(!o)o={}
		var D=wp.addNode("div")
		D.innerHTML="ANDY"
		wp(D).into(v,o)
	},
	ondone:function(v)
	{
		for(var d in wp.dep){
			if(!wp[wp.dep[d]]){
				//alert(wp.dep+" - "+d + " - "+wp.dep[d]+" - "+wp[wp.dep[d]])
				setTimeout(function(){wp.ondone(v)},10);
				return
			}
		}
		v()
	},
	dependencies:function(v)
	{
		var D=v.split(",");
		wp.each(D,function(a,i){
			wp.include(a[i])
		})
	},
	get:function(v,w)
	{
		if(!w)w=window;
		if(!this.fN)v=this.v;
		if(!v)return null;
		if(typeof(v)=="string")v=w.document.getElementById(v);
		return v
	},
	getAll:function(v)
	{
		if(wp.msie<6) return v.all; else return v.getElementsByTagName("*")
	},
//	node:
	//{
		cloneNode:function(i) // wp.cloneNode(OBJ:object,BOOL:before/after(default is after),BOOL:do NOT include children)
		{
			var N=i.cloneNode(true),
			li=i.getElementsByTagName('*'),
			li2=N.getElementsByTagName('*');
		
			if(!wp.msie){
				wp.each(li,
					function(V,ii){
						if(ii){
							if(V[ii].nodeType==1 && V[ii].wpEvents){
								for(var a in V[ii].wpEvents){
									wp.addEvent(li2[ii],a.split("_")[0],V[ii].wpEvents[a])
								}
							}
						}
					}
				)
			}
			return N
		},
		insertNode:function(N,i,p)
		{
			i.parentNode.insertBefore(N,p?i:i.nextSibling);
		},
		swapNode:function(n1,n2)
		{
			var N=wp.msie?n2:n2.nextSibling;
			n1.parentNode.replaceChild(n2,n1);
			n2.parentNode.insertBefore(n1,N);			
		},
		/*
		allOffspring:function(v)
		{
			return v.getElementsByTagName("*");
		},
		rScr:function(v)
		{
			
			//alert(wp.allOffspring(v).length)
			var V=wp.allOffspring(v)
			for(var a in V)
			{
				//alert(V[a] + " - " + a + " - " +  V + " - "+  V[a].tagName + " - "+ V[a].wpScript)
				//if(V[a].wpScript)alert(a)
			}
			
			
			
			v=v.wpScript
			if(v)v.parentNode.removeChild(v);
		},
		*/
		removeNode:function(f)
		{
			var F=wp.seek(this.v)
			if(f)F=wp.get(f) // This allows for both wp(OBJ).removeNode() as well as wp.removeNode(OBJ)
			wp.each(F,function(V){
				
				if(V.length>-1){ // This will only remove the first Node in a collecion - Do we need to remove multiple nodes?
					if(!V[0].parentNode||V.length==0)return wp;
					//alert(V[0].tagName + " - " + V.length + " - " + V[0].innerHTML)
					//wp.rScr(V[0])
					V[0].parentNode.removeChild(V[0]);
					
				}
				else{
					//wp.rScr(V)
					V.parentNode.removeChild(V);
				}
			})
			return this
		},
		appendScript:function(v)
		{
			var re=/<script\b[\s\S]*?>([\s\S]*?)<\/script>/i,match,scr="",D=[];
			while(match=re.exec(v)){
				scr+=match[1]+"\n"
				v=v.replace(re,"");
			}
			if(scr!=""){
				var S2=document.createElement('script');
				S2.type='text/javascript';
				S2.text=scr
				S2.id="_wpScript"+wp.uId++;
				document.getElementsByTagName("head")[0].appendChild(S2);
				var js=document.getElementsByTagName("script") // Check to see if the script already exists
				for(S in js){
					if(js[S]&&js[S].id&&(js[S].text.length==scr.length)&&(js[S].text==scr))if(js[S].id!=S2.id)wp.removeNode(js[S]) // if it does exist, remove the script and start again.
				}
			}
		},		
		addNode:function(d,e,p){
			// d object adding to
			// e element to add
			// p flag for including object as first object
			if(typeof(d)=="string"){//If d is a string then we assume that you want the string added as an element to document.body
				e=d;
				d=document.body;
			}
		
			var O=document.createElement(e);
			if(p){
				if(d.firstChild)d.insertBefore(O,d.firstChild);
			}
			else{
				d.appendChild(O);
			}
			return O
		},
		getParentNode:function(v,t,c)
		{
			if(!c)c=1;
			var found=0
			var count=1;
			/*
			var count=0;
			if(!c)c=1;
			while((v.tagName!=t)&&(count<c))
			{
				v=v.parentNode;

				if(v.tagName==t)count++
				alert(v.tagName + " - " + t + " - " + c + " - " + count)

			}
			alert(count)
			return v;
			*/
			while(!found&&v.tagName)
			{
				v=v.parentNode;
				if(v.tagName==t)
				{
					//alert(count + " - " + c)
					if(count==c)
					{
						found=1
						
					}
					count++
				}
			}
			if(!v.tagName)v=undefined
			return v
			
		},
	//},
	//event:
	//{
		addEvent:function(o,t,f)
		{
			if(!o.wpEvents)o.wpEvents={};
			//alert(o.tagName)
			var N=t+"_wpEvent"+wp.uId++;
			if(wp.msie){
				o[N]=f;
				o.wpEvents[N]=function(){
					if(o.parentWindow){
						o[N](o.parentWindow.event);
					}
					else if(o.ownerDocument){
						o[N](o.ownerDocument.parentWindow.event);		
					}						
					else{
						o[N](window.event);
					}
				}
			}
			else 
			o.wpEvents[N]=f;
			
			//alert(o.innerHTML)
			
			if(o.attachEvent)o.attachEvent("on"+t,o.wpEvents[N]);else o.addEventListener(t,o.wpEvents[N],false)			
			return this
		},
		getEvents:function(I) // Could be obsolete
		{
			// Transfer Events from existing window to new window object
			var EV=[]
			wp.each(I.getElementsByTagName("*"),function(a,i){
				if(a[i].wpEvents){
					if(!a[i].id)a[i].id="_wpE"+wp.uId++
					EV.push(a[i].id)
					EV.push(a[i].wpEvents)
				}
			})
			return EV
		},
		putEvents:function(EV,I)  // Could be obsolete
		{
			for(var x=0;x<EV.length;x++){
				//alert(wp.get(EV[x]))
//					wp.debug.objects(wp.get(EV[x]))
				x++
				wp.debug.objects(EV[x])
			}
			
		},
		transferEvent:function(i,t) // Could be obsolete
		{
			//var li=i.getElementsByTagName('*'),
			//li2=t.getElementsByTagName('*');
			
			for(var a in i.wpEvents){
				
				//wp.addEvent()
				
				//alert(a + " - " + i + " - " +i[a])
			}
			
			return
			//alert(i.wpEvents)
		/*
		for(var a in i)
		{
			if(typeof(i[a])!=typeof(N[a]))
			{
				N[a]=i[a]
			}
		}
		*/
		
		
			//if(!wp.msie){
				wp.each(li,
					function(V,ii){
						
						/*
						//alert(ii + " - " + V[ii].tagName)
						for(var a in V[ii])
						{

							if(typeof(V[ii][a])!=typeof(li2[ii][a]) && a!="wpEvents")
							{
								
			//					if(a=="subMenu")alert(a)
								li2[a]=V[ii][a]
							}							
						}
						*/
						
						if(ii){
						alert(V[ii].className)
							if(V[ii].nodeType==1 && V[ii].wpEvents){
								
								for(var a in V[ii].wpEvents){
									
									wp.addEvent(li2[ii],a.split("_")[0],V[ii].wpEvents[a])
								}
							}
						}
					}
				)
			//}





		},
		removeEvent:function(o,t,f)
		{
			var O,C,E=o.wpEvents;
			for(C in E){
				var S=E[C];
				if(wp.msie)S=o[C];
				if(S&&f&&(S.toString()==f.toString()))O=C;
			}
			if(O){
				f=E[O];
				delete E[O];
				if(wp.msie)delete S
				if(o.detachEvent)o.detachEvent("on"+t,f);else o.removeEventListener(t,f,false)
			}
			return this
		},
		execEvent:function(o,eType,e)
		{
			for(a in o.wpEvents){
				if(a.split("_")[0]==eType){
					o.wpEvents[a].call(o,e)
				}
			}
			return this
		},
		cancelEvent:function(e)
		{
			if(!e)return false;
			e.returnValue=false;
			e.cancelBubble=true;
			if(e.preventDefault){
				e.preventDefault();
				e.stopPropagation&&e.stopPropagation()
			}
			return false
		//}	
	},
	makeMovable:function(v)
	{
		v.style.position="absolute";
		return this
	},
	show:function(v)
	{
		//v.style.display="block";
		v.style.visibility="visible"
		return this
	},	
	hide:function(v)
	{
		//v.style.display="none";
		v.style.visibility="hidden"
		return this
	},
	outerHtml:function(v)
	{
		if(v.outerHTML)return v.outerHTML;
		else
		{
			var E={"IMG":1,"BR":1,"INPUT":1,"META":1,"LINK":1,"PARAM":1,"HR":1},
			A=v.attributes,S="<"+v.tagName,x;
			for(x=0;x<A.length;x++)S+=" "+A[x].name+"=\""+A[x].value+"\"";
			if(E[v.tagName])return S+" />";
			return S+">"+v.innerHTML+"</"+v.tagName+">";			
		}
	},
	IsWS:function(n)
	{
		return !(/[^\t\n\r ]/.test(n.data));
	},
	WsIgnore:function(n)
	{
		return(n.nodeType==8)||((n.nodeType==3)&&wp.IsWS(n));
	},
	previous:function(o)
	{
		while((o=o.previousSibling))if(!wp.WsIgnore(o))return o;
	},
	next:function(o)
	{
		while((o=o.nextSibling))if(!wp.WsIgnore(o))return o;
	},
	firstElement:function(v,Z)
	{
		Z=0;
		if(v.childNodes[0].nodeType==3)Z=1;
		return v.childNodes[Z];
	},
/*
last_child:function ( par )
{
	var res=par.lastChild;
	while (res) {
	if (!wp.WsIgnore(res)) return res;
	res = res.previousSibling;
	}
	return null;
},
first_child:function ( par )
{
	var res=par.firstChild;
	while (res) {
	if (!wp.WsIgnore(res)) return res;
	res = res.nextSibling;
	}
	return null;
},
*/
	tofront:function(v)
	{
		v.style.zIndex=wp.zindex++
		return this
	},
	getMouseCoords:function(e)
	{
		//alert(wp.getMouseCoords.caller)
		//if(window.event)e=event;
		return{x:e.clientX,y:e.clientY}
	},	
	getObjMouseCoords:function(e)
	{
		//if(window.event)e=event;
		return{x:e.layerX?e.layerX:e.offsetX,y:e.layerY?e.layerY:e.offsetY}
	},
	S:function(v) // same as: var tempVar="";if(val)tempVar=val;
	{
		return v?v:"";
	},
	wpAction:function(v,a)
	{
		a="on"+a
		if(v.wpObject[a])v.wpObject[a]()
	},
	setEvents:function(D,II)
	{
		for(var C in II)if(C.substr(0,2)=="on"){
			wp.addEvent(D,C.substr(2),II[C])
		}
	},
	px:function(v)
	{
		return parseInt(v)+"px";
	},
	fixZI:function(v)
	{
		var e,p;
		if(wp.msie){
			try{
				if(v.filters)
				{
					e=wp.addNode(v,"iframe",true);
					e.style.filter="Alpha(Opacity=0)"
					e.style.position="absolute"
					//e.style.display="block"
					e.style.top="-1px";
					
					e.style.left="-1px";
					e.className="wpMenuMask"
					v.iframe=e
					p=this.getDimension(v)
					wp(e).setDimension({height:p.height,width:p.width})
					e.style.visibility="visible"
					e.style.zIndex=-1			
				}
			}
			catch(e){}
		}
	},
	progUpdate:function()
	{
			var andy=wp.get("_WP_pBar")
			
			if(!andy)
			{
				//alert("")
				//document.write("<div id=_WP_pBar style='border:1px solid black'><br></div>")
				
				alert(document.getElementsByTagName('HEAD').item(0))
				

				andy=wp.addNode(document.getElementsByTagName('HEAD').item(0),"DIV")
				andy.id="_WP_pBar"
				andy.style.border="1px solid black"
				andy.style.position="absolute"
				andy.style.top="100px"
				andy.style.left="100px"

			}
			
			andy.innerHTML=andy.innerHTML+"loading: "
			andy.innerHTML=andy.innerHTML+".......done<br>"
				
	}		
	})
	
	wp.fN.init.prototype = wp.fN;
})()


//aaapp=""
wp.extend(
{
	debug:
	{
		objects:function(v)
		{
			if(!wp.docState){
				setTimeout(function(){wp(this.v).debug.objects(v)},20)
				return this
			}
			var a=wp.get("wpObj_P");
			if(!a)
			{
				var a=document.createElement("div");
				document.body.appendChild(a);
				a.id="wpObj_P";
				a.className="wpDebug"
				a.style.height="400px"

				//a.innerHTML="aaa"
				
				wp(a).into("window").ondone(function(){
					//alert("")
					wp.css.add("","debug");
					wp.debug.createLinks(a,v);
				})
				
			}
			else{
				
				//wp(a).changeWindowContent(h)
				a.style.display="block"
				wp.debug.createLinks(a,v);
			}
			return this
		},
		createLinks:function(a,v,S)
		{
			var A,P
			a.content.innerHTML=""

			var V={}
			if(S)V['back']=S;
			
			
			V['wp']=wp(this)
			
			for(var i in v){
				//alert(v[i]+" - "+i)
				try{V[i]=v[i]}catch(err){}
				
			}
			v=V
			
			for(var _cO in V){
				try{
						
					P=wp.addNode(a.content,"p");
					P.innerHTML=_cO+" - "
					
					A=wp.addNode(P,"a");
					A.innerHTML=V[_cO]
					A.obj=_cO
					
					if(v[_cO]&& typeof(v[_cO])==="object"){
						A.href="#"
						A.onclick=function(){
							wp.debug.createLinks(a,v[this.obj], a.S);
							return false;
						}
					}	
				}catch(err){}
				
			}
			a.S=v
			//alert(v)
		}
	}
})

/*

function showObjProps(v,back){
	var h=""
	h+="<a href='javascript:showObjProps(wp.sopObj[0],2)'>BACK</a><br />";

//alert(v)


	if(back){
		if(!wp.sopBack)wp.sopBack=[]
		wp.sopBack.push(v)
		if(back==2){
			v=wp.sopBack[wp.sopBack.length-1]
			wp.sopBack.pop()
			alert(wp.sopBack)
		}
	}
	else{
		wp.sopBack=[]
		wp.sopBack.push(v)
	}

	wp.sopObj=[]
	wp.sopObj.push(v)
	
	if(back){
		//wp.sopObj.push(back)
		//alert(back.scrollHeight)
		//h+="<a href='javascript:showObjProps(wp.sopObj[0],wp.sopObj[0])'>BACK</a>";
	}
	
	for(var c in v){
		if(c!="outerHTML"){
			var out=v[c]
			if(typeof(v[c])==="object"){
				wp.sopObj.push(v[c])
				out="<a href='javascript:showObjProps(wp.sopObj["+(wp.sopObj.length-1)+"],1)'>"+out+"</a>";
			}
			h+=c+" - " +out+"<br />";
		}
	}
	h.replace(/ /g,"&nbsp;") 
	
	var a=document.getElementById("objProps");
	if(!a){
		//if(!wp.docState)return		
		var a=document.createElement("div");
		document.body.appendChild(a);
		a.id="objProps";
		a.style.position="absolute";
		a.style.top="30px";
		a.style.left="30px";
		a.style.fontFamily="verdana";
		a.style.fontSize="10px";		
		a.innerHTML=h
		wp(a).into("window");
	}
	else{
		//alert(h)
		wp(a).changeWindowContent(h)
		a.style.display="block"
	}
	//wp.openWindow(a)
}


*/

	wp.extend({
		toarray:function(v){
			if(!v)v="";
			return this.split(v)
		}
			
	},String.prototype)

	if(wp.msie<5.5){
	wp.extend({
		push:function(v){this[this.length]=v}
	},Array.prototype)
	
	wp.extend({
		getElementsByTagName:function(str){return(str=='*')?document.all:document.all.tags(str)}
	},document)
}


wp.ready()

/*

function OLDshowObjProps(_w){
	var a=document.getElementById("OLDobjProps");
	if(!a){
		//wp.include("window")
		var a=document.createElement("div");
		a.id="OLDobjProps";
		if(document.body.appendChild){
			document.body.appendChild(a);
			a.style.position="absolute";
			a.style.border="1px solid gray";
			a.style.padding=4;
			a.style.top="200px";
			a.style.left="100px";
			a.style.height="350px";
			a.style.width="850px";
			a.style.fontFamily="verdana";
			a.style.fontSize="10px";
			a.style.overflow="scroll";
			a.style.color="black";
			a.style.background="white";
		}}	
	var h=""
	for(var _cO in _w){
		h+=_cO+" - '" +_w[_cO]+"'<br />";
	}
	h.replace(/ /g,"&nbsp;") 
	a.innerHTML=h;
}



*/
