if(!(function(){}).apply)Function.prototype.apply=function(a,b)
{
    a.__temp_apply__=this;
    this.arguments=b;
    var c=a.__temp_apply__();
    delete a.__temp_apply__;
    return c
};
function f(a)
{
    var b=[];
    for(var c=0;c<a.length;++c)b.push(a[c]);
    return b
}
function i_n_p_u_t(a,b)
{
    var c=f(arguments).slice(2);
	window.setTimeout(function(){b.apply(a,c)},1)
}
function l(a)
{
    return typeof a=="string"?document.getElementById(a):a
}
function o(a,b)
{
    return f(l(a).getElementsByTagName(b))
}
function p(a,b,c,h)
{
    var d="_"+b;
    if(!a[d])
    {
        a[d]=[];
        a[b]=function(e)
        {
            if(!e)e=window.event;
            for(var k=0;k<a[d].length;++k)
            {
                var g=a[d][k],m=[e].concat(g.args);
                if(g.method.apply(g.object,m)==false)return false
            }
        }
    }
    a[d].push(
    {
        object:c,method:h,args:f(arguments).slice(4)
    }
    )
}
function q(a)
{
    var b=0;
    while(a&&a!=document.body)
    {
        b = b+a.offsetLeft;
        a=a.offsetParent
    }
    return b
}
function t(a)
{
    var b=0;
    while(a&&a!=document.body)
    {
        b=b+a.offsetTop;
        a=a.offsetParent
    }
    return b
}
function u(a,b)
{
    this.j=b;
    this.a=f(arguments).slice(2);
    p(l(a),"onclick",this,this.toggle);
    p(window,"onload",this,this.m)
}
u.prototype={toggle:function()
    {
        this.show=!this.show;
        for(var a=0;a<this.a.length;++a)l(this.a[a]).style.display=this.show?"":"none";
        l(this.j).className=this.show?"minus":"plus"
    }
    ,m:function()
    {
        if(this.k()!=this.show)this.toggle()
    }
    ,k:function()
    {
        var a=[];
        for(var b=0;b<this.a.length;++b)
        {
            var c=l(this.a[b]);
            while(c&&c!=document.body)
            {
                if(typeof c.tagName=="string"&&c.tagName.toLowerCase()=="form")
                {
                    a.push(c);
                    break
                }
                c=c.parentNode
            }
            //a=a.concat(o(this.a[b],"form"))
        }
        for(var b=0;b<a.length;++b)
        {
            var h=a[b].elements;
            for(var d=0;d<h.length;++d)
            {
                var c=h[d],e=this.defaults[c.name];
                if(typeof e!="undefined")
					if(c.type=="radio")
					{
						if(c.checked&&e!=c.value)return true
					}
					else if(e!=c.value)
						return true
            }
        }
        return false
    }
    ,show:false,defaults:
    {
    }
};

var x={
    init:function()
    {
        p(document,"onclick",this,this.h)
    }
    ,showTip:function(a,b,c)
    {
        a.cancelBubble=true;
        if(this.c==c)return;
        var h="";
        if(w[c].title&&w[c].length>0)var h='<div class="tip-title">'+w[c].title+"</div>";
        var d=w[c].body.replace(/\n\n/g,"</p><p class=tip>"),d="<p class=tip>"+d.replace(/\n/g,"<br>")+"</p>",e=l("tip"),k=o(e,"div")[0];
        k.innerHTML=h+d;
        this.c=c;
        e.style.visibility="hidden";
        e.style.display="";
        i_n_p_u_t(this,function()
        {
            var g=l(b);
            if(g.offsetLeft)
            {
                e.style.visibility="";
				e.style.left=q(g)+g.offsetWidth/2+this.horzOffset+'px';
                e.style.top=t(g)-e.offsetHeight-this.vertOffset+'px';
				
            }
			
        }
        )
    }
    ,attachTip:function(a,b)
    {
        l(a).innerHTML='<img src="/images/tooltip.gif" alt="Tool Tip" title="Tool Tip" border="0" />';
        p(l(a),"onclick",this,this.showTip,a,b)
    }
    ,h:function()
    {
        l("tip").style.display="none";
        this.c=""
    }
    ,c:"",n:null,horzOffset:-230,vertOffset:-1,carrotOffset:20
};




