

var instances = new Array();

function CoreObject( obj )
{
    obj.instance = instances.length;
    obj.getInstanceName = _CoreObject_getInstanceName;
    obj.timeOut = _CoreObject_timeOut;

    obj.setConfig = function( c )
    {   if(c) for(var o in c)
                this[o] = c[o];
    }
    
    instances.push(obj);
}

function _CoreObject_getInstanceName()
{
    return 'instances['+this.instance+']';
}
function _CoreObject_timeOut( ms, func )
{
    window.setTimeout(this.getInstanceName()+( func ? '.' + func : ''), ms);
}

/* /CoreObject */


function LanguageSwitchObject( obj )
{
    new CoreObject( obj );

    if( obj.href.indexOf('?')==-1 ) return;
    var href = '&'+obj.href.substr( obj.href.indexOf('?')+1 )+'&';
    var staP = href.indexOf('&l=')+3;
    if( staP==2 ) return;

    obj.languageID = href.substr( staP, href.indexOf('&', staP)-staP );
    obj.change = _LanguageSwitchObject_change;
}

function _LanguageSwitchObject_change( url )
{
    var pos = url.indexOf('?l=')+3;
    if( pos==2 )
        pos = url.indexOf('&l=')+3;
    if( pos==2 )
        if( url.indexOf('?')==-1 )
            this.href = url+'?l='+this.languageID;
        else this.href = url+'&l='+this.languageID;
    else
    {
        var end = url.indexOf('&', pos);
        if( end==-1 )
            end = false;
        this.href = url.substr(0,pos)+this.languageID+( end ? url.substr(end) : '');
    }
}

/* /LanguageSwitchObject */

function CaptchaCheckObject( obj )
{
    obj.letters = parseInt( obj.getAttribute('letters') );
    obj.checkURL = obj.getAttribute('checkURL');

    obj.onkeyup = _CaptchaCheckObject_onkeyup;
    obj.receive = _CaptchaCheckObject_receive;
}

function _CaptchaCheckObject_onkeyup()
{
    if( this.checkURL && this.value.length >= this.letters )
        ajax.request(this, this.checkURL+this.value);
    else this.className = this.className.replace(/ error/g, '');
}

function _CaptchaCheckObject_receive( pack )
{
    if( pack.request.responseText == this.value )
    {
        this.onkeyup = null;
        var parent = this.parentNode.parentNode.parentNode,
        p = document.createElement('p'),

        div = document.createElement('div');
        p.appendChild( document.createTextNode( this.getAttribute('success') ) );
        p.className = 'success';
        div.className = 'errors';
        div.appendChild( p );

        while( parent.firstChild )
            parent.removeChild( parent.firstChild );

        parent.appendChild( div );
    /*
  		parent.parentNode.removeChild( parent.previousSibling );
  		var p = document.createElement('p'),
  			div = document.createElement('div');
  		p.appendChild( document.createTextNode( this.getAttribute('success') ) );
  		p.className = 'success';
  		div.className = 'errors';
  		div.appendChild( p );
  		parent.parentNode.appendChild( div );
  		parent.parentNode.removeChild( parent );
		/**/
    }else
    {
        _AJAXSubmitObject_error( this, this.getAttribute('required'), true );
        this.className += ' error';
    }
}

/* /CaptchaCheckObject */

function CaptchaReloadObject( obj )
{
    obj.style.cursor = 'pointer';

    obj.onclick = _CaptchaReloadObject_onclick;
    obj.onmouseover = _CaptchaReloadObject_onmouseover;
    obj.onmouseout = _CaptchaReloadObject_onmouseout;

    if( obj.getAttribute('linkItem') )
    {
        obj.link = getID( obj.getAttribute('linkItem') );
        if( obj.link )
        {
            obj.link.captcha = obj;
            obj.link.onclick = _CaptchaReloadObject_link_onclick;
        }
    }
}

function _CaptchaReloadObject_link_onclick()
{
    this.captcha.onclick();
    return false;
}

function _CaptchaReloadObject_onclick()
{
    this.src = this.src.substr(0,this.src.indexOf('?')+1)+Math.random();
}

function _CaptchaReloadObject_onmouseover()
{
    if( this.link ){
        if( this.link.className ) this.link.className = this.link.className + ' hover';
        else this.link.className = 'hover';
    }
}

function _CaptchaReloadObject_onmouseout()
{
    if( this.link ){
        if( this.link.className == 'hover' ) this.link.className = '';
        else this.link.className = this.link.className.replace(/ hover/g, '');
    }
}

/* /CaptchaReloadObject */

function AJAXSubmitObject( obj )
{
    obj.onclick = _AJAXSubmitObject_onclick;
    obj.error = _AJAXSubmitObject_error;
}

function _AJAXSubmitObject_onclick()
{
    var values = new Object();
    var form = this.parentNode;
    while( form.parentNode && form.tagName.toLowerCase() != 'form' )
        form = form.parentNode;

    if( !form.tagName.toLowerCase() == 'form' )
        return true;

    var target = form.getAttribute('action'),
    subaction = null;
    do
    {
        if( !target )target = location.href;
        if( target.indexOf('#')>-1 )
        {
            subaction = new SubActionObject_ScrollTo( target.substr(target.indexOf('#')+1) );
            target = target.substr(0,target.indexOf('#'));
        }
    }while( !target );

    if( target.indexOf('?')==-1 )target += '?';
    else target += '&';
    target += 'aj=ax';

    var elements = new Array('input','textarea'), tags, passed = true;

    for( var knecht=0; knecht<elements.length; knecht++ )
    {
        tags = form.getElementsByTagName( elements[knecht] );
        for( var sklave=0; sklave<tags.length; sklave++ )
            if( tags[sklave].value && trim(tags[sklave].value).length )
                values[ tags[sklave].name ] = tags[sklave].value;
            else if( tags[sklave].getAttribute('required') )
            {
                this.error( tags[sklave], tags[sklave].getAttribute('required') );
                passed = false;
            }
    }

    return ( !passed || ajax.send( getID(mainContentID), target, values, subaction ) ? false : true );
}

