                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

if(typeof vp=="undefined"){var vp={};}
vp.core=function(){};vp.core.applyStyle=function(object,properties)
{for(var property in properties)
{object.style[property]=properties[property];}};vp.core.isArray=function(v)
{return v&&typeof v=="object"&&v.constructor==Array;};vp.core.applyProperties=function(oObj1,oObj2,aProps)
{var iLen=aProps.length;for(var i=0;i<iLen;i++)
{oObj2[aProps[i]]=oObj1[aProps[i]];}};vp.core.shallowCopy=function(oObj)
{var oNew={};for(var sProp in oObj)
{oNew[sProp]=oObj[sProp];}
return oNew;};vp.core.shallowIsEqual=function(oObj1,oObj2)
{var sProp;var iObj2PropCount=0;var iObj1PropCount=0;for(sProp in oObj2)
{iObj2PropCount++;}
for(sProp in oObj1)
{iObj1PropCount++;if(typeof(oObj2[sProp])=="undefined")
{return false;}
else if(oObj2[sProp]!==oObj1[sProp])
{return false;}}
if(iObj1PropCount!=iObj2PropCount)
{return false;}
return true;};vp.core.initProperty=function(oObject,sPropertyName,vValue)
{if(typeof(oObject[sPropertyName])=="undefined")
{oObject[sPropertyName]=vValue;}};vp.core.requireArg=function(sName,vValue)
{if(typeof(vValue)=="undefined")
{throw new Error("The argument '"+sName+"' is required.");}
return vValue;};vp.core.getBoolean=function(v,bDefault)
{if(typeof(bDefault)=="undefined")
{bDefault=false;}
if(typeof(v)=="boolean")
{return v;}
if(!v)
{return bDefault;}
switch(v.toString().toLowerCase())
{case"yes":case"true":case"1":return true;default:return false;}};vp.core.getNumber=function(v,nDefault)
{if(typeof(nDefault)=="undefined")
{nDefault=0;}
if(typeof(v)=="boolean")
{return v?1:0;}
else if(typeof(v)=="undefined"||v===null||v==="")
{return nDefault;}
var nNum=new Number(v);if(nNum.valueOf()!=NaN)
{return nNum.valueOf();}
else
{return nDefault;}};vp.core.setObjectReference=function(oObj,oRef,sName)
{if(!window.__ObjRefs)
{window.__ObjRefs=[];}
var iRef=parseInt(vp.core.getAttribute(oObj,"__objrefid",-1));if(iRef<=-1)
{iRef=window.__ObjRefs.length;oObj.setAttribute("__objrefid",iRef.toString());window.__ObjRefs[iRef]={};}
window.__ObjRefs[iRef][sName]=oRef;};vp.core.getObjectReference=function(oObj,sName,oWindow)
{var oTargetWindow=oWindow||window;if(!oTargetWindow.__ObjRefs)
{return null;}
var iRef=parseInt(vp.core.getAttribute(oObj,"__objrefid",-1));if(iRef<=-1)
{return null;}
return oTargetWindow.__ObjRefs[iRef][sName];};vp.core.removeObjectReferenceAttribute=function(oObj,oWindow)
{var oTargetWindow=oWindow||window;if(!oTargetWindow.__ObjRefs)
{return;}
oObj.removeAttribute("__objrefid");};vp.core.clearClosures=function()
{var iLen=window.__objs.length;for(var i=0;i<iLen;i++)
{window.__objs[i]=null;window.__funs[i]=null;}};Function.prototype.getClosure=function(oScope)
{if(!window.__objs)
{window.__objs=[];window.__funs=[];}
var oFunction=this;var objId=oScope.__objId;if(!objId)
{window.__objs[objId=oScope.__objId=window.__objs.length]=oScope;}
var funId=oFunction.__funId;if(!funId)
{window.__funs[funId=oFunction.__funId=window.__funs.length]=oFunction;}
if(!oScope.__closures)
{oScope.__closures=[];}
var closure=oScope.__closures[funId];if(closure)
{return closure;}
oScope=null;oFunction=null;window.__objs[objId].__closures[funId]=function()
{return window.__funs[funId].apply(window.__objs[objId],arguments);};window.__objs[objId].__closures[funId].__isClosure=true;window.__objs[objId].__closures[funId].__funId=funId;window.__objs[objId].__closures[funId].__objId=objId;return window.__objs[objId].__closures[funId];};vp.core.getAttribute=function(oNode,sAttrName,vDefaultValue)
{if(!oNode.parsed&&!oNode.getAttribute)
{return vDefaultValue;}
var vValue=oNode.getAttribute(sAttrName);if(vValue===null||typeof(vValue)=="undefined")
{vValue=oNode[sAttrName];}
if(vValue===null||typeof(vValue)=="undefined")
{return vDefaultValue;}
else
{return vValue;}};