/*
files includ :: tabcontent.js, contentslider.js
*/
/***********************************************
* Featured Content Slider- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
// Content Slider script
var featuredcontentslider={ajaxloadingmsg:'<div class="ajeximg">Fetching slider Contents. Please wait...</div>',bustajaxcache:true,enablepersist:true,settingcaches:{},jumpTo:function(fcsid,pagenumber){this.turnpage(this.settingcaches[fcsid],pagenumber)},ajaxconnect:function(setting){var page_request=false
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 pageurl=setting.contentsource[1]
page_request.onreadystatechange=function(){featuredcontentslider.ajaxpopulate(page_request,setting)}
document.getElementById(setting.id).innerHTML=this.ajaxloadingmsg
var bustcache=(!this.bustajaxcache)?"":(pageurl.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()
page_request.open('GET',pageurl+bustcache,true)
page_request.send(null)},ajaxpopulate:function(page_request,setting){if(page_request.readyState==4&&(page_request.status==200||window.location.href.indexOf("http")==-1)){document.getElementById(setting.id).innerHTML=page_request.responseText
this.buildpaginate(setting)}},buildcontentdivs:function(setting){var alldivs=document.getElementById(setting.id).getElementsByTagName("div")
for(var i=0;i<alldivs.length;i++){if(this.css(alldivs[i],"contentdiv","check")){setting.contentdivs.push(alldivs[i])
alldivs[i].style.display="none"}}},buildpaginate:function(setting){this.buildcontentdivs(setting)
var sliderdiv=document.getElementById(setting.id)
var pdiv=document.getElementById("paginate-"+setting.id)
var phtml=""
var toc=setting.toc
var nextprev=setting.nextprev
if(typeof toc=="string"&&toc!="markup"||typeof toc=="object"){for(var i=1;i<=setting.contentdivs.length;i++){phtml+='<a href="#'+i+'" class="toc">'+(typeof toc=="string"?toc.replace(/#increment/,i):toc[i-1])+'</a>'}
phtml='<span class="navdots">'+phtml+'</span>'+'<span class="next-prev-btn">'+(nextprev[0]!=''?'<a href="#prev" class="prev">'+nextprev[0]+'</a> ':'')+(nextprev[1]!=''?'<a href="#next" class="next">'+nextprev[1]+'</a>':'')+'</span>'
pdiv.innerHTML=phtml}
var pdivlinks=pdiv.getElementsByTagName("a")
var toclinkscount=0
for(var i=0;i<pdivlinks.length;i++){if(this.css(pdivlinks[i],"toc","check")){if(toclinkscount>setting.contentdivs.length-1){pdivlinks[i].style.display="none"
continue}
pdivlinks[i].setAttribute("rel",++toclinkscount)
pdivlinks[i][setting.revealtype]=function(){featuredcontentslider.turnpage(setting,this.getAttribute("rel"))
return false}
setting.toclinks.push(pdivlinks[i])}
else if(this.css(pdivlinks[i],"prev","check")||this.css(pdivlinks[i],"next","check")){pdivlinks[i].onclick=function(){featuredcontentslider.turnpage(setting,this.className)
return false}}}
this.turnpage(setting,setting.currentpage,true)
if(setting.autorotate[0]){pdiv[setting.revealtype]=function(){featuredcontentslider.cleartimer(setting,window["fcsautorun"+setting.id])}
sliderdiv["onclick"]=function(){featuredcontentslider.cleartimer(setting,window["fcsautorun"+setting.id])}
setting.autorotate[1]=setting.autorotate[1]+(1/setting.enablefade[1]*50)
this.autorotate(setting)}},urlparamselect:function(fcsid){var result=window.location.search.match(new RegExp(fcsid+"=(\\d+)","i"))
return(result==null)?null:parseInt(RegExp.$1)},turnpage:function(setting,thepage,autocall){var currentpage=setting.currentpage
var totalpages=setting.contentdivs.length
var turntopage=(/prev/i.test(thepage))?currentpage-1:(/next/i.test(thepage))?currentpage+1:parseInt(thepage)
turntopage=(turntopage<1)?totalpages:(turntopage>totalpages)?1:turntopage
if(turntopage==setting.currentpage&&typeof autocall=="undefined")
return
setting.currentpage=turntopage
setting.contentdivs[turntopage-1].style.zIndex=++setting.topzindex
this.cleartimer(setting,window["fcsfade"+setting.id])
setting.cacheprevpage=setting.prevpage
if(setting.enablefade[0]==true){setting.curopacity=0
this.fadeup(setting)}
if(setting.enablefade[0]==false){setting.contentdivs[setting.prevpage-1].style.display="none"
setting.onChange(setting.prevpage,setting.currentpage)}
setting.contentdivs[turntopage-1].style.visibility="visible"
setting.contentdivs[turntopage-1].style.display="block"
if(setting.prevpage<=setting.toclinks.length)
this.css(setting.toclinks[setting.prevpage-1],"selected","remove")
if(turntopage<=setting.toclinks.length)
this.css(setting.toclinks[turntopage-1],"selected","add")
setting.prevpage=turntopage
if(this.enablepersist)
this.setCookie("fcspersist"+setting.id,turntopage)},setopacity:function(setting,value){var targetobject=setting.contentdivs[setting.currentpage-1]
if(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(typeof targetobject.style.MozOpacity!="undefined")
targetobject.style.MozOpacity=value
else if(typeof targetobject.style.opacity!="undefined")
targetobject.style.opacity=value
setting.curopacity=value},fadeup:function(setting){if(setting.curopacity<1){this.setopacity(setting,setting.curopacity+setting.enablefade[1])
window["fcsfade"+setting.id]=setTimeout(function(){featuredcontentslider.fadeup(setting)},50)}
else{if(setting.cacheprevpage!=setting.currentpage)
setting.contentdivs[setting.cacheprevpage-1].style.display="none"
setting.onChange(setting.cacheprevpage,setting.currentpage)}},cleartimer:function(setting,timervar){if(typeof timervar!="undefined"){clearTimeout(timervar)
clearInterval(timervar)
if(setting.cacheprevpage!=setting.currentpage){setting.contentdivs[setting.cacheprevpage-1].style.display="none"}}},css:function(el,targetclass,action){var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)","ig")
if(action=="check")
return needle.test(el.className)
else if(action=="remove")
el.className=el.className.replace(needle,"")
else if(action=="add")
el.className+=" "+targetclass},autorotate:function(setting){window["fcsautorun"+setting.id]=setInterval(function(){featuredcontentslider.turnpage(setting,"next")},setting.autorotate[1])},getCookie:function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return null},setCookie:function(name,value){document.cookie=name+"="+value},init:function(setting){var persistedpage=this.getCookie("fcspersist"+setting.id)||1
var urlselectedpage=this.urlparamselect(setting.id)
this.settingcaches[setting.id]=setting
setting.contentdivs=[]
setting.toclinks=[]
setting.topzindex=0
setting.currentpage=urlselectedpage||((this.enablepersist)?persistedpage:1)
setting.prevpage=setting.currentpage
setting.revealtype="on"+(setting.revealtype||"click")
setting.curopacity=0
setting.onChange=setting.onChange||function(){}
if(setting.contentsource[0]=="inline")
this.buildpaginate(setting)
if(setting.contentsource[0]=="ajax")
this.ajaxconnect(setting)}}
/*+++++++++++++++++++++++++++++++++++++++++*/