function _AJAXSubmitObject_checkIfErrorPersists( evt )
{
    if( this.value && trim(this.value) )
        this.requiredMessage.style.display = 'none';
    else this.requiredMessage.style.display = 'block';

    if( this.formerAJAXonchage )
    this.formerAJAXonchage( evt );
    }

    function _AJAXSubmitObject_error( element, message, keepError )
    {
    if( element.requiredMessage ) element.requiredMessage.style.display = 'block';
    else{
    element.requiredMessage = document.createElement('div');
    element.requiredMessage.className = 'errors';
    var p = document.createElement('p');
    p.className = 'error';
    p.appendChild(document.createTextNode(message));
    element.requiredMessage.appendChild( p );
    element.parentNode.appendChild( element.requiredMessage );

    if( !keepError )
    {
        element.formerAJAXonchage = element.onchange;
        element.onchange = _AJAXSubmitObject_checkIfErrorPersists;
    }
}
}
/* /AJAXSubmitObject */

function CodedContentObject( obj )
{
    new CoreObject( obj );

    obj.decode = _CodedContentObject_decode;
    obj.simpleOne = _CodedContentObject_simpleOne;

    obj.decode();
}

function _CodedContentObject_simpleOne( input )
{
    var output = '';

    for( var sklave=0; sklave<input.length; sklave++ )
        output += String.fromCharCode(input.charCodeAt(sklave)-1);

    return output;
}

function _CodedContentObject_decode()
{
    var alg = this.getAttribute('algorithm');
    var code = this.getAttribute('code');

    if( !code )
        code = this.innerHTML;

    if( this[alg] && code )
        this.innerHTML = this[alg]( code );
}

/* /CodedContentObject */

function LinkUpObject( obj )
{
    obj.onclick = _LinkUpObject_onclick;
}

function _LinkUpObject_onclick()
{
    scrollSmoothlyTo( 0 );
    return false;
}

/* /LinkUpObject */

function ScrollToLinkObject( obj )
{
    var maiCo = getID( mainContentID );
    if( maiCo ) if( maiCo.trashCan ) maiCo.trashCan.push( obj ); else maiCo.trashCan = new Array( obj );

    obj.onclick = _ScrollToLinkObject_onclick;
}

function _ScrollToLinkObject_onclick()
{
    var it = this.getAttribute('item');

    if( !it && this.href && this.href.indexOf("#")>-1 )
        it = this.href.substr( this.href.indexOf("#")+1 );

    if( it )
        it = getID( it );

    if( it )
    {
        scrollSmoothlyTo( topLeftCoords(it).y );
        return false;
    }
}

/* /ScrollToLinkObject */

function ExtraInfoObject( obj )
{
    var item = obj.getAttribute('item');
    if( item ) item = getID( item );

    if( !item ) return;

    new CoreObject( obj );

    obj.item = item;
    obj.hide = 1;
    obj.style.cursor='pointer';
    obj.arrow = document.createElement('IMG');
    obj.arrow.className = 'icon';
    obj.arrow.src = 'img/icon_blue_arrow_r.gif';
    obj.insertBefore(obj.arrow, obj.firstChild);

    obj.brother = -1;

    item.style.position='absolute';
    item.style.display='none';

    obj.isExplored = contains(obj.parentNode.className.split(" "),'right') && isIe();

    obj.onmouseover=_ExtraInfoObject_onmouseover;
    obj.onmouseout=_ExtraInfoObject_onmouseout;
    obj.onclick=_ExtraInfoObject_onclick;
}

function _ExtraInfoObject_onmouseover()
{
    this.item.style.display = 'block';
    this.className = 'hover';
}

function _ExtraInfoObject_onmouseout()
{
    if( this.hide )
        this.item.style.display = 'none';
    this.className = '';
}

function _ExtraInfoObject_onclick()
{
    if( this.hide )

    {
        if( this.brother==-1 )
        {
            var divs = this.parentNode.parentNode.getElementsByTagName("DIV");
            this.brother = new Array();
            var classes;

            for( var sklave=0; sklave<divs.length; sklave++ )
                if( divs[sklave].className )
                {
                    classes = divs[sklave].className.split(" ");
                    if( contains(classes, 'borderRight')
                        || contains(classes, 'borderLeft')
                        || contains(classes, 'empty') )
                        this.brother.push( divs[sklave] );
                // divs[sklave] = this.brother.offsetHeight;
                }

            if( this.brother==-1 ) this.brother=0;
        }

        this.hide = 0;
        this.arrow.src = 'img/icon_blue_arrow_d.gif';
        this.item.style.position='relative';
        if( this.isExplored ) this.item.style.left = '28';

        if( this.brother )
            for( var sklave=0; sklave<this.brother.length; sklave++ )
                this.brother[sklave].style.height = this.item.parentNode.offsetHeight + 'px';

    }else
    {
        this.item.style.position='absolute';
        if( this.isExplored ) this.item.style.left = '405';

        if( this.brother )
            for( var sklave=0; sklave<this.brother.length; sklave++ )
                this.brother[sklave].style.height = 'auto';

        this.hide = 1;
        this.arrow.src = 'img/icon_blue_arrow_r.gif';
    }
}

/* /ExtraInfoObject */

function AjaxHistoryHistoryObject( item, headline )
{
    this.title = headline;
    this.itemID = item;

    var a_node = document.createElement('a');
    a_node.setAttribute('js', 'navireference');
    a_node.setAttribute('referencing', item);
        
    a_node.setAttribute('href', '#pageTop');
    a_node.appendChild( document.createTextNode(headline) );
    this.node = document.createElement('div');
    this.node.appendChild( a_node );

    new NavigationPointReferenceObject( a_node );
//    applyScriptSheet( a_node );
}

function AjaxHistoryObject( obj )
{
    obj.length = 5;
    obj.entries = new Array();
    obj.entries.push( new AjaxHistoryHistoryObject( obj.getAttribute('referencing'), obj.getAttribute('pagehead') ) );

    obj.previousSibling.style.visibility = 'visible';
    /*obj.node = document.createElement('div');
    obj.node.className = 'title';
    obj.node.appendChild( document.createTextNode( obj.getAttribute('historyhead') ) );
    */

    obj.addByElement = _AjaxHistoryObject_addByElement;
    obj.refresh = _AjaxHistoryObject_refresh;
    obj.back = _AjaxHistoryObject_back;
    obj.getUrl = _AjaxHistoryObject_getUrl;

    obj.style.display = 'block';
    obj.refresh();
}

function _AjaxHistoryObject_addByElement( element )
{
    for( var sklave=0; sklave<this.entries.length; sklave++ )
        if( this.entries[sklave].itemID == element.id )
        {
            this.entries = this.entries.slice(0,sklave).concat( this.entries.slice(sklave+1) );
            break;
        }
    this.entries.push( new AjaxHistoryHistoryObject( element.id, element.getAttribute('pagehead') ) );
    this.refresh();
}

