
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()

function makePageObject(){
	this.x=0;
	this.x2=(bw.ns4 || bw.ns5)?innerWidth:document.body.offsetWidth-20;
	this.y=0;
	this.y2=(bw.ns4 || bw.ns5)?innerHeight:document.body.offsetHeight-4;
	this.x50=this.x2/2;
	this.y50=this.y2/2;
	return this;
}		

function makeObj(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.'										
   	this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;			this.moveIt=b_moveIt; 						
	return this
}
function b_moveIt(x,y){
	this.css.left=x
	this.css.top=y
}

function pageInit(longdiv){
	page=new makePageObject()
	o0=new makeObj('div0')
	o0.moveIt(page.x50-160,page.y+170)
	o1=new makeObj('div1')
	o1.moveIt(page.x50-160,page.y+170)
	o2=new makeObj('div2')
	o2.moveIt(page.x50-160,page.y+170)
	o3=new makeObj('div3')
	o3.moveIt(page.x50-160,page.y+170)
	o4=new makeObj('div4')
	o4.moveIt(page.x50-160,page.y+170)
	o5=new makeObj('div5')
	o5.moveIt(page.x50-160,page.y+170)
	o6=new makeObj('div6')
	o6.moveIt(page.x50-160,page.y+170)
	o7=new makeObj('div7')
	o7.moveIt(page.x50-160,page.y+170)
	o8=new makeObj('div8')
	o8.moveIt(page.x50-160,page.y+170)
	doChange("div1",0,1);
	doChange("footer",0,1);
	oF=new makeObj('footer')
if (document.all || document.getElementById){
	footerpos = (200 + document.getElementById(longdiv).offsetHeight)
	oF.moveIt(page.x50-160,page.y+footerpos)
	}
else if (document.layers){
	footerpos = (200 + document[longdiv].document.height );
	oF.moveIt(page.x50-160,page.y+footerpos)
	footerh = document['footer'].document.height
	document.height = footerpos + footerh + 20;
	}

	window.onresize=resized;
}


function resized(){
	page2=new makePageObject()
	if(page2.x2!=page.x2 || page2.y2!=page.y2){
		location.reload() 
	}
}


    

function hideall(){
   doChange("div0",0,0);
   doChange("div1",0,0);
   doChange("div2",0,0); 
   doChange("div3",0,0); 
   doChange("div4",0,0); 
   doChange("div5",0,0); 
   doChange("div6",0,0); 
   doChange("div7",0,0); 
   doChange("div8",0,0); 
   }

function doChange(div,trans,show)
{
if (bw.dom)
   { 
    obj=document.getElementById(div).style
               if ((trans==1) && (show==1))
               {
                  obj2=document.getElementById(div)
                  obj2.style.filter = "blendTrans(duration=2.0,transition=4)";
                  obj2.filters.blendTrans.Apply(); 
                  obj2.filters.blendTrans.Play();
                  obj.visibility= "visible"
               }
                
               else if ((trans==0) && (show==1))
               {
                  obj.visibility= "visible"
               }
   
               else if ((trans==0) && (show==0))
               {
                  obj.visibility= "hidden"
               }
    }

else if(bw.ie4)
   { 
    obj=document.all[div].style
               if ((trans==1) && (show==1))
               {
                  obj2.style.filter = "blendTrans(duration=2.0,transition=4)";
                  obj2.filters.blendTrans.Apply(); 
                  obj2.filters.blendTrans.Play();
                  obj.visibility= "visible"
               }
               
               else if ((trans==0) && (show==1))
               {
                   obj.visibility= "visible"
               }
               
               else if ((trans==0) && (show==0))
               {
                  obj.visibility= "hidden"
               }
    }
    
else if(bw.ns4)
    {
     obj=document.layers[div]
               if ((trans==0) && (show==0))
               {
                  obj.visibility= "hidden";
	            }
	            else
	            {
                  obj.visibility= "visible";
               }
   }	                  
   
}


function changeActive(div){
hideall();
this.className="vnavhg";
doChange(div,0,1);
}




function hide(objectID) {
if (bw.dom){
obj=document.getElementById(objectID).style
obj.visibility="visible";
}
else if(bw.ie4) { 
obj=document.all[objectID].style
obj.visibility="visible";
}
else if(bw.ns4){
    return;
}
}


function sizer(){
	if(document.all){
	var fileName = location.pathname.substring(location.pathname.lastIndexOf('/')+1);
	bwidth=document.body.offsetWidth;
	bheight=document.body.offsetHeight;
		if (fileName == ""){
		fileName = "index.html&tas=nml"
		}
	if( bwidth < "700" && bheight < "500" ) location.href =("texter?file="+fileName)
	}
}