/***********************************************
* Tab Content script v2.0- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
// TAB CONTENT SCRIPT
function ddtabcontent(tabinterfaceid){this.tabinterfaceid=tabinterfaceid
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a")
this.enabletabpersistence=true
this.hottabspositions=[]
this.currentTabIndex=0
this.subcontentids=[]
this.revcontentids=[]
this.selectedClassTarget="link"}
ddtabcontent.getCookie=function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return""}
ddtabcontent.setCookie=function(name,value){document.cookie=name+"="+value+";path=/"}
ddtabcontent.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},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)},expandtab:function(tabref){var subcontentid=tabref.getAttribute("rel")
var associatedrevids=(tabref.getAttribute("rev"))?","+tabref.getAttribute("rev").replace(/\s+/,"")+",":""
this.expandsubcontent(subcontentid)
this.expandrevcontent(associatedrevids)
for(var i=0;i<this.tabs.length;i++){this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)?"selected":""}
if(this.enabletabpersistence)
ddtabcontent.setCookie(this.tabinterfaceid,tabref.tabposition)
this.setcurrenttabindex(tabref.tabposition)},expandsubcontent:function(subcontentid){for(var i=0;i<this.subcontentids.length;i++){var subcontent=document.getElementById(this.subcontentids[i])
subcontent.style.display=(subcontent.id==subcontentid)?"block":"none"}},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=ddtabcontent.getCookie(this.tabinterfaceid)
var selectedtab=-1
var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid)
this.automodeperiod=automodeperiod||0
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.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel")
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)}}}


/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
function pausescroller(content,divId,divClass,delay,speed){if(content.length==1)content[1]=content[0];this.content=content
this.tickerid=divId
this.delay=delay
this.speed=speed
this.mouseoverBol=0
this.hiddendivpointer=1
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if(window.addEventListener)
window.addEventListener("load",function(){scrollerinstance.initialize()},false)
else if(window.attachEvent)
window.attachEvent("onload",function(){scrollerinstance.initialize()})
else if(document.getElementById)
setTimeout(function(){scrollerinstance.initialize()},500)}
pausescroller.prototype.initialize=function(){this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv,this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if(window.attachEvent)
window.attachEvent("onunload",function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()},this.delay)}
pausescroller.prototype.animateup=function(){var scrollerinstance=this
if(parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()},this.speed)}
else{this.getinline(this.hiddendiv,this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()},this.delay)}}
pausescroller.prototype.swapdivs=function(){var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer}
pausescroller.prototype.getinline=function(div1,div2){div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight,div1.offsetHeight)+"px"}
pausescroller.prototype.setmessage=function(){var scrollerinstance=this
if(this.mouseoverBol==1)
setTimeout(function(){scrollerinstance.setmessage()},100)
else{var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)?0:i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()}}
pausescroller.getCSSpadding=function(tickerobj){if(tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if(window.getComputedStyle)
return window.getComputedStyle(tickerobj,"").getPropertyValue("padding-top")
else
return 0}

/**
 * FlashObject v1.2.3: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2005 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */ 