function _AjaxHistoryObject_refresh()
{
    while( this.firstChild ) this.removeChild( this.firstChild );
    // this.appendChild( this.node );
    for( var sklave=this.entries.length-1; sklave>=0 && this.entries.length-sklave<=this.length; sklave-- )
    {
        this.entries[sklave].node.className = 'number_'+(this.entries.length-1-sklave);
        this.appendChild( this.entries[sklave].node );
    }

}

function _AjaxHistoryObject_back()
{
    if( this.entries.length>1 )

    {
        this.entries.pop();
        var latest = this.entries.pop();
        latest.node.firstChild.onclick();
        return true;
    }

    return false;
}
  
function _AjaxHistoryObject_getUrl(entryNumber)
{
    if(this.entries.length && (entryNumber==undefined || entryNumber<this.entries.length))
        return getID(this.entries[entryNumber!=undefined ? entryNumber : this.entries.length-1].itemID).href;
}
/* /AjaxHistoryObject */

function BackButtonObject( obj )
{
    obj.history = getID( historyID );
    obj.formerOnClick = obj.onclick;
    obj.onclick = _BackButtonObject_onclick;
}

function _BackButtonObject_onclick()
{
    if( this.history && this.history.back() )
        return false;
    else if(this.formerOnClick) return this.formerOnClick();
}

/* /BackButtonObject */

function HiddenParagraphObject( obj )
{
    new CoreObject( obj );

    var clickNode = obj.getAttribute('item');

    if( clickNode )
        clickNode = getID(clickNode);

    if( clickNode )
    {
        obj.item = clickNode;
        obj.title = clickNode.getAttribute('openMessage');

        obj.onclick = _HiddenParagraphObject_passOnclick;

        return;
    }

    obj.type = obj.getAttribute('messageType');

    clickNode = document.createElement("p");
    new CoreObject(clickNode);

    clickNode.className = 'unHide';
    obj.opened = obj.getAttribute('status');
    if( obj.opened && obj.opened.toLowerCase() == 'open' )
        obj.opened = 1;
    else obj.opened = 0;

    switch( obj.type )
    {
        case 'checkbox':
            ;
            var box = document.createElement('input');
            box.setAttribute('type', 'checkbox');
            box.className = 'checkbox';
            clickNode.appendChild( box );
            clickNode.appendChild( document.createTextNode(obj.getAttribute( 'openMessage' )) );
            break;
        case 'text': default:
            clickNode.appendChild( document.createTextNode(obj.opened ? '[ - ] ' : '[ + ] ') );
            clickNode.appendChild( document.createTextNode(obj.getAttribute(obj.opened ? 'closeMessage' : 'openMessage' )) );
    }

    clickNode.unhide = obj;
    clickNode.onclick = _HiddenParagraphObject_onclick;

    obj.item = clickNode;
    obj.parentNode.insertBefore(clickNode, obj.nextSibling);

    //obj.onclick = _HiddenParagraphObject_passOnclick;

    if( !obj.opened )
        obj.style.display = 'none';

    if( location.href.indexOf('#')>-1 )
    {
        var myID = obj.getAttribute('id');
        if( myID && myID == 'text'+location.href.substr(location.href.indexOf('#')+1) )
            clickNode.timeOut( 100, 'onclick()' );
    }
}

function _HiddenParagraphObject_passOnclick()
{
    if( this.item )
        if( this.item.onclick )
            this.item.onclick();
        else if( this.item.item )
            this.item.item.onclick();

    return false;
}

function _HiddenParagraphObject_onclick()
{
    this.unhide.style.display = this.unhide.opened ? 'none' : 'block';

    switch( this.unhide.type )
    {
        case 'checkbox':
            ;
            this.firstChild.checked = !this.unhide.opened;
            break;
        case 'text': default:
            this.firstChild.nodeValue = this.unhide.opened ? '[ + ] ' :  '[ - ] ';
            this.firstChild.nextSibling.nodeValue = this.unhide.opened ? this.unhide.getAttribute('openMessage') : this.unhide.getAttribute('closeMessage');
    }

    this.unhide.opened = !this.unhide.opened;

    if( this.unhide.opened )
    {
        var as = document.getElementsByTagName("A"), name=this.unhide.getAttribute('id');
        for( var sklave=0; sklave<as.length; sklave++ )
            if( 'text' + as[sklave].name == name )
            {
                scrollSmoothlyTo( topLeftCoords(as[sklave] ).y );
                break;
            }

    }

//for( var sklave=0; sklave<as.length; sklave++ )
}

/* /HiddenParagraphObject */

function LightboxObject( obj )
{
    new CoreObject( obj );
    var maiCo = getID( mainContentID );
		
    if( maiCo.trashCan ) maiCo.trashCan.push( obj ); else maiCo.trashCan = new Array( obj );

    obj.content = maiCo;
    obj.image = obj.getElementsByTagName('img')[0];
    obj.image.style.visibility = 'hidden';

    obj.image.onload = _LightboxObjectImage_onload;
    obj.image.hide = _LightboxObjectImage_hide;
    obj.image.link = obj;
    obj.onclick = _LightboxObject_onclick;
    obj.situate = _LightboxObject_situate;
    obj.trashed = _LightboxObject_trashed;
}

function _LightboxObjectImage_onload()
{
    cacheImage("img/loading_image_"+this.width+".gif");
	
    this.style.visibility = 'visible';
	  

    if( this.src.substring( this.src.lastIndexOf('_'), this.src.lastIndexOf('.') ) == '_xs' )
    {
        this.preview = new Image();
        this.preview.item = this;
        this.preview.onload = _LightboxObjectPreviewImage_onload;
        this.preview.src = this.src.substring(0, this.src.lastIndexOf('_')) + '_s' + this.src.substring(this.src.lastIndexOf('.'));
        if(this.link.getAttribute('title'))
            this.preview.title = this.link.getAttribute('title');

        this.tiny = new Image();
        this.tiny.src = this.src;
    }

}

function _LightboxObjectPreviewImage_onload()
{
    var prev = document.createElement('img');
    prev.src = this.src;

    prev.style.position='absolute';
    prev.style.zIndex = 550;

    prev.onmouseover = _LightboxObjectPreviewImage_onmouseover;
    prev.onmouseout = _LightboxObjectPreviewImage_onmouseout;
    prev.onclick = _LightboxObjectPreviewImage_onclick;
    prev.shows = false;
    prev.item = this.item;
    prev.className = 'lightbox_hover';
    if(this.title)
        prev.title = this.title;
    this.item.preview = prev;
    this.item.overcount = 0;
    this.item.onmouseover = _LightboxObjectImage_onmouseover;
    this.item.onmouseout = _LightboxObjectImage_onmouseout;
    this.item.over = 0;
}

