/**********************************/
/* JAVASCRIPT ETH WCMS-Templates  */
/* Version 1.0.6                  */
/* Author:Y. Serrano              */
/**********************************/

/********************************************************************************
Browsercheck
********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}

var bw=new lib_bwcheck()


/********************************************************************************
You don't have to change anything below this
********************************************************************************/

if(document.layers){ //NS4 resize fix...
	scrX= innerWidth; scrY= innerHeight;
	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}



/********************************************************************************
Top-page button
********************************************************************************/

var myplatform = navigator.userAgent;
var platform;
if (myplatform.indexOf('Mac') !=-1)  {
    platform = 'mac';
} else {
    platform = 'win';
}


function BackToTop()
{
    if (document.getElementById)
    { scrollTo (0,0) ; }
}

function floating () {
    if (document.all) {
        
        if (platform == 'mac')
        {	
        }
        else
        {
            document.all.pagetop.style.pixelTop = document.body.clientHeight - 40 + document.body.scrollTop;
        }
    }
    else if (document.layers) {
        document.pagetop.top = window.innerHeight - 53 + window.pageYOffset;
    }
    else if (document.getElementById('pagetop')) {
        document.getElementById('pagetop').style.top = window.innerHeight - 58 + window.pageYOffset + 'px';
       }
}

function initfloatingimage () {    
    if (document.all) {
        document.all.pagetop.style.pixelLeft = 706; //document.body.clientWidth - document.all.pagetop.offsetWidth - 120; //760;
        if (platform == 'mac')
        {
            document.all.pagetop.style.visibility = 'hidden';
        }
        else
        {
            document.all.pagetop.style.visibility = 'visible';
        }
    }
    else if (document.layers) {
        document.pagetop.left = 706;//window.innerWidth - document.pagetop.clip.width - 25;
        document.pagetop.visibility = 'show';
    }
    else if (document.getElementById) {
        document.getElementById('pagetop').style.left = 706;// (window.innerWidth - 45) + 'px';
        document.getElementById('pagetop').style.visibility = 'visible';
       }
    }

if (!(bw.ns4)) {
if (document.all)
    window.onscroll = floating;
else
    setInterval ('floating()', 60);
}



/**********************************************************************************   
ChangeText 
*   Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a> 
*********************************************************************************/