if(typeof com=="undefined")var com=new Object();if(typeof com.deconcept=="undefined")com.deconcept=new Object();if(typeof com.deconcept.util=="undefined")com.deconcept.util=new Object();if(typeof com.deconcept.FlashObjectUtil=="undefined")com.deconcept.FlashObjectUtil=new Object();com.deconcept.FlashObject=function(swf,id,w,h,ver,c,useExpressInstall,quality,redirectUrl,detectKey){this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(swf)this.setAttribute('swf',swf);if(id)this.setAttribute('id',id);if(w)this.setAttribute('width',w);if(h)this.setAttribute('height',h);if(ver)this.setAttribute('version',new com.deconcept.PlayerVersion(ver.toString().split(".")));if(c)this.addParam('bgcolor',c);var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('redirectUrl','');if(redirectUrl)this.setAttribute('redirectUrl',redirectUrl);if(useExpressInstall){var expressInstallReqVer=new com.deconcept.PlayerVersion([6,0,65]);var installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion();if(installedVer.versionIsValid(expressInstallReqVer)&&!installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);}}else{this.setAttribute('doExpressInstall',false);}}
com.deconcept.FlashObject.prototype.setAttribute=function(name,value){this.attributes[name]=value;}
com.deconcept.FlashObject.prototype.getAttribute=function(name){return this.attributes[name];}
com.deconcept.FlashObject.prototype.getAttributes=function(){return this.attributes;}
com.deconcept.FlashObject.prototype.addParam=function(name,value){this.params[name]=value;}
com.deconcept.FlashObject.prototype.getParams=function(){return this.params;}
com.deconcept.FlashObject.prototype.getParam=function(name){return this.params[name];}
com.deconcept.FlashObject.prototype.addVariable=function(name,value){this.variables[name]=value;}
com.deconcept.FlashObject.prototype.getVariable=function(name){return this.variables[name];}
com.deconcept.FlashObject.prototype.getVariables=function(){return this.variables;}
com.deconcept.FlashObject.prototype.getParamTags=function(){var paramTags="";var key;var params=this.getParams();for(key in params){paramTags+='<param name="'+key+'" value="'+params[key]+'" />';}
return paramTags;}
com.deconcept.FlashObject.prototype.getVariablePairs=function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs.push(key+"="+variables[key]);}
return variablePairs;}
com.deconcept.FlashObject.prototype.getHTML=function(){var flashHTML="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
flashHTML+='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" name="wmode" value="transparent" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'"';var params=this.getParams();for(var key in params){flashHTML+=' '+key+'="'+params[key]+'"';}
pairs=this.getVariablePairs().join("&");if(pairs.length>0){flashHTML+=' flashvars="'+pairs+'"';}
flashHTML+='></embed>';}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
flashHTML+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" id="'+this.getAttribute('id')+'">';flashHTML+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var tags=this.getParamTags();if(tags.length>0){flashHTML+=tags;}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){flashHTML+='<param name="flashvars" value="'+pairs+'" />';}
flashHTML+='</object>';}
return flashHTML;}
com.deconcept.FlashObject.prototype.write=function(elementId){if(this.skipDetect||this.getAttribute('doExpressInstall')||com.deconcept.FlashObjectUtil.getPlayerVersion().versionIsValid(this.getAttribute('version'))){if(document.getElementById){if(this.getAttribute('doExpressInstall')){this.addVariable("MMredirectURL",escape(window.location));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}
document.getElementById(elementId).innerHTML=this.getHTML();}}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'));}}}
com.deconcept.FlashObjectUtil.getPlayerVersion=function(){var PlayerVersion=new com.deconcept.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else if(window.ActiveXObject){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");PlayerVersion=new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}catch(e){}}
return PlayerVersion;}
com.deconcept.PlayerVersion=function(arrVersion){this.major=parseInt(arrVersion[0])||0;this.minor=parseInt(arrVersion[1])||0;this.rev=parseInt(arrVersion[2])||0;}
com.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;}
com.deconcept.util.getRequestParameter=function(param){var q=document.location.search||document.location.href.hash;if(q){var startIndex=q.indexOf(param+"=");var endIndex=(q.indexOf("&",startIndex)>-1)?q.indexOf("&",startIndex):q.length;if(q.length>1&&startIndex>-1){return q.substring(q.indexOf("=",startIndex)+1,endIndex);}}
return"";}
if(Array.prototype.push==null){Array.prototype.push=function(item){this[this.length]=item;return this.length;}}
var getQueryParamValue=com.deconcept.util.getRequestParameter;var FlashObject=com.deconcept.FlashObject;