function _LightboxObjectImage_onmouseover()
{
    this.overcount++;
    if( !this.preview.shows )
    {
        var pos = topLeftCoords( this );
        this.preview.style.top = Math.round(pos.y - this.height + this.height/3*2)+'px';
        this.preview.style.left= Math.round(pos.x - this.width/3)+'px';

        document.getElementsByTagName('body')[0].appendChild( this.preview );
        this.preview.shows = true;
    }
}

function _LightboxObjectPreviewImage_onmouseover()
{
    if( this.item && this.item.onmouseover)
        this.item.onmouseover();
}

function _LightboxObjectPreviewImage_onmouseout()
{
    if( this.item && this.item.onmouseout) this.item.onmouseout();
}

function _LightboxObjectPreviewImage_onclick()
{
    this.item.parentNode.onclick();
}

function _LightboxObjectImage_onmouseout()
{
    this.parentNode.timeOut( 10, 'image.hide('+this.overcount+')' );
}

function _LightboxObjectImage_hide( count )
{
    if( this.overcount == count )

    {
        if( this.preview.parentNode )
            document.getElementsByTagName('body')[0].removeChild( this.preview );
        this.preview.shows = false;
    }
}

function _LightboxObject_onclick()
{
    if( !this.bigVersion )
    {
        this.bigVersion = document.createElement('div');
        this.bigVersion.className = 'galeryImage';
        new CoreObject( this.bigVersion );
				
        //    	this.bigVersion.style.position = 'absolute';
        // loading image....
        var pos = topLeftCoords( this, true );
        if( pos && isIe6() )
        {
            pos.y += 2;
            pos.x += 3;
        }
				
        this.loadingImage = document.createElement("img");
        this.loadingImage.src = "img/loading_image_"+this.firstChild.width+".gif";
				
        this.loadingImage.style.position = "absolute";
        this.loadingImage.style.top = pos.y;
        this.loadingImage.style.left = pos.x;
        this.loadingImage.style.zIndex = '500';
        this.loadingImage.style.cursor = 'pointer';
				
        this.loadingImage.item = this.firstChild;
        this.loadingImage.onmouseover = _LightboxObjectPreviewImage_onmouseover;
        this.loadingImage.onmouseout = _LightboxObjectPreviewImage_onmouseout;
        this.loadingImage.onclick = _LightboxObjectPreviewImage_onclick;
				
        document.getElementsByTagName('body')[0].appendChild(this.loadingImage, this);
				
        this.bigVersion.item = this;
        this.bigVersion.image = new Image();
        this.bigVersion.image.div = this.bigVersion;
        this.bigVersion.image.isLoaded = false;
        this.bigVersion.image.onload = _LightboxObject_onload;
        this.bigVersion.image.onfailure = _default_images_onfailure;
        this.bigVersion.image.src = this.href;
        this.bigVersion.onclick = _LightboxObjectItem_onclick;
				
        if(this.href.indexOf('-web.')>-1) // DL-versions always imagefile w/o -web
            switch(this.getAttribute('download'))
            {
                case 'link':
                    var link=document.createElement('A'),isrc=this.href,endi=isrc.substr(isrc.lastIndexOf('.'));
                    link.appendChild(document.createTextNode("Download "+endi));
                    isrc=isrc.substr(0,isrc.lastIndexOf('-'))+endi;
                    link.setAttribute('href',isrc);
                    link.setAttribute('target','_blank');
                    link.className='download';
                    this.bigVersion.image.div.appendChild(link);
                    break;
            }
            else if(this.getAttribute('download')) // additional download specified
            {
                var link=document.createElement('A'),isrc=this.href,endi=isrc.substr(isrc.lastIndexOf('.'));
                link.appendChild(document.createTextNode("Download "+this.title));
                link.setAttribute('href',this.getAttribute('download'));
                link.setAttribute('target','_blank');
                link.className='download';
                this.bigVersion.image.div.appendChild(link);
            }
				
		
    }else if( this.bigVersion.isLoaded )
    {
        this.situate( this.bigVersion );
        this.bigVersion.style.display = 'block';
    } else
{
        this.bigVersion.image.src = this.bigVersion.image.src;
    }
	
    return false;
}

function _LightboxObjectItem_onclick()
{
    this.style.display = 'none';
}

function _LightboxObject_onload()
{
    var me = document.createElement('img');
    me.src = this.src;
    this.div.isLoaded = true;
    this.div.appendChild( me );
    this.div.item.loadingImage.src = 'img/loaded_image.gif';
    this.div.item.loadingImage.style.width = '5px';
    this.div.item.loadingImage.style.height = '5px';

    this.div.style.display = 'block';
    this.div.item.situate( this.div );
    this.onload = null;

    document.getElementsByTagName('body')[0].appendChild( this.div );
}

function _LightboxObject_situate( obj )
{
    var pos = topLeftCoords(), dime = dimensions();
    if( obj.image.height && dime.y > obj.image.height )
        pos.y += Math.round(( dime.y-obj.image.height )/2);

    obj.style.top = pos.y+'px';
    obj.style.left = (pos.x+100)+'px';
    if( this.content.openLight && this.content.openLight != obj )
        this.content.openLight.onclick();
    this.content.openLight = obj;
}

function _LightboxObject_trashed()
{
    if( this.bigVersion )
    {
        if( this.bigVersion.parentNode )
            this.bigVersion.parentNode.removeChild( this.bigVersion );
        this.bigVersion = null;
    }
    if( this.loadingImage )
    {
        if( this.loadingImage.parentNode )
            this.loadingImage.parentNode.removeChild( this.loadingImage );
        this.loadingImage = null;
    }

    if( this.prev )
    {
        if( this.prev.parentNode )
            this.prev.parentNode.removeChild( this.prev );
        this.loadingImage = null;
    }

}

/* /LightboxObject */

