/* This source code is Copyright (c) Vibrant Media 2001-2009 and forms part of the patented Vibrant Media product "IntelliTXT" (sm). */ 
$iTXT.js.loader["$iTXT.core.Util"]=true;$iTXT.core.Util_Load=function()
{var undefined;$iTXT.core.Util={callbackID:0,args:function(args)
{var rA=[];for(var i=0;i<args.length;i++)
{rA[i]=args[i];}
return rA;},extend:function(dest,src)
{for(var p in src)
{if(undefined!=src[p])
{dest[p]=src[p];}}
return dest;},isElement:function(o)
{return!!(o&&o.nodeType==1);},isAttribute:function(o)
{return!!(o&&o.nodeType==2);},isTextNode:function(o)
{return!!(o&&(o.nodeType==3));},isCDATA:function(o)
{return!!(o&&(o.nodeType==4));},isDOMNode:function(o)
{return!!(o&&(this.isElement(o)||this.isAttribute(o)||this.isTextNode(o)||this.isCDATA(o)));},isFunc:function(o)
{return typeof o==="function";},isArray:function(o)
{return this.getClass(o)==="Array";},isString:function(o)
{return this.getClass(o)==="String";},isNumber:function(o)
{return!isNaN(o);},isObject:function(o)
{return this.getClass(o)==="Object";},isUndefined:function(o)
{return typeof o===typeof undefined;},isURL:function(s)
{if(!this.isString(s))
{return s;}
else
{var m=s.match("^(https?|mailto|ftp|wais|file|gopher|telnet)://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$");return(null==m)?false:true;}},cleanString:function(s)
{if(!this.isString(s))
{return s;}
else
{return s.replace(/\t/g,' ').replace(/(\n|\r|^\s+|\s+$)/g,'');}},getClass:function(o)
{return Object.prototype.toString.call(o).match(/^\[object\s(.*)\]$/)[1];},dropScript:function(src,loadFunc)
{if('string'!=typeof src||!src.match(/^http/)){return;}
try
{var newS=document.createElement('script');var cbFunc=this.callbackFunction(loadFunc,newS);if(src.indexOf('?')!=-1)
{src+="&jscallback="+cbFunc;}
else
{src+="?jscallback="+cbFunc;}
newS.src=src;newS.type='text/javascript';var b=document.getElementsByTagName('body')[0];b.insertBefore(newS,b.firstChild);}
catch(e)
{alert(e);}},callbackFunction:function(f,src)
{var cbName="callback"+(this.callbackID++);$iTXT.js[cbName]=function()
{if(f)
{if(src)
{f.apply(src);}
else
{f();}}}
return"$iTXT.js."+cbName;},getQueryParams:function(srcUrl)
{if(srcUrl.indexOf('?')==-1)
{return{};}
var params={};var qs=srcUrl.substring(srcUrl.indexOf('?')+1);var pairs=qs.split('&');for(var i=0;i<pairs.length;i++)
{var keyPair=pairs[i].split('=');if(keyPair.length==2)
{params[keyPair[0]]=unescape(keyPair[1]);}}
return params;},getScriptBySrc:function(srcUrl)
{var scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;i++)
{var s=scripts[i];if(s.src.indexOf(srcUrl)!=-1)
{return s;}}
return null;},getWindowSize:function()
{var vW;var vH;if(typeof window.innerWidth!='undefined')
{vW=window.innerWidth,vH=window.innerHeight}
else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0)
{vW=document.documentElement.clientWidth,vH=document.documentElement.clientHeight}
else
{vW=document.getElementsByTagName('body')[0].clientWidth,vH=document.getElementsByTagName('body')[0].clientHeight}
var rObj=[vW,vH];rObj.width=vW;rObj.height=vH;return rObj;},getPageScroll:function()
{var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return[scrOfX,scrOfY];},objValues:function(obj)
{var rA=[];for(key in obj)
{rA.push(obj[key]);}
return rA;},cacheImage:function(src)
{var im=new Image();im.src=src;},cacheImages:function(imgs)
{for(var i=0;i<imgs.length;i++)
{this.cacheImage(imgs[i]);}},serialise:function(object)
{return _iter(object,0);function _iter(obj,depth)
{var out='';if(!$iTXT.core.Util.isFunc(obj)&&!$iTXT.core.Util.isDOMNode(obj)&&($iTXT.core.Util.isObject(obj)||$iTXT.core.Util.isArray(obj)))
{var c=0;var k=[],nN=false;for(var n in obj)
{if(isNaN(n))
{nN=true;}
if(null!=obj[n]&&!$iTXT.core.Util.isFunc(obj[n]))
{k[k.length]=n;}}
if(nN)
{k=k.sort();}
for(var i=0;i<k.length;i++)
{var elem=k[i];var pass='';var name='';if(!$iTXT.core.Util.isNumber(elem))
{name+=elem+':';}
if($iTXT.core.Util.isArray(obj[elem]))
{next=_iter(obj[elem],(depth+1));if(''!=next)
{pass+=name+'['+next+']';}}
else if($iTXT.core.Util.isObject(obj[elem]))
{next=_iter(obj[elem],(depth+1));if(''!=next)
{pass+=name+'{'+next+'}';}}
else if($iTXT.core.Util.isNumber(obj[elem]))
{pass+=name+obj[elem];}
else if($iTXT.core.Util.isString(obj[elem]))
{var delim=(obj[elem].match(/(^{|^[).*(]$|}$)/))?'':'"';pass+=name+delim+obj[elem].replace(/"/g,'\"')+delim;}
if(c>0&&''!=pass&&''!=out)
{pass=','+pass;}
c++;out+=pass;}
if(0==depth)
{out='{'+out+'}';}}
return out;}},matchObjs:function(o1,o2,precision)
{if(null==precision||undefined==precision||isNaN(precision))
{precision=0;}
if(this.isObject(o1)&&this.isObject(o2))
{var res=false;for(var fld in o1)
{if(!this.isFunc(o1[fld]))
{if(o2[fld])
{var sub=(this.isObject(o1[fld]))?this.matchObjs(o1[fld],o2[fld],precision):(this.fuzzyMatch(o1[fld],o2[fld]));if(!sub)
{return sub;}
else
{res=sub;}}
else if(precision>=0)
{return false;}}}
if(precision>0)
{for(var fld in o2)
{if(!this.isFunc(o2[fld]))
{if(o1[fld])
{var sub=(this.isObject(o2[fld]))?this.matchObjs(o2[fld],o1[fld],precision):(this.fuzzyMatch(o2[fld],o1[fld]));if(!sub)
{return sub;}
else
{res=sub;}}
else
{return false;}}}}
return res;}
return false;},fuzzyMatch:function(s1,s2)
{if(!this.isString(s1)||!this.isString(s2))
{return false;}
s1='^'+(s1.replace(/\*/,'.*'))+'$';return(null!=s2.match(s1));}};}
$iTXT.js.loader["$iTXT.core.Builder"]=true;$iTXT.core.Builder_Load=function(){var undefined;$iTXT.core.Builder={NODEMAP:{AREA:'map',CAPTION:'table',COL:'table',COLGROUP:'table',LEGEND:'fieldset',OPTGROUP:'select',OPTION:'select',PARAM:'object',TBODY:'table',TD:'table',TFOOT:'table',TH:'table',THEAD:'table',TR:'table'},make:function(tagName,attributes,children)
{var tagName=tagName.toUpperCase();var apngMode=false;var apngSrc="";if("APNG"==tagName)
{tagName="IMG";if(window.ActiveXObject)
{apngMode=true;apngSrc=attributes.src;attributes.src="px.gif";}}
var parentTagName=this.NODEMAP[tagName]||'div';var parentTag=document.createElement(parentTagName);try{parentTag.innerHTML="<"+tagName+"></"+tagName+">";}catch(e){}
var element=parentTag.firstChild||null;if(element&&(element.tagName.toUpperCase()!=tagName))
element=element.getElementsByTagName(tagName)[0];if(!element)element=document.createElement(tagName);if(!element)return;if(attributes)
{var attrs=this._attributes(attributes);if(attrs.length){try{parentTag.innerHTML="<"+tagName+" "+attrs+"></"+tagName+">";}
catch(e){}
element=parentTag.firstChild||null;if(!element){element=document.createElement(tagName);for(attr in attributes)
element[attr]=attributes[attr];}
if(element.tagName.toUpperCase()!=tagName)
element=parentTag.getElementsByTagName(tagName)[0];}}
if(children)
{this._children(element,children);}
if(apngMode)
{element.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+apngSrc+"',sizingMethod='scale')";}
return $iTXT.core.$(element);},_isSorN:function(param)
{return $iTXT.core.Util.isString(param)||$iTXT.core.Util.isNumber(param);},_children:function(element,children)
{for(var i=0;i<children.length;i++)
{if(this._isSorN(children[i]))
{element.appendChild(document.createTextNode(children[i]));}
else
{element.appendChild(children[i]);}}},_attributes:function(attributes)
{var attrs=[];for(attribute in attributes)
{var an=(attribute=="className")?"class":attribute;attrs.push(an+'="'+attributes[attribute]+'"');}
return attrs.join(" ");}}}
$iTXT.js.loader["$iTXT.core.Class"]=true;$iTXT.core.Class_Load=function(){var undefined;$iTXT.core.Class={create:function()
{var parent=null;var properties=arguments[0];if($iTXT.core.Util.isFunc(properties))
{parent=properties;properties=arguments[1];}
function _newClass()
{this.init.apply(this,arguments);}
if(null!=parent)
{var parentClass=function(){};parentClass.prototype=parent.prototype
_newClass.prototype=new parentClass;}
for(p in properties)
{this._addProperty(_newClass,p,properties[p],parent);}
return _newClass;},_addProperty:function(_class,_property,_value,_parent)
{if($iTXT.core.Util.isFunc(_value)&&_parent&&undefined!=_parent.prototype[_property])
{var _oldValue=_value;_value=function()
{var _instance=this;var _newArgs=$iTXT.core.Util.args(arguments);var _super=function()
{_parent.prototype[_property].apply(_instance,arguments);}
_newArgs.push(_super)
_oldValue.apply(this,_newArgs);}}
_class.prototype[_property]=_value;}}}
$iTXT.js.loader["$iTXT.core.Dom"]=true;$iTXT.core.Dom_Load=function(){var undefined;$iTXT.core.$=function(elmt,dontExt)
{if($iTXT.core.Util.isString(elmt))
{elmt=document.getElementById(elmt);}
if(!elmt)
return null;if(dontExt||(elmt.itxt&&elmt.itxt.domExtended))
{return elmt;}
else
{elmt=$iTXT.core.Util.extend(elmt,$iTXT.core.Dom);elmt.itxt={};elmt.itxt.domExtended=true;return elmt;}}
$iTXT.core.Dom={iTXTEvents:{},itxtFire:function(type,data)
{$iTXT.core.Event.fire(this,type,data);return this;},itxtSubscribe:function(type,handler)
{$iTXT.core.Event.subscribe(this,type,handler);return this;},itxtUnSubscribe:function(type,handler)
{$iTXT.core.Event.unsubscribe(this,type,handler);return this;},itxtAddClass:function(addClass,removeClass)
{if(this.className)
{var cNs=this.className.split(' ');var newCNs=[];for(var i=0;i<cNs.length;i++)
{var cn=cNs[i];if(cn!=removeClass&&cn!=addClass)
{newCNs.push(cn);}}
newCNs.push(addClass);this.className=newCNs.join(' ');}
else
{this.className=addClass;}
return this;},itxtRemoveClass:function(removeClass)
{if(this.className)
{var cNs=this.className.split(' ');var newCNs=[];for(var i=0;i<cNs.length;i++)
{var cn=cNs[i];if(cn!=removeClass)
{newCNs.push(cn);}}
this.className=newCNs.join(' ');}
return this;},itxtSetStyle:function(styles)
{if($iTXT.core.Util.isString(styles))
{return this.style.cssText+=";"+styles;}
for(s in styles)
{this.style[s]=styles[s];}
return this;},itxtSetAttribute:function(atts)
{for(attribute in atts)
{this[attribute]=atts[attribute];}
return this;},itxtHide:function()
{if(this.style.display!="none")
{this.itxt.display=this.style.display||"";this.style.display="none";}
return this;},itxtShow:function()
{this.style.display=this.itxt.display||"";return this;},ixtOpacity:function(o)
{if(window.ActiveXObject)
{this.style['filter']="alpha(opacity="+Math.round(100*o)+");";}
else
{this.style.mozOpacity=o;this.style.opacity=o;}
return this;},itxtAppendChildren:function(children)
{for(child in children)
{this.appendChild(children[child]);}
return this;},itxtTotalOffset:function()
{var element=this;var t=0;var l=0;do
{if((element==document.body)&&("relative"!=element.style.position))
{l+=element.offsetLeft;t+=element.offsetTop;}
else if(element!=document.body)
{l+=element.offsetLeft;t+=element.offsetTop;}
element=element.offsetParent;}
while(element)
var retArr=[l,t];retArr.left=l;retArr.top=t;return retArr;},itxtBounds:function()
{var nOff=this.itxtTotalOffset();var b={left:nOff.left,top:nOff.top,width:this.offsetWidth,height:this.offsetHeight};return b;},Selector:$iTXT.core.Class.create({init:function(tag,id,className,attr,val)
{if(null!=tag&&$iTXT.core.Util.isString(tag)&&""!=tag)
{this.tag=tag;}
if(null!=id&&$iTXT.core.Util.isString(id)&&""!=id)
{this.id=id;}
if(null!=className&&$iTXT.core.Util.isString(className)&&""!=className)
{this.className=className;}
if(null!=attr&&$iTXT.core.Util.isString(attr)&&""!=attr)
{this.attr=attr;}
if(null!=val&&$iTXT.core.Util.isString(val)&&""!=val)
{this.val=val;}}}),parseSelector:function(selector,vmmode)
{var tag='',separator='',identifier='',value='',out=null;var PATTERN1=(vmmode)?/(\>|\!|\@)/:/(\#|\.)/;var PATTERN2=/\=/;if(selector.match(PATTERN1))
{separator=selector.match(PATTERN1)[0];var bits=selector.split(separator,2);if(vmmode)
{separator=separator.replace(/\>/,'#').replace(/\!\//,'.')}
tag=bits[0];identifier=bits[1];if(vmmode&&identifier.match(PATTERN2))
{var vsep=identifier.match(PATTERN2)[0];var vbits=identifier.split(vsep,2);identifier=vbits[0];value=vbits[1];}}
else
{tag=selector;}
if(vmmode)
{var id=null,className=null,attr=null,val=null;if(selector==tag)
{separator='#';identifier=selector;tag='';}
if(''!=tag)
{tag=tag.toLowerCase().replace(/\<|\>/,'')}
if(''!=identifier)
{switch(separator)
{case"#":id=identifier;break;case".":className=identifier;break;case"@":attr=identifier;if(''!=value)
{val=value;}
break;}}
out=new $iTXT.core.Dom.Selector(tag,id,className,attr,val);}
else
{out=[tag.toLowerCase(),separator,identifier];}
return out;},matchSelectors:function(o1,o2,precision)
{return $iTXT.core.Util.matchObjs(o1,o2,precision);},findSelector:function(needle,haystack,precision,retIndex)
{var nA=[];if(!$iTXT.core.Util.isArray(needle))
{nA[nA.length]=needle;}
else
{nA=needle;}
var hA=[];if(!$iTXT.core.Util.isArray(haystack))
{hA[hA.length]=haystack;}
else
{hA=haystack;}
for(var i=0;i<nA.length;i++)
{for(var j=0;j<hA.length;j++)
{if(this.matchSelectors(nA[i],hA[j],precision))
{return(retIndex)?j:true;}}}
return(retIndex)?-1:false;},extractAttrs:function(elem)
{var out={};if($iTXT.core.Util.isElement(elem)&&elem.attributes)
{for(var i=0;i<elem.attributes.length;i++)
{var attr=elem.attributes[i];if("id"!=attr.nodeName&&"class"!=attr.nodeName)
{out[attr.nodeName]=attr.nodeValue;}}}
return out;},parseVMNode:function(inp)
{var outA=[];if(null!=inp)
{if(!$iTXT.core.Util.isArray(inp))
{inp=[inp];}
for(var i=0;i<inp.length;i++)
{var sel=this.parseSelector(inp[i],true);if(sel instanceof $iTXT.core.Dom.Selector)
{outA[outA.length]=sel;}}}
if(outA.length==1)
{return outA[0];}
else
{return outA;}},parseElement:function(inp,attrMode)
{var inA=[],outA=[];if($iTXT.core.Util.isElement(inp))
{inA[inA.length]=inp;}
else
{inA=inp;}
for(var i=0;i<inA.length;i++)
{var elem=inA[i];if($iTXT.core.Util.isElement(elem))
{if(attrMode)
{var attrs=this.extractAttrs(elem);for(var aName in attrs)
{outA[outA.length]=new $iTXT.core.Dom.Selector(elem.tagName.toLowerCase(),elem.id,elem.className,aName,attrs[aName]);}}
if(!attrMode||outA.length==0)
{outA[outA.length]=new $iTXT.core.Dom.Selector(elem.tagName.toLowerCase(),elem.id,elem.className);}}}
if(outA.length==1)
{return outA[0];}
else
{return outA;}},getInnerText:function(node,maxD,currD)
{if(null==maxD||$iTXT.core.Util.isUndefined(maxD)||!$iTXT.core.Util.isNumber(maxD))
{maxD=-1;}
if(null==currD||$iTXT.core.Util.isUndefined(currD)||!$iTXT.core.Util.isNumber(currD))
{currD=0;}
currD++;if(!node.itxtIT&&(maxD<0||maxD>=currD))
{try
{node.itxtIT=1;}
catch(x)
{}
if($iTXT.core.Util.isTextNode(node))
{return $iTXT.core.Util.cleanString(node.nodeValue);}
else if($iTXT.core.Util.isElement(node))
{var out='',children=node.childNodes;for(var i=0;i<children.length;i++)
{out+=' '+this.getInnerText(children[i],maxD,currD);}
return $iTXT.core.Util.cleanString(out);}}
return'';}}}
$iTXT.js.loader["$iTXT.core.Event"]=true;$iTXT.core.Event_Load=function(){var undefined;$iTXT.core.Event={bind:function(source,func)
{return function()
{func.apply(source,arguments);}},nsUID:0,subscribe:function(elmt,type,handler)
{elmt=$iTXT.core.$(elmt);var eventName=type;var eventUID=type;if(type.indexOf('.')!=-1)
{var splt=type.split('.');eventName=splt.pop();}
else
{eventUID="evt"+this.nsUID+++"."+eventName;}
var custom=eventName.charAt(0)=='$';if(custom)
{}
else
{var intHandler=function(e)
{var newE=e||event;handler.apply(elmt,[newE]);};if(elmt.addEventListener)
elmt.addEventListener(eventName,intHandler,false);else if(elmt.attachEvent)
elmt.attachEvent("on"+eventName,intHandler);}
this._addEvt(elmt,eventName,eventUID,handler);},_addEvt:function(elmt,eventName,eventUID,handler)
{var handlers=elmt.iTXTEvents[eventName]||{};handlers[eventUID]=handler;elmt.iTXTEvents[eventName]=handlers;},_removeEvt:function(elmt,eventName,eventUID)
{var handlers=elmt.iTXTEvents[eventName]||{};var newHandlers={};for(handler in handlers)
{if(handler!=eventUID)
{newHandlers[handler]=handlers[handler];}}
elmt.iTXTEvents[eventName]=newHandlers;},unsubscribe:function(elmt,eventUID,handler)
{elmt=$iTXT.core.$(elmt);var eventName=eventUID;if(eventUID.indexOf('.')!=-1)
{var splt=eventUID.split('.');eventName=splt.pop();}
var custom=eventName.charAt(0)=='$';this._removeEvt(elmt,eventName,eventUID);},fire:function(elmt,eventName,data)
{elmt=$iTXT.core.$(elmt);var custom=eventName.charAt(0)=='$';var handlers=elmt.iTXTEvents[eventName]||{};var event={data:data||{}}
for(handler in handlers)
{if($iTXT.core.Util.isFunc(handlers[handler]))
{handlers[handler].apply(elmt,[event]);}}},preventDefault:function(e)
{if(e&&e.preventDefault)e.preventDefault();else if(window.event)window.event.returnValue=false;},stop:function(e)
{if(e&&e.stopPropagation)e.stopPropagation();else if(window.event)window.event.cancelBubble=true;}}}
$iTXT.js.loader["$iTXT.core.Math"]=true;$iTXT.core.Math_Load=function(){var undefined;$iTXT.core.Math={intersects:function(r1,r2)
{var l=(r1.left>r2.left)?r1.left:r2.left;var t=(r1.top>r2.top)?r1.top:r2.top;var r=((r1.left+r1.width)<(r2.left+r2.width))?(r1.left+r1.width):(r2.left+r2.width);var b=((r1.top+r1.height)<(r2.top+r2.height))?(r1.top+r1.height):(r2.top+r2.height);return(l<r&&t<b);},intersectsPercentage:function(r1,r2)
{var l=(r1.left>r2.left)?r1.left:r2.left;var t=(r1.top>r2.top)?r1.top:r2.top;var r=((r1.left+r1.width)<(r2.left+r2.width))?(r1.left+r1.width):(r2.left+r2.width);var b=((r1.top+r1.height)<(r2.top+r2.height))?(r1.top+r1.height):(r2.top+r2.height);if(l<r&&t<b)
{var w=r-l;var h=b-t;var area=w*h;var r1Area=r1.width*r1.height;return area/r1Area;}
return 0;}}}
