<!--All contents is copyright 2008-2010 Xcentre.net and their respective owner.All Rights Reserved.-->
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function MM_preloadImages(){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];}}}
var fader={}
fader.baseopacity=0
fader.increment=0.2
document.write('<style type="text/css">\n')
document.write('.fader{filter:progid:DXImageTransform.Microsoft.alpha(opacity='+fader.baseopacity*100+'); -moz-opacity:'+fader.baseopacity+'; opacity:'+fader.baseopacity+';}\n')
document.write('</style>')
fader.setopacity=function(obj,value){var targetobject=obj
if(targetobject&&targetobject.filters&&targetobject.filters[0]){if(typeof targetobject.filters[0].opacity=="number")
targetobject.filters[0].opacity=value*100
else
targetobject.style.filter="alpha(opacity="+value*100+")"}
else if(targetobject&&typeof targetobject.style.MozOpacity!="undefined")
targetobject.style.MozOpacity=value
else if(targetobject&&typeof targetobject.style.opacity!="undefined")
targetobject.style.opacity=value
targetobject.currentopacity=value}
fader.fadeupdown=function(obj,direction){var targetobject=obj
var fadeamount=(direction=="fadeup")?this.increment:-this.increment
if(targetobject&&(direction=="fadeup"&&targetobject.currentopacity<1||direction=="fadedown"&&targetobject.currentopacity>this.baseopacity)){this.setopacity(obj,targetobject.currentopacity+fadeamount)
window["opacityfader"+obj._fadeorder]=setTimeout(function(){fader.fadeupdown(obj,direction)},50)}}
fader.clearTimer=function(obj){if(typeof window["opacityfader"+obj._fadeorder]!="undefined")
clearTimeout(window["opacityfader"+obj._fadeorder])}
fader.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}
fader.fadeinterface=function(obj,e,direction){if(!this.isContained(obj,e)){fader.clearTimer(obj)
fader.fadeupdown(obj,direction)}}
fader.collectElementbyClass=function(classname){var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)","i")
var pieces=[]
var alltags=document.all?document.all:document.getElementsByTagName("*")
for(var i=0;i<alltags.length;i++){if(typeof alltags[i].className=="string"&&alltags[i].className.search(classnameRE)!=-1)
pieces[pieces.length]=alltags[i]}
return pieces}
fader.init=function(){var targetobjects=this.collectElementbyClass("fader")
for(var i=0;i<targetobjects.length;i++){targetobjects[i]._fadeorder=i
this.setopacity(targetobjects[i],this.baseopacity)
targetobjects[i].onmouseover=function(e){fader.fadeinterface(this,e,"fadeup")}
targetobjects[i].onmouseout=function(e){fader.fadeinterface(this,e,"fadedown")}}}
var fadebgcolor="#f7f7f7"
var fadearray=new Array()
var fadeclear=new Array()
var dom=(document.getElementById)
var iebrowser=document.all
function fadeshow(theimages,fadewidth,fadeheight,borderwidth,delay,pause,displayorder){this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if(typeof displayorder!="undefined")
theimages.sort(function(){return 0.5-Math.random();})
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array()
for(p=0;p<theimages.length;p++){this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]}
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
if(iebrowser&&dom||dom)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
if(iebrowser&&dom||dom)
this.startit()
else{this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()",this.delay)}}
function fadepic(obj){if(obj.degree<100){obj.degree+=10
if(obj.tempobj.filters&&obj.tempobj.filters[0]){if(typeof obj.tempobj.filters[0].opacity=="number")
obj.tempobj.filters[0].opacity=obj.degree
else
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"}
else if(obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if(obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if(obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101}
else{clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")?obj.canvasbase+"_0":obj.canvasbase+"_1"
obj.tempobj=iebrowser?iebrowser[obj.nextcanvas]:document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj,obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)?obj.nextimageindex+1:0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()",obj.delay)}}
fadeshow.prototype.populateslide=function(picobj,picindex){var slideHTML=""
if(this.theimages[picindex][1]!="")
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if(this.theimages[picindex][1]!="")
slideHTML+='</a>'
picobj.innerHTML=slideHTML}
fadeshow.prototype.rotateimage=function(){if(this.pausecheck==1)
var cacheobj=this
if(this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()},100)
else if(iebrowser&&dom||dom){this.resetit()
var crossobj=this.tempobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")?this.canvasbase+"_1":this.canvasbase+"_0"}
else{var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src}
this.curimageindex=(this.curimageindex<this.postimages.length-1)?this.curimageindex+1:0}
fadeshow.prototype.resetit=function(){this.degree=10
var crossobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas)
if(crossobj.filters&&crossobj.filters[0]){if(typeof crossobj.filters[0].opacity=="number")
crossobj.filters(0).opacity=this.degree
else
crossobj.style.filter="alpha(opacity="+this.degree+")"}
else if(crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if(crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if(crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101}
fadeshow.prototype.startit=function(){var crossobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas)
this.populateslide(crossobj,this.curimageindex)
if(this.pausecheck==1){var cacheobj=this
var crossobjcontainer=iebrowser?iebrowser["master"+this.slideshowid]:document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}}
this.rotateimage()}<!--
function s(txt){self.status=txt;}
d=document;w=window;function installTip()
{if(d.layers)return;writeTip('tipDiv');if(d.addEventListener)
{d.addEventListener("mousemove",mouseMove,false);d.addEventListener("mouseover",mouseOverOut,false);d.addEventListener("mouseout",mouseOverOut,false);}
else
{d.onmousemove=mouseMove;d.onmouseout=mouseOverOut;d.onmouseover=mouseOverOut;}}
function mouseMove(e)
{if(w.tip)
{tip.mouseMove(e);}}
function mouseOverOut(e)
{if(!w.tip)return;if(typeof(e)=="undefined")
{e=event;}
var obj=e.srcElement?e.srcElement:e.target;if((obj.tagName.toLowerCase()=="img"||obj.tagName.toLowerCase()=="span")&&obj.parentNode.tagName.toLowerCase()=="a")
{obj=obj.parentNode;}
if(obj.tagName&&obj.tagName.toLowerCase()=="a"&&!obj.notip)
{if(e.type=="mouseover"&&obj.title)
{tip.show(obj.title);backupTitle=obj.title;obj.title='';}
else if(e.type=="mouseout"&&obj.title==''&&typeof(backupTitle)!="undefined"&&backupTitle!='')
{tip.hide();obj.title=backupTitle;backupTitle='';}}}
function writeTip(divName)
{d.write('<div id="'+divName+'" style="position: absolute; visibility: hidden; top: 0px; left: 0px; ');d.write('filter: alpha(opacity=100); -moz-opacity: 0; z-index: 37"><div id="tipText"></div></div>');}
function uberToolTip(id,delay)
{this.id=id||"tipDiv";this.textId="tipText";this.mouseX=0;this.mouseY=0;this.doit=false;this.obj=null;this.textObj=null;this.fader=null;this.delay=delay||40;this.max=85;this.getMouseX=function()
{var coords=this.getScrollCoords();return this.mouseX+(d.all?coords[0]:0);}
this.getMouseY=function()
{var coords=this.getScrollCoords();return this.mouseY+(d.all?coords[1]:0);}
this.show=function(html)
{if(w.opera)return;this.doit=true;if(this.fader)
{this.fader.setTrans(0);this.fader.fadeIn();}
this.update();wdivo(this.textObj,html);sdivo(this.obj);}
this.update=function()
{var left=this.getMouseX()+13;var top=this.getMouseY()+(d.all?20:15);if(this.obj.offsetWidth)
{var w=this.getWinCoords();var s=this.getScrollCoords();var winb=w[1]+s[1];var winr=w[0]+s[0];if(top+parseInt(this.obj.offsetHeight)>winb)
{top=winb-this.obj.offsetHeight;}
if(left+parseInt(this.obj.offsetWidth)>winr-10)
{left=winr-this.obj.offsetWidth-10;}}
this.obj.style.left=left+"px";this.obj.style.top=top+"px";}
this.getWinCoords=function()
{var wx,hx;if(w.innerHeight)
{wx=w.innerWidth;hx=w.innerHeight;}
else if(d.documentElement&&d.documentElement.clientHeight!=0)
{wx=d.documentElement.clientWidth;hx=d.documentElement.clientHeight;}
else if(d.body&&d.body.clientHeight)
{wx=d.body.clientWidth;hx=d.body.clientHeight;}
return[wx,hx];}
this.getScrollCoords=function()
{var x=0,y=0;if(typeof(w.pageYOffset)=="number")
{y=w.pageYOffset;x=w.pageXOffset;}
else if(d.documentElement&&d.documentElement.clientWidth!=0)
{y=d.documentElement.scrollTop;x=d.documentElement.scrollLeft;}
else if(d.body&&typeof(d.body.scrollLeft)!="undefined")
{y=d.body.scrollTop;x=d.body.scrollLeft;}
return[x,y];}
this.hide=function()
{if(w.opera)return;hdivo(this.obj);this.doit=false;if(this.fader)this.fader.setTrans(0);this.obj.style.left=this.obj.style.top=0;wdivo(this.textObj,"");}
this.init=function()
{if(d.layers||w.opera)return;this.obj=d.getElementById(this.id);this.textObj=d.getElementById(this.textId);if(!this.obj)
{return;}
this.loaded=true;if(w.ckapi&&(d.all||(d.getElementById&&d.addEventListener)))
{this.fader=new ckapi(this.id,this.delay,this.max);this.fader.setTrans(0);}}
this.mouseMove=function(e)
{var x,y;if(w.event)
{x=event.clientX
y=event.clientY}
else
{x=e.pageX;y=e.pageY+10;}
this.mouseX=x;this.mouseY=y;if(this.obj&&this.doit)this.update();}
return this;}
if(!d.getElementById&&d.all)
{d.getElementById=function(id){return d.all[id]}}
function sdivo(l){l.style.visibility="visible";}
function hdivo(l){l.style.visibility="hidden";}
function wdivo(l,html){if(typeof(l.innerHTML)!="undefined")
{html=html.replace(/&/,"&amp;");l.innerHTML=html;}}
function loadTip()
{tip=new uberToolTip(null,10);tip.init();}
function ckapi(id,fDelay,sTrans)
{this.obj="ckapiObj"+ckapi.count++;eval(this.obj+" = this");this.layerObj=d.getElementById(id);this.delay=fDelay;this.start=sTrans;this.delta=10;this.setTrans=function(trans)
{if(trans>100)
{trans=100;}
if(this.layerObj.filters)
{this.layerObj.filters.alpha.opacity=trans;}
if(!d.all&&this.layerObj.style.setProperty)
{this.layerObj.style.setProperty("-moz-opacity",trans/100,"");}}
this.getTrans=function()
{if(d.all)
{if(typeof(this.layerObj.filters.alpha.opacity)!="undefined")
{return this.layerObj.filters.alpha.opacity;}}
else if(this.layerObj.style.getPropertyValue)
{return this.layerObj.style.getPropertyValue("-moz-opacity")*100;}
return 100;}
this.fadeIn=function()
{if(!this.layerObj)return;clearTimeout(this.timer);var trans=this.getTrans();if(trans<this.start)
{this.setTrans(trans+this.delta);this.timer=setTimeout(this.obj+".fadeIn()",this.delay);}}
return this;}
ckapi.count=0;installTip();var xtabssettings={}
xtabssettings.bustcachevar=1
xtabssettings.loadstatustext="<img src='http://www.xcentre.net/wp-content/themes/xcentre/images/loading.gif' /> Requesting content..."
function xtabs(tabinterfaceid,contentdivid){this.tabinterfaceid=tabinterfaceid
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a")
this.enabletabpersistence=true
this.hottabspositions=[]
this.currentTabIndex=0
this.contentdivid=contentdivid
this.defaultHTML=""
this.defaultIframe='<iframe src="about:blank" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" class="tabcontentiframe" style="width:100%; height:auto; min-height: 100px"></iframe>'
this.defaultIframe=this.defaultIframe.replace(/<iframe/i,'<iframe name="'+"_xtabsiframe-"+contentdivid+'" ')
this.revcontentids=[]
this.selectedClassTarget="link"}
xtabs.connect=function(pageurl,tabinstance){var page_request=false
var bustcacheparameter=""
if(window.ActiveXObject){try{page_request=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){try{page_request=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e){}}}
else if(window.XMLHttpRequest)
page_request=new XMLHttpRequest()
else
return false
var ajaxfriendlyurl=pageurl.replace(/^http:\/\/[^\/]+\//i,"http://"+window.location.hostname+"/")
page_request.onreadystatechange=function(){xtabs.loadpage(page_request,pageurl,tabinstance)}
if(xtabssettings.bustcachevar)
bustcacheparameter=(ajaxfriendlyurl.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()
page_request.open('GET',ajaxfriendlyurl+bustcacheparameter,true)
page_request.send(null)}
xtabs.loadpage=function(page_request,pageurl,tabinstance){var divId=tabinstance.contentdivid
document.getElementById(divId).innerHTML=xtabssettings.loadstatustext
if(page_request.readyState==4&&(page_request.status==200||window.location.href.indexOf("http")==-1)){document.getElementById(divId).innerHTML=page_request.responseText
xtabs.ajaxpageloadaction(pageurl,tabinstance)}}
xtabs.ajaxpageloadaction=function(pageurl,tabinstance){tabinstance.onajaxpageload(pageurl)}
xtabs.getCookie=function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return""}
xtabs.setCookie=function(name,value){document.cookie=name+"="+value+";path=/"}
xtabs.prototype={expandit:function(tabid_or_position){this.cancelautorun()
var tabref=""
try{if(typeof tabid_or_position=="string"&&document.getElementById(tabid_or_position).getAttribute("rel"))
tabref=document.getElementById(tabid_or_position)
else if(parseInt(tabid_or_position)!=NaN&&this.tabs[tabid_or_position].getAttribute("rel"))
tabref=this.tabs[tabid_or_position]}
catch(err){alert("Invalid Tab ID or position entered!")}
if(tabref!="")
this.expandtab(tabref)},cycleit:function(dir,autorun){if(dir=="next"){var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0}
else if(dir=="prev"){var currentTabIndex=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1}
if(typeof autorun=="undefined")
this.cancelautorun()
this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])},setpersist:function(bool){this.enabletabpersistence=bool},loadajaxpage:function(pageurl){xtabs.connect(pageurl,this)},loadiframepage:function(pageurl){this.iframedisplay(pageurl,this.contentdivid)},setselectedClassTarget:function(objstr){this.selectedClassTarget=objstr||"link"},getselectedClassTarget:function(tabref){return(this.selectedClassTarget==("linkparent".toLowerCase()))?tabref.parentNode:tabref},urlparamselect:function(tabinterfaceid){var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)","i"))
return(result==null)?null:parseInt(RegExp.$1)},onajaxpageload:function(pageurl){},expandtab:function(tabref){var relattrvalue=tabref.getAttribute("rel")
var associatedrevids=(tabref.getAttribute("rev"))?","+tabref.getAttribute("rev").replace(/\s+/,"")+",":""
if(relattrvalue=="#default")
document.getElementById(this.contentdivid).innerHTML=this.defaultHTML
else if(relattrvalue=="#iframe")
this.iframedisplay(tabref.getAttribute("href"),this.contentdivid)
else
xtabs.connect(tabref.getAttribute("href"),this)
this.expandrevcontent(associatedrevids)
for(var i=0;i<this.tabs.length;i++){this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("href")==tabref.getAttribute("href"))?"selected":""}
if(this.enabletabpersistence)
xtabs.setCookie(this.tabinterfaceid,tabref.tabposition)
this.setcurrenttabindex(tabref.tabposition)},iframedisplay:function(pageurl,contentdivid){if(typeof window.frames["_xtabsiframe-"+contentdivid]!="undefined"){try{delete window.frames["_xtabsiframe-"+contentdivid]}
catch(err){}}
document.getElementById(contentdivid).innerHTML=this.defaultIframe
window.frames["_xtabsiframe-"+contentdivid].location.replace(pageurl)},expandrevcontent:function(associatedrevids){var allrevids=this.revcontentids
for(var i=0;i<allrevids.length;i++){document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)?"block":"none"}},setcurrenttabindex:function(tabposition){for(var i=0;i<this.hottabspositions.length;i++){if(tabposition==this.hottabspositions[i]){this.currentTabIndex=i
break}}},autorun:function(){this.cycleit('next',true)},cancelautorun:function(){if(typeof this.autoruntimer!="undefined")
clearInterval(this.autoruntimer)},init:function(automodeperiod){var persistedtab=xtabs.getCookie(this.tabinterfaceid)
var selectedtab=-1
var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid)
this.automodeperiod=automodeperiod||0
this.defaultHTML=document.getElementById(this.contentdivid).innerHTML
for(var i=0;i<this.tabs.length;i++){this.tabs[i].tabposition=i
if(this.tabs[i].getAttribute("rel")){var tabinstance=this
this.hottabspositions[this.hottabspositions.length]=i
this.tabs[i].onclick=function(){tabinstance.expandtab(this)
tabinstance.cancelautorun()
return false}
if(this.tabs[i].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))}
if(selectedtabfromurl==i||this.enabletabpersistence&&selectedtab==-1&&parseInt(persistedtab)==i||!this.enabletabpersistence&&selectedtab==-1&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){selectedtab=i}}}
if(selectedtab!=-1)
this.expandtab(this.tabs[selectedtab])
else
this.expandtab(this.tabs[this.hottabspositions[0]])
if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.autoruntimer=setInterval(function(){tabinstance.autorun()},this.automodeperiod)}}}
function ddpanel(setting){setting.dir="up"
if(setting.stateconfig.persiststate&&ddpanel.getCookie(setting.ids[0])=="down"){setting.dir="down"}
if(setting.dir=="up"){document.write('<style type="text/css">\n')
document.write('#'+setting.ids[1]+'{height:'+parseInt(setting.stateconfig.initial)+'px; overflow:hidden}\n')
document.write('</style>\n')}
setting.stateconfig.initial=parseInt(setting.stateconfig.initial)
this.setting=setting
var thispanel=this
if(window.addEventListener)
ddpanel.addEvent(window,function(e){thispanel.initpanel(setting)},"load")
else
ddpanel.addEvent(window,function(e){setTimeout(function(){thispanel.initpanel(setting)},100)},"load")
ddpanel.addEvent(window,function(e){thispanel.uninit(setting)},"unload")}
ddpanel.events_array=[]
ddpanel.addEvent=function(target,functionref,tasktype){var evtmodel=target.addEventListener?"w3c":"ie"
var evtaction=evtmodel=="w3c"?"addEventListener":"attachEvent"
var i=this.events_array.push({target:target,tasktype:(evtmodel=="ie"?"on":"")+tasktype,listener:evtmodel=="ie"?function(){return functionref.call(target,window.event)}:functionref})-1
target[evtaction](this.events_array[i].tasktype,this.events_array[i].listener,evtmodel=="w3c"?false:null)}
ddpanel.removeEvent=function(target,functionref,tasktype){var evtmodel=target.removeEventListener?"w3c":"ie"
var evtaction=evtmodel=="w3c"?"removeEventListener":"detachEvent"
target[evtaction](tasktype,functionref,evtmodel=="w3c"?false:null)}
ddpanel.getCookie=function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return null}
ddpanel.setCookie=function(name,value){document.cookie=name+"="+value+";path=/"}
ddpanel.addpointer=function(target,className,imagesrc){var pointer=document.createElement("img")
pointer.src=imagesrc
pointer.className=className
pointer.style.borderWidth=0
target.appendChild(pointer)
return pointer}
ddpanel.prototype={togglepanel:function(dir){var setting=this.setting
setting.dir=dir||((setting.dir=="up")?"down":"up")
var pcontent=setting.pcontent,dir=setting.dir
pcontent._currentheight=(dir=="down")?pcontent._actualheight:setting.stateconfig.initial
pcontent.style.height=pcontent._currentheight+"px"
if(setting.pointerimage.enabled){setting.arrow.src=setting.pointerimage.src[(setting.dir=="down")?1:0]
setting.arrow.style.visibility="visible"}
ddpanel.setCookie(setting.ids[0],setting.dir)},togglepanelplus:function(dir){var setting=this.setting
setting.dir=dir||((setting.dir=="up")?"down":"up")
if(setting.pointerimage.enabled)
setting.arrow.style.visibility="hidden"
clearTimeout(setting.revealtimer)
this.revealcontent()},revealcontent:function(){var setting=this.setting
var pcontent=setting.pcontent,curH=pcontent._currentheight,maxH=pcontent._actualheight,minH=setting.stateconfig.initial,steps=setting.animate.steps,dir=setting.dir
if(dir=="down"&&curH<maxH||dir=="up"&&curH>minH){var newH=curH+(Math.round((maxH-curH)/steps)+1)*(dir=="up"?-1:1)
newH=(dir=="down")?Math.min(maxH,newH):Math.max(minH,newH)
pcontent.style.height=newH+"px"
pcontent._currentheight=newH}
else{if(setting.pointerimage.enabled){setting.arrow.src=setting.pointerimage.src[(setting.dir=="down")?1:0]
setting.arrow.style.visibility="visible"}
return}
var thispanel=this
setting.revealtimer=setTimeout(function(){thispanel.revealcontent()},10)},initpanel:function(){var setting=this.setting
var pcontainer=setting.pcontainer=document.getElementById(setting.ids[0])
var pcontent=setting.pcontent=document.getElementById(setting.ids[1])
var tdiv=setting.tdiv=document.getElementById(setting.ids[2])
pcontent.style.overflow="scroll"
pcontent._actualheight=pcontent.scrollHeight
setTimeout(function(){pcontent._actualheight=pcontent.scrollHeight},100)
pcontent.style.overflow="hidden"
pcontent._currentheight=(setting.dir=="down")?pcontent._actualheight:setting.stateconfig.initial
var thispanel=this
ddpanel.addEvent(tdiv,function(e){if(setting.animate.enabled)
thispanel.togglepanelplus()
else
thispanel.togglepanel()
if(e.preventDefault)e.preventDefault()
return false},"click")
if(setting.pointerimage.enabled){var pointer1=new Image(),pointer2=new Image()
pointer1.src=setting.pointerimage.src[0]
pointer2.src=setting.pointerimage.src[1]
setting.arrow=ddpanel.addpointer(tdiv.getElementsByTagName("span")[0],"pointerimage",setting.pointerimage.src[setting.dir=="down"?1:0])}
if(setting.closepanelonclick.enabled){ddpanel.addEvent(pcontent,function(e){var target=e.srcElement||e.target
if(/(^|\s+)closepanel($|\s+)/.test(target.className)||target.tagName=="A"||(target.parentNode&&target.parentNode.tagName=="A")){thispanel.togglepanel("up")}},"click")}},uninit:function(){var setting=this.setting
if(setting.stateconfig.persiststate){ddpanel.setCookie(setting.ids[0],setting.dir)}
for(prop in setting){setting[prop]=null}}}