function VerticalFisheyeObject( obj )
{
    new CoreObject( obj );
    var maiCo = getID( mainContentID );
    if( maiCo ) if( maiCo.trashCan ) maiCo.trashCan.push( obj ); else maiCo.trashCan = new Array( obj );

    obj.width = 0;
    obj.changePercentage = 0;
    obj.applyCounter = 0;

    obj.initialize = _VerticalFisheyeObject_initialize;
    obj.setInitialized =  _LightboxObject_setInitialized;
    obj.applyPercentages = _VerticalFisheyeObject_applyPercentages;
    obj.restorePercentages = _VerticalFisheyeObject_restorePercentages;
    obj.applyChanges = _VerticalFisheyeObject_applyChanges;
    obj.trashed = _VerticalFisheyeObject_trashed;

    obj.images = obj.getElementsByTagName("IMG");

    for( var sklave=0; sklave<obj.images.length; sklave++ )
    {
        obj.images[sklave].fisheye = obj;
        obj.images[sklave].number = sklave;

        obj.images[sklave].onload = _VerticalFisheyeObject_onload;
        obj.images[sklave].onfailure = _default_images_onfailure;
        obj.images[sklave].style.visibility = 'hidden';
    }
}

function _VerticalFisheyeObject_onload()
{
    if( this.big )
    {
        this.onload = null;
        this.small.src = this.src;
        this.fisheye.setInitialized( this );
    }else this.fisheye.initialize( this );
}

function _LightboxObject_setInitialized( img )
{
    img.initialized = true;

    for( var sklave=0; sklave<this.images.length; sklave++ )
        if( !this.images[sklave].initialized ) break;

    if( sklave==this.images.length )
        for( var sklave=0; sklave<this.images.length; sklave++ )
        {
            this.images[sklave].getDifference = _VerticalFisheyeObject_getDifference;
            this.images[sklave].applyPercentage = _VerticalFisheyeObject_applyPercentage;
            this.images[sklave].applyChange = _VerticalFisheyeObject_applyChange;

            this.images[sklave].onmouseover = _VerticalFisheyeObject_onmouseover;
            this.images[sklave].onmouseout = _VerticalFisheyeObject_onmouseout;
        }
}

function _VerticalFisheyeObject_initialize( img )
{
    if( img.width>this.width )
    {
        this.width = img.width;
        this.style.width = this.width + 'px';
    }

    img.big = new Image();
    img.big.src = img.src;
    img.big.width = img.width;

    img.small = new Image();
    img.small.width = Math.round( img.width/2 );

    img.style.width = img.small.width + 'px';
    img.currentWidth = img.small.width;

    if( img.src.lastIndexOf('_s') == img.src.lastIndexOf('.')-2 )
        img.src = img.src.substr(0, img.src.lastIndexOf('_s')) + '_xs' + img.src.substr(img.src.lastIndexOf('.'));
    else img.src = img.src.substr(0, img.src.lastIndexOf('.')) + 's' + img.src.substr(img.src.lastIndexOf('.'));

    img.style.visibility = 'visible';
}

function _VerticalFisheyeObject_onmouseover()
{
    if( !this.other_percentages )

    {
        this.other_percentages = new Array();
        var top = this.number;
        var bottom = this.fisheye.images.length - top - 1;

        var per = (1-1/(this.fisheye.images.length-1))/2;

        for( var sklave=0; sklave<top; sklave++ )
            this.other_percentages.push( per - ( top > 1 ? .25 - .5 * sklave / (top-1) : 0 ) );

        this.other_percentages.push( 1 );

        for( var sklave=this.number; sklave<this.fisheye.images.length-1; sklave++ )
            this.other_percentages.push( per + ( bottom > 1 ? .25 - .5 * (sklave - this.number) / (bottom-1) : 0 ) );
    }

    this.fisheye.applyPercentages( this.other_percentages );
}

function _VerticalFisheyeObject_applyPercentages( percentages )
{
    if( percentages.length != this.images.length )
        alert("Fisheye blind.\n\nSorry.");

    for( sklave=0; sklave<this.images.length; sklave++ )
        this.images[sklave].applyPercentage( percentages[sklave] );

    this.applyCounter++;
    this.applyChanges( this.applyCounter );
}

function _VerticalFisheyeObject_restorePercentages( )
{
    for( sklave=0; sklave<this.images.length; sklave++ )
        this.images[sklave].applyPercentage( .5 );

    this.applyCounter++;
    this.applyChanges( this.applyCounter );
}


function _VerticalFisheyeObject_applyPercentage( percent )
{
    if( percent > .5 )
        this.src = this.big.src;
    else this.src = this.small.src;

    this.changeTo = ( percent == .5
        ? this.small.width
        : Math.round(this.big.width * percent) );

}

function _VerticalFisheyeObject_applyChanges( which )
{
    var again = false,
    maxD = 0,
    maxS;

    if( this.applyCounter != which )
        return;

    for( sklave=0; sklave<this.images.length; sklave++ )
        maxD = Math.max( maxD, this.images[sklave].getDifference() );

    maxS = Math.sqrt( maxD );

    for( sklave=0; sklave<this.images.length; sklave++ )
        again = this.images[sklave].applyChange( maxD, maxS ) || again;

    if( again )
        this.timeOut(30, 'applyChanges('+this.applyCounter+')');
}

function _VerticalFisheyeObject_getDifference()
{
    return Math.abs(this.currentWidth-this.changeTo);
}

function _VerticalFisheyeObject_applyChange( maxDist, maxSteps )
{
    var steps = Math.round(this.getDifference()/maxDist * maxSteps);

    if( this.changeTo>this.currentWidth )
        this.currentWidth+=steps;
    else if( this.changeTo<this.currentWidth )
        this.currentWidth-=steps;
    else return;

    this.style.width = this.currentWidth + 'px';

    // if( !confirm( this.fisheye.getInstanceName()+'.images['+this.number+'].applyChange(): ' + this.width + ' >> ' + this.changeTo ) ) return ;

    if( this.changeTo!=this.currentWidth )
        return true;
    else return false;
}

function _VerticalFisheyeObject_onmouseout()
{
    this.fisheye.restorePercentages();
}

function _VerticalFisheyeObject_trashed()
{
    for( var sklave=0; sklave<this.images.length; sklave++ )
        this.images[sklave] = null;
    this.images = null;
}
/* /VerticalFisheyeObject */

function HoverObject( obj )
{
    new CoreObject( obj );
    obj.onmouseover = _HoverObject_onmouseover;
    obj.onmouseout = _HoverObject_onmouseout;
}

function _HoverObject_onmouseover()
{
    if( this.className ) this.className = this.className + ' hover';
    else this.className = 'hover';

    if( this.hoverSibling )
        if( this.hoverSibling.className ) this.hoverSibling.className = this.hoverSibling.className + ' hover';
        else this.hoverSibling.className = 'hover';
}

