function popup(url,width,height,name)
{if(!name)
{name='_popup';}
window.open(url.replace(/&amp;/g,'&'),name,'height='+height+',resizable=yes,scrollbars=yes, width='+width);return false;}
function jumpto()
{var page=prompt(jump_page,on_page);if(page!==null&&!isNaN(page)&&page>0)
{document.location.href=base_url.replace(/&amp;/g,'&')+'&start='+((page-1)*per_page);}}
function marklist(id,name,state)
{var parent=document.getElementById(id);if(!parent)
{eval('parent = document.'+id);}
if(!parent)
{return;}
var rb=parent.getElementsByTagName('input');for(var r=0;r<rb.length;r++)
{if(rb[r].name.substr(0,name.length)==name)
{rb[r].checked=state;}}}
function viewableArea(e,itself)
{if(!e)return;if(!itself)
{e=e.parentNode;}
if(!e.vaHeight)
{e.vaHeight=e.offsetHeight;e.vaMaxHeight=e.style.maxHeight;e.style.height='auto';e.style.maxHeight='none';e.style.overflow='visible';}
else
{e.style.height=e.vaHeight+'px';e.style.overflow='auto';e.style.maxHeight=e.vaMaxHeight;e.vaHeight=false;}}
function dE(n,s)
{var e=document.getElementById(n);if(!s)
{s=(e.style.display==''||e.style.display=='block')?-1:1;}
e.style.display=(s==1)?'block':'none';}
function subPanels(p)
{var i,e,t;if(typeof(p)=='string')
{show_panel=p;}
for(i=0;i<panels.length;i++)
{e=document.getElementById(panels[i]);t=document.getElementById(panels[i]+'-tab');if(e)
{if(panels[i]==show_panel)
{e.style.display='block';if(t)
{t.className='activetab';}}
else
{e.style.display='none';if(t)
{t.className='';}}}}}
function printPage()
{if(is_ie)
{printPreview();}
else
{window.print();}}
function displayBlocks(c,e,t)
{var s=(e.checked==true)?1:-1;if(t)
{s*=-1;}
var divs=document.getElementsByTagName("DIV");for(var d=0;d<divs.length;d++)
{if(divs[d].className.indexOf(c)==0)
{divs[d].style.display=(s==1)?'none':'block';}}}
function selectCode(a)
{var e=a.parentNode.parentNode.getElementsByTagName('CODE')[0];if(window.getSelection)
{var s=window.getSelection();if(s.setBaseAndExtent)
{s.setBaseAndExtent(e,0,e,e.innerText.length-1);}
else
{var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r);}}
else if(document.getSelection)
{var s=document.getSelection();var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r);}
else if(document.selection)
{var r=document.body.createTextRange();r.moveToElementText(e);r.select();}}
function play_qt_file(obj)
{var rectangle=obj.GetRectangle();if(rectangle)
{rectangle=rectangle.split(',');var x1=parseInt(rectangle[0]);var x2=parseInt(rectangle[2]);var y1=parseInt(rectangle[1]);var y2=parseInt(rectangle[3]);var width=(x1<0)?(x1*-1)+x2:x2-x1;var height=(y1<0)?(y1*-1)+y2:y2-y1;}
else
{var width=200;var height=0;}
obj.width=width;obj.height=height+16;obj.SetControllerVisible(true);obj.Play();}
var uniquepageid=window.location.href.replace("http://"+window.location.hostname,"").replace(/^\//,"")
function animatedcollapse(divId,animatetime,persistexpand,initstate){this.divId=divId
this.divObj=document.getElementById(divId)
this.divObj.style.overflow="hidden"
this.timelength=animatetime
this.initstate=(typeof initstate!="undefined"&&initstate=="block")?"block":"contract"
this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId)
this.contentheight=parseInt(this.divObj.style.height)
var thisobj=this
if(isNaN(this.contentheight)){animatedcollapse.dotask(window,function(){thisobj._getheight(persistexpand)},"load")
if(!persistexpand&&this.initstate=="contract"||persistexpand&&this.isExpanded!="yes"&&this.isExpanded!="")
this.divObj.style.visibility="hidden"}
else if(!persistexpand&&this.initstate=="contract"||persistexpand&&this.isExpanded!="yes"&&this.isExpanded!="")
this.divObj.style.height=0
if(persistexpand)
animatedcollapse.dotask(window,function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId,thisobj.isExpanded)},"unload")}
animatedcollapse.prototype._getheight=function(persistexpand){this.contentheight=this.divObj.offsetHeight
if(!persistexpand&&this.initstate=="contract"||persistexpand&&this.isExpanded!="yes"){this.divObj.style.height=0
this.divObj.style.visibility="visible"}
else
this.divObj.style.height=this.contentheight+"px"}
animatedcollapse.prototype._slideengine=function(direction){var elapsed=new Date().getTime()-this.startTime
var thisobj=this
if(elapsed<this.timelength){var distancepercent=(direction=="down")?animatedcollapse.curveincrement(elapsed/this.timelength):1-animatedcollapse.curveincrement(elapsed/this.timelength)
this.divObj.style.height=distancepercent*this.contentheight+"px"
this.runtimer=setTimeout(function(){thisobj._slideengine(direction)},10)}
else{this.divObj.style.height=(direction=="down")?this.contentheight+"px":0
this.isExpanded=(direction=="down")?"yes":"no"
this.runtimer=null}}
animatedcollapse.prototype.slidedown=function(){if(typeof this.runtimer=="undefined"||this.runtimer==null){if(isNaN(this.contentheight))
alert("Please wait until document has fully loaded then click again")
else if(parseInt(this.divObj.style.height)==0){this.startTime=new Date().getTime()
this._slideengine("down")}}}
animatedcollapse.prototype.slideup=function(){if(typeof this.runtimer=="undefined"||this.runtimer==null){if(isNaN(this.contentheight))
alert("Please wait until document has fully loaded then click again")
else if(parseInt(this.divObj.style.height)==this.contentheight){this.startTime=new Date().getTime()
this._slideengine("up")}}}
animatedcollapse.prototype.slideit=function(){if(isNaN(this.contentheight))
alert("Please wait until document has fully loaded then click again")
else if(parseInt(this.divObj.style.height)==0)
this.slidedown()
else if(parseInt(this.divObj.style.height)==this.contentheight)
this.slideup()}
animatedcollapse.curveincrement=function(percent){return(1-Math.cos(percent*Math.PI))/2}
animatedcollapse.dotask=function(target,functionref,tasktype){var tasktype=(window.addEventListener)?tasktype:"on"+tasktype
if(target.addEventListener)
target.addEventListener(tasktype,functionref,false)
else if(target.attachEvent)
target.attachEvent(tasktype,functionref)}
animatedcollapse.getCookie=function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return""}
animatedcollapse.setCookie=function(name,value){document.cookie=name+"="+value}