function _HoverObject_onmouseout()
{
    if( this.className == 'hover' ) this.className = '';
    else this.className = this.className.replace(/ hover/g, '');

    if( this.hoverSibling )
        if( this.hoverSibling.className == 'hover' ) this.hoverSibling.className = '';
        else this.hoverSibling.className = this.hoverSibling.className.replace(/ hover/g, '');

}

/* /HoverObject */

function LabelHoverObject( obj )
{
    new CoreObject( obj );
    obj.getItem = _LabelHoverObject_getItem;
    obj.hover = _HoverObject_onmouseover;
    obj.unhover = _HoverObject_onmouseout;
    obj.onmouseover = _LabelHoverObject_onmouseover;
    obj.onmouseout = _LabelHoverObject_onmouseout;
    obj.getItem();
}

function _LabelHoverObject_getItem()
{
    if( !this.item && this.getAttribute('for') )
    {
        this.item = getID( this.getAttribute('for') );
        if( this.item )
            this.item.hoverSibling = this;
    }
}

function _LabelHoverObject_onmouseover()
{
    this.hover();
    if( !this.item ) this.getItem();
    if( this.item )
        if( this.item.className ) this.item.className = this.item.className + ' hover';
        else this.item.className = 'hover';
}

function _LabelHoverObject_onmouseout()
{
    this.unhover();
    if( !this.item ) this.getItem();
    if( this.item )
        if( this.item.className == 'hover' ) this.item.className = '';
        else this.item.className = this.item.className.replace(/ hover/g, '');
}

/* /LabelHoverObject */

function NavigationObject( obj )
{
    new CoreObject( obj );

    obj.onmouseover = _NavigationObject_onmouseover;
    obj.onmouseout = _NavigationObject_onmouseout;

    obj.bar = getID( menuBarID );

    if( obj.className == 'active' )
    {
        obj.bar.active = obj;
        obj.bar.activePoint = obj.firstChild;
        while( obj.bar.activePoint && obj.bar.activePoint.tagName != 'A' )
            obj.bar.activePoint = obj.bar.activePoint.nextSibling;
    }

}

function _NavigationObject_onmouseover()
{
    this.bar.setHovering(1);
    this.bar.moveTo( this );
}

function _NavigationObject_onmouseout()
{
    this.bar.setHovering(0);
    this.bar.moveBack();
}

/* /NavigationObject */

function NavigationPointObject( obj )
{
    new CoreObject( obj );

    if( ajax.funky )
    {
        obj.value = obj.href;
        if( obj.value.indexOf('#')>-1 )
            obj.value = obj.value.substr(0, obj.value.indexOf('#'));

        if( obj.value.indexOf('?')==-1 )
            obj.value += '?aj=ax';
        else obj.value += '&aj=ax';
    // obj.href = "#pageTop";
    }

    obj.mainNavi = !obj.className || !contains( obj.className.split(' '), 'icon' );
    obj.subNavi = ( obj.parentNode
        && obj.parentNode.parentNode
        && obj.parentNode.parentNode.parentNode
        && obj.parentNode.parentNode.parentNode.className
        && contains( obj.parentNode.parentNode.parentNode.className.split(" "), "subnavi" ) );

    obj.bar = getID( menuBarID );
    obj.content = getID( contentID );
    obj.headline = getID( headlineID );
    obj.languageSwitch = getID( languageSwitchID );

    obj.onclick = _NavigationPointObject_onclick;
    obj.openSubnavi = _NavigationPointObject_openSubnavi;
    obj.closeSubnavi = _NavigationPointObject_closeSubnavi;
}

function _NavigationPointObject_openSubnavi( nono )
{
    while( nono && nono.tagName != 'LI' )
        nono = nono.nextSibling;
    if( nono
        && nono.className
        && contains(nono.className.split(" "), "subnavi")
        && !contains(nono.className.split(" "), "open") )
        nono.className = trim(nono.className)+" open";
}

function _NavigationPointObject_closeSubnavi( nono )
{
    while( nono && nono.tagName != 'LI' )
        nono = nono.nextSibling;
    if( nono
        && nono.className
        && contains(nono.className.split(" "), "subnavi")
        && contains(nono.className.split(" "), "open") )
        nono.className = remove_value( nono.className.split(" "), "open").join(" ");
}

function _NavigationPointObject_onclick( event, subaction, silent )
{
    var nono;

    if( !this.homeIcon )
        this.homeIcon = getID( homeIconID );

    if( !silent )
        silent = this.getAttribute('silent');
    else silent = 'true';

    if( this.mainNavi
        && this.subNavi
        && !contains( this.parentNode.parentNode.parentNode.className.split(" "), 'open') )
        {
        var pa = this.parentNode.parentNode.parentNode.previousSibling.firstChild;
        while( pa && pa.tagName != 'A' )
            pa = pa.nextSibling;
        if( pa ) pa.onclick( null, null, 1 );
    }

    if( ajax.funky
        && (!silent
            ||  silent != 'true' ) )
            {
        if( !this.history )
            this.history = getID( historyID );

        if( this.history )
            this.history.addByElement( this );

        this.homeIcon.check( this.value );

        if( this.languageSwitch && this.languageSwitch.change )
            this.languageSwitch.change( this.href );

        ajax.request( this.content, this.value, null, subaction );
    }

    if( this.mainNavi )
        this.parentNode.onmouseover();

    var headline = this.getAttribute('pageHead');

    if( headline && headline.length )
    {
        if( this.bar && this.bar.active && !this.subNavi )

        {
            this.closeSubnavi( this.bar.activePoint && this.bar.activePoint.subNavi
                ? this.bar.active.parentNode.parentNode
                : this.bar.active.nextSibling );

            if( this.mainNavi )
                this.bar.recalculate();
        }

        if( this.mainNavi )
        {
            this.openSubnavi( this.parentNode.nextSibling );
            if( this.bar )
            {
                this.bar.setActive( this.parentNode, this );
                this.bar.recalculate();
            }
        }else
        if( this.bar ) this.bar.disable();

        this.headline.set( headline );
    }

    return false;
}

/* /NavigationPointObject */

function SubActionObject_OpenWork( action )
{
    this.actionID = action;
    this.perform = _SubActionObject_OpenWork_perform;
}

function _SubActionObject_OpenWork_perform()
{
    var ele = getID('text'+this.actionID);
    if( !ele )
    {
        this.perform = _SubActionObject_ScrollTo_perform;
        return this.perform();
    }


    if( ele )
        if( ele.item && ele.item.onclick ) ele.item.onclick();
        else if( ele.onclick ) ele.onclick();
}

/* /SubActionObject_OpenWork */

function SubActionObject_ScrollTo( id )
{
    this.actionID = id;
    this.perform = _SubActionObject_ScrollTo_perform;
}

function _SubActionObject_ScrollTo_perform()
{
    var target = getID( this.actionID );
    if( !target )return;
    scrollSmoothlyTo( topLeftCoords(target).y );
}

/* /SubActionObject_ScrollTo */

function NavigationPointReferenceObject( obj )
{
    new CoreObject( obj );

    if( obj.href )
    {
        var ha = obj.href.indexOf('p=')+2;
        if( !obj.getAttribute("referencing")
            && ha>1 )
            {
            ha = obj.href.substr(ha);
            if( ha.indexOf('&')>-1 )
                ha = ha.substr(0,ha.indexOf('&'))
            else if( ha.indexOf('#')>-1 )
                ha = ha.substr(0,ha.indexOf('#'))
            obj.setAttribute("referencing", ha);
        }
        var ha = obj.href.indexOf('#')+1;
        if(!obj.getAttribute("targeting")
            && ha>0)
            obj.setAttribute("targeting", obj.href.substr(ha));
    }
    obj.onclick = _NavigationPointReferenceObject_onclick;

    if( ajax.funky )
    {
        obj.value = obj.href;
        if( obj.value.indexOf('?')==-1 )
            obj.value += '?aj=ax';
        else obj.value += '&aj=ax';
    }
}

function _NavigationPointReferenceObject_onclick()
{
    var ref = this.getAttribute('referencing');

    if(ref)
        ref = getID(ref);

    if(ref && ref.onclick)
        if( this.getAttribute("targeting") )
        {
            var subaction = new SubActionObject_OpenWork( this.getAttribute("targeting") );
            ref.onclick( null, subaction );
        }
        else ref.onclick();
    return false;
}

/* /NavigationPointReferenceObject */

function NavigationBarObject( obj )
{
    new CoreObject( obj );

    obj.visible = 0;
    obj.top = 0;
    obj.moving = 0;
    obj.disabled = 1;
    obj.hovering = 0;

    obj.topDistance = 0;//topLeftCoords( obj ).y;

    obj.calculateTop = _NavigationBarObject_calculateTop;
    obj.recalculate = _NavigationBarObject_recalculate;

    obj.startUp = _NavigationBarObject_startUp;
    obj.moveTo = _NavigationBarObject_moveTo;
    obj.moveBack = _NavigationBarObject_moveBack;
    obj.move = _NavigationBarObject_move;
    obj.setTop = _NavigationBarObject_setTop;
    obj.setActive = _NavigationBarObject_setActive;
    obj.setHovering = _NavigationBarObject_setHovering;
    obj.hide = _NavigationBarObject_hide;
    obj.disable = _NavigationBarObject_disable;
}

function _NavigationBarObject_startUp()
{
    if( this.active )

    {
        this.currentObj = this.active;
        this.setTop( this.calculateTop( this.active ) );
        this.style.visibility = 'visible';
        this.style.bottom = null;
        this.visible = 1;
        this.disabled = 0;
    }

}

function _NavigationBarObject_calculateTop( obj )
{
    if( !this.topDistance )
    {
        var pNode = obj.parentNode;
        while( pNode.parentNode.tagName == 'LI' || pNode.parentNode.tagName == 'UL' )
            pNode = pNode.parentNode;
        this.topDistance = topLeftCoords( pNode, 1 ).y;
    }

    var extra = 7;
    var pNode = obj.parentNode;
    if( pNode.parentNode.parentNode.tagName == 'UL' )
    {
        pNode = pNode.parentNode.parentNode;
        extra = -3;
    }

    return topLeftCoords( obj ).y - this.topDistance + extra
}

function _NavigationBarObject_recalculate()
{
    if( this.currentObj && this.visible )
    {
        var moveTo = this.calculateTop( this.currentObj );
        if( this.top != moveTo )
            if( this.moving )
                this.moving = moveTo;
            else
            {
                this.moving = moveTo;
                this.move();
            }
    }
}

function _NavigationBarObject_moveTo( obj )
{
    if( this.currentObj==obj && !this.disabled && this.visible )
        return;

    this.moving = this.calculateTop( obj );

    if( this.currentObj )
    {
        this.currentObj.className = '';
    }

    this.currentObj = obj;

    if( !this.top )
        this.setTop( this.moving );

    if( !this.visible )
    {
        this.style.visibility = 'visible';
        this.visible = 1;
    }

    this.move();
}

function _NavigationBarObject_moveBack()
{
    if( !this.disabled )
        this.moveTo( this.active );
    else this.timeOut(500, 'hide( 1 )');
}

function _NavigationBarObject_move( check )
{
    if( check && check!=this.top )
        return;

    if( this.moving )
    {
        var t = Math.round( Math.sqrt(Math.abs(this.top-this.moving))/2 );

        if( this.top > this.moving )
            this.setTop( this.top-t );
        else
        if( this.top < this.moving )
            this.setTop( this.top+t );
        else this.moving = 0;
    }

    if( this.moving )
    {
        var t = Math.abs(this.top-this.moving);

        if( t>200 ) t = 10;
        else t = Math.floor(111-t/2);

        this.timeOut(Math.round(t/6), 'move('+this.top+')');
    }else

    if( this.disabled && !this.hovering )
        this.hide();
    else
    if( this.currentObj ) this.currentObj.className = 'active';

}

function _NavigationBarObject_setTop( topValue )
{
    this.top = topValue;
    this.style.top = this.top + 'px';
}

function _NavigationBarObject_setActive( object, activeNaviPoint )
{
    this.active = object;
    this.activePoint = activeNaviPoint;
    this.currentObj = object;
    if( this.disabled )
        this.disabled = 0;
}

function _NavigationBarObject_setHovering( state )
{
    if( typeof state == 'undefined' ) state = 1;

    if( state==this.hovering ) return;

    this.hovering = state ? 1 : 0;

    if( this.disabled && !this.moving )
        if( this.hovering )
        {	//this.startUp();
        //this.disabled = 1;
        }else this.hide();
}

function _NavigationBarObject_hide( checkState )
{
    if( checkState && (this.moving || this.hovering) )
        return;

    this.style.visibility = 'hidden';
    this.visible = 0;
    if( this.currentObj )
        this.currentObj.className = '';
}

function _NavigationBarObject_disable()
{
    this.hide();
    this.disabled = 1;
    if( this.currentObj )
    {
        this.currentObj.className = '';
        this.currentObj = null;
        this.setTop( 0 );
    }
}

/* /NavigationBarObject */

function HeadlineObject( obj )
{
    new CoreObject( obj );

    obj.set = _HeadlineObject_set;
    obj.hide = _HeadlineObject_hide;
    obj.show = _HeadlineObject_show;

    obj.top = 0;
    obj.hiding = 0;
    obj.height = 30;
}

function _HeadlineObject_set( text )
{
    if( !text  ) return;

    text = text.replace(/(<([^>]+)>)/ig,"");

    if( !this.hiding && this.innerHTML == text
        || this.hiding && this.newHeadline == text ) return;

    this.newHeadline = text;

    if( !this.hiding )
    {
        this.hiding = 1;
        this.hide();
    }
}

function _HeadlineObject_hide()
{
    if( this.top>=this.height )

    {
        this.innerHTML = this.newHeadline;
        this.hiding = 0;
        this.show();
        return;
    }

    this.top+=2;
    this.style.paddingTop = this.top + 'px';
    this.timeOut(11,'hide()');
}

function _HeadlineObject_show()
{
    if( this.hiding || !this.top )
        return;

    this.top--;
    this.style.paddingTop = this.top + 'px';
    this.timeOut(11, 'show()');
}

/* /HeadlineObject */

function HomeIconObject( obj )
{
    new CoreObject( obj );

    obj.check = _HomeIconObject_check;
    obj.activate = _HomeIconObject_activate;
    obj.disable = _HomeIconObject_disable;

    obj.check();
}

function _HomeIconObject_check( tmpS )
{
    if( !tmpS )
        tmpS = location.href;

    if( tmpS.indexOf('?') > -1 )
        tmpS = tmpS.substr( tmpS.indexOf('?')+1 );

    if( tmpS.indexOf('#')>-1 )
        tmpS = tmpS.substr(0, tmpS.indexOf('#'));

    if( !tmpS.length
        || contains( tmpS.substr( tmpS.indexOf('?')+1 ).split('&'), 'p=home' )
        || tmpS.indexOf('p=')==-1 )
        this.activate();
    else this.disable();
}

function _HomeIconObject_activate()
{
    if( this.active ) return;

    this.active = 1;
    this.className = ( this.className ? trim(this.className)+' ':'' ) + 'active';
}

function _HomeIconObject_disable()
{
    if( !this.active ) return;

    this.active = 0;
    this.className = ( this.className ? remove_value( trim(this.className).split(' '), 'active').join(' ') : '' );
}
/* /HomeIconObject */

/* MainContentObject */
function MainContentObject( obj )
{
    new CoreObject( obj );
    new FadingObject( obj, '#ffffff', 'color' )

    if( !obj.trashCan ) obj.trashCan = new Array();
    obj.lastTextReceived = obj.innerHTML;
  	
    obj.garbage = _MainContentObject_garbage;
    obj.emptyTrash = _MainContentObject_emptyTrash;
    obj.receive = _MainContentObject_receive;
    obj.setLoading = _MainContentObject_setLoading;
}
   
function _MainContentObject_setLoading()
{
    if( !this.isFading )
        this.initFade();
    this.fadeOut();
}

function _MainContentObject_receive( pack )
{
    this.fadeIn();

    if(pack.forceReplace || pack.request.responseText != this.lastTextReceived)
    {
        this.lastTextReceived = pack.request.responseText;
        this.style.visibility = 'hidden';
        while( this.firstChild ) this.removeChild( this.firstChild );
        this.emptyTrash();
        this.innerHTML = this.lastTextReceived;
        applyScriptSheet( this );
        cacheImages( this );
        this.style.visibility = 'visible';
    }

    if(pack.subaction && pack.subaction.perform)
    {
        pack.subaction.perform();
        pack.subaction = null;
    }else scrollSmoothlyTo( 0 );
}

function _MainContentObject_garbage( element )
{
    this.trashCan.push( element );
}

function _MainContentObject_emptyTrash()
{
    var sklave, att;
    for( sklave=0; sklave<this.trashCan.length; sklave++ )
    {
        if( this.trashCan[sklave].trashed )
            this.trashCan[sklave].trashed();
        if( this.trashCan[sklave].instance )
            instances[ this.trashCan[sklave].instance ] = null;
        //for( att in this.trashCan[sklave] )
        //		this.trashCan[sklave].setAttribute(att, null);
        this.trashCan[sklave] = null;
    }
    this.trashCan = new Array();
}
/* /MainContentObject */
  
  
function ReloadPageObject( obj )
{
    if(obj) // check validity here

    {
        var currentURL = getID(historyID).getUrl();
        if(currentURL.indexOf('#')>-1)
            currentURL=currentURL.substr(0,currentURL.indexOf('#'));
	 	
        document.location.href=currentURL;
    }
}

function TickerHover(obj)
{
    var ticka = getID('ticker');
    if(!ticka) return;

    if(!ticka.tickerHover)
    {
        new CoreObject(this);
        ticka.tickerHover = this;

        this.ticka = ticka;
        this.hiddenTop = 109;
        this.visibleTop = 99;
        this.currentTop = this.hiddenTop;
        this.blendingIn = 0;

        this.blendIn = function(going)
        {
            if(this.currentTop == this.visibleTop
                || going && !this.blendingIn)
                return;

            if(!going)
            {   if(this.currentTop == this.hiddenTop)
                    this.ticka.style.display = 'block';
                this.blendingIn = 1;
            }

            this.currentTop -= 1;
            this.ticka.style.top = this.currentTop+'px';

            this.timeOut(40, 'blendIn(1)');
        }

        this.blendOut = function(going)
        {   if(this.currentTop == this.hiddenTop)
            {
                this.ticka.style.display = 'none';
                return;
            }
            if(going && this.blendingIn)
                return;

            if(!going)
                this.blendingIn = 0;

            this.currentTop += 1;
            this.ticka.style.top = this.currentTop+'px';

            this.timeOut(40, 'blendOut(1)');
        }

    }


    obj.onmouseover = function()
    {
        getID('ticker').tickerHover.blendIn();
    }

    obj.onmouseout = function()
    {
        getID('ticker').tickerHover.blendOut();
    }
}

