

if(bw.ns4||bw.opera5||(bw.ie&&bw.mac)) document.write('<link rel="STYLESHEET" type="text/css" href="nsstyle.css">')
else if(bw.ns6) document.write('<link rel="STYLESHEET" type="text/css" href="ns6style.css">')
else document.write('<link rel="STYLESHEET" type="text/css" href="iestyle.css">')

var no;
if(window.location.search.indexOf("?nointro")>-1) no=1

if(bw.ns4){
	if(innerWidth-200>innerHeight) fsize=innerWidth*13/1000
	else fsize=innerHeight*20/1000
	if(fsize<9) fsize=9
	document.classes.clText.all.fontSize=fsize+"px"
}
function setFilter(){
	for(i=0;i<3;i++){
		if(bw.ie6){f=new lib_obj_b('divFill'+i); f.css.filter="Alpha(opacity=1)"; f.css.backgroundColor="red"
		}oGrey[i].showIt()
	}f=null
}
var loaded;
function init(n,nointro){

	page=new lib_doc_size()

  if(bw.ns6){
    for(i=0;i<4;i++){

        img=document.getElementById("divLine"+i)
        img.style.width=page.x2
        img.style.height=page.y2*3/100
        img.style.MozOpacity=0.4
        img=document.images["imgL"+i]
        img.style.width=parseInt(page.x2)
        img.style.height=parseInt(page.y2*3/100)
       if(i<3){
          document.images["img"+i].style.width=parseInt(page.x2*12/100)
          document.images["img"+i].style.height=parseInt(page.y15+5)


       }
    }
  }
  if(bw.ie&&bw.mac){
    for(i=0;i<4;i++){
      document.images["imgL"+i].style.height=parseInt(page.y2*3/100)
      if(i<3){
        document.images["img"+i].style.width=parseInt(page.x2*12/100)
        document.images["img"+i].style.height=parseInt(page.y15+5)
      }
    }
  }
	if(no==1) nointro=1
	if(bw.ie || bw.ns6){

		if(page.x2-200>page.y2) fsize=page.x2*13/1000
		else fsize=page.y2*20/1000
		if(fsize<9) fsize=9
		for(i=0;i<3;i++){
			oText=new lib_obj_b('divText'+i)
			oText.css.fontSize=fsize+"px"
			if(bw.ie6) oText.css.filter="Alpha(opacity=100)"
		}
		oText=null;
	}
	oGrey=new Array()
	for(i=0;i<3;i++){
		oGrey[i]=new lib_obj_b('divGrey'+i+'_1','divCont'+i)
		oGrey[i].m=new lib_obj_b('divCont'+i)
		oGrey[i].clipTo(0,page.x2,page.y2*15/100,0,1)
		oGrey[i].moveIt(-page.x2,-1); oGrey[i].xclip=0
		oGrey[i].m.evnt.onmouseover=new Function("mmover("+i+")");
		oGrey[i].m.evnt.onmouseout=new Function("mmout("+i+")");
    oGrey[i].m.showIt()
		if(i==0) oGrey[i].m.evnt.onclick=new Function("location.href='ctp4up.htm'");
		else if(i==1) oGrey[i].m.evnt.onclick=new Function("location.href='imposition.htm'");
		else if(i==2) oGrey[i].m.evnt.onclick=new Function("location.href='inconstruct.htm'");
	}

	oBg=new lib_obj_b('divBg')

	if((bw.ie&&!bw.mac) ||bw.ns6){
    if(bw.ns6) oBg.css.MozOpacity=0.3
    oBg.css.width=page.x2; 
    oBg.css.height=page.y2; 

    oBg.showIt()
  }
	if(bw.ns4||bw.ns6||bw.opera5 || bw.mac){
		oPlace=new Array()
		for(i=0;i<3;i++){
			oPlace[i]=new lib_obj_b('divGrey'+i+'_0')
			oPlace[i].bg('#3366FF')
			oPlace[i].clipTo(0,page.x2,page.y2*15/100,0,1)
			oPlace[i].img=new lib_obj_b('divImg'+i,'divCont'+i)
			oPlace[i].txt=new lib_obj_b('divText'+i,'divCont'+i)
			oPlace[i].line=new lib_obj_b('divLine'+i); oPlace[i].cont=new lib_obj_b('divCont'+i)
			oPlace[i].cont.clipTo(0,page.x2,page.y15+5,0,1)
		}
		oPlace[0].moveIt(0,page.y2*27/100); oPlace[1].moveIt(0,page.y2*45/100)
		oPlace[2].moveIt(0,page.y2*63/100); oPlace[3]=new lib_obj_b('divLine3')
		if(bw.ns6) oPlace[3].clipTo(0,page.x2,page.y2*3/100,0,1)
		oPlace[0].img.moveIt(page.x2*2/100,0); oPlace[1].img.moveIt(page.x2*23/100,0)
		oPlace[2].img.moveIt(page.x2*43/100,0); oPlace[0].txt.moveIt(page.x2*15/100,page.y10/3)
		oPlace[1].txt.moveIt(page.x2*36/100,page.y10/3); oPlace[2].txt.moveIt(page.x2*56/100,page.y10/3)
    if(bw.opera5){ oPlace[0].txt.moveBy(5,0); oPlace[1].txt.moveBy(5,0); oPlace[2].txt.moveBy(5,0)}
		oPlace[0].line.moveIt(0,page.y2*24/100); oPlace[1].line.moveIt(0,page.y2*42/100)
		oPlace[2].line.moveIt(0,page.y2*60/100); oPlace[3].moveIt(0,page.y2*78/100)
		oPlace[0].cont.moveIt(0,page.y2*27/100); oPlace[1].cont.moveIt(0,page.y2*45/100)
		oPlace[2].cont.moveIt(0,page.y2*63/100); oPlace[0].green=new lib_obj_b('divGreen')
		if(!bw.ns6){
      oPlace[0].green.clipTo(0,230,page.y2,0,1); oPlace[0].green.moveIt(page.x2-220,0)
		}
    oPlace[0].logo=new lib_obj_b('divLogo'); oPlace[0].logo.moveIt(page.x2-160,oPlace[0].y-130)

    oPlace[0].logo.showIt()
		oPlace=null;
	}
  if(bw.opera5) setTimeout("resized()",500)
  else setTimeout("onresize=resized;",500); 
	moveNum=page.x2/16
  if(bw.ns6 || (bw.opera5 && bw.mac)){moveNum+=50; numadd = 0.1}
	if(!nointro) intro()
	else{setFilter(); oLoad=new lib_obj_b('divLoading'); oLoad.hideIt(); oLoad=null; loaded=1;}
writeInit()
}
var numadd=0
function intro(){
	oIntro=new Array()
	for(i=0;i<3;i++){
		oIntro[i]=new lib_obj_b('divCont'+i); oIntro[i].origx=parseInt(oIntro[i].x)



		oIntro[i].origy=oIntro[i].y;
    oIntro[i].moveIt(page.x2,-1)
    oIntro[i].line=new lib_obj_b('divLine'+i); oIntro[i].line.origx=oIntro[i].line.x
		oIntro[i].line.moveIt(page.x2,-1); oIntro[i].grey=new lib_obj_b('divGrey'+i+'_0')	
		oIntro[i].grey.origx=oIntro[i].grey.x; 
    oIntro[i].grey.moveIt(-page.x2-100,-1)
  }
	oIntro[3]=new lib_obj_b('divLogo'); oIntro[3].line=new lib_obj_b('divLine'+3)



	oIntro[3].line.origx=oIntro[3].line.x; oIntro[3].line.moveIt(page.x2,-1)
	oLoad=new lib_obj_b('divLoading'); oLoad.hideIt()

	oLoad=null; loaded=1; moveLines(0)
}
var moveNum
function moveLines(num){

	ok=false;
	for(i=0;i<4;i++){
		if(num>=i){
			if(oIntro[i].line.x>moveNum){oIntro[i].line.moveBy(-moveNum,0); ok=true;
			}else oIntro[i].line.moveIt(0,-1)
		}
	}
	num+=0.1+numadd; 
  if(ok) setTimeout("moveLines("+num+")",20)
	else moveGrey(0)
}
function moveGrey(num){

	ok=false;
	for(i=0;i<3;i++){
		if(num>=i){
			if(oIntro[i].grey.x<0-moveNum){
				oIntro[i].grey.moveBy(moveNum,0); ok=true;
			}else oIntro[i].grey.moveIt(0,-1)
		}
	}
	num+=0.1+numadd; if(ok) setTimeout("moveGrey("+num+")",20)
	else moveContent(0)
}
function moveContent(num){

	ok=false;
	for(i=0;i<3;i++){
		if(num>=i){
			if(oIntro[i].x>oIntro[i].origx+moveNum){
				oIntro[i].moveBy(-moveNum,0)
				ok=true;
			}else  oIntro[i].moveIt(oIntro[i].origx,-1)
		}
	}
	num+=0.1+numadd; if(ok) setTimeout("moveContent("+num+")",30)
	else setFilter()
}

function resized(){

	if(bw.ie && !bw.mac) init(0,1)
	else{
		page2=new lib_doc_size()
		if(page.x2!=page2.x2 || page.y2!=page2.y2) location.href=location.href+"?nointro"
	}
  if(bw.opera5) setTimeout("resized()",500)
}
function mmover(i){

	oGrey[i].xclip=1
	if(bw.ie5 || bw.ie6) oGrey[i].css.cursor="hand"
	else if(bw.ns6) oGrey[i].css.cursor="pointer"
	clipThem()
}
function mmout(i){oGrey[i].xclip=0; clipThem()}
var going=false;
function clipThem(){
	if(!going){
		ok=false;
		for(i=0;i<3;i++){
			if(oGrey[i].xclip==0){
				if(oGrey[i].x>-(page.x2-moveNum)){
					oGrey[i].moveBy(-moveNum,-1); ok=true;
				}else oGrey[i].moveIt(-page.x2,-1)
			}else{
				if(oGrey[i].x<-moveNum){
					oGrey[i].moveBy(moveNum,-1); ok=true;
				}else oGrey[i].moveIt(0,-1)
			}
		}
		if(ok) setTimeout("clipThem()",30)
		else going=false
	}
}

var angleinc=0
function loading(){

	page=new lib_doc_size(); oBut=new lib_obj_b('divBut','divLoading')
	xx=page.x50+33; xx+=bw.ie?80:bw.ns4?25:bw.opera5?50:60;

}

var loadnum=10
function loadit(nn){
	loadnum--; angleinc+=10

	if(nn==0) setTimeout("init()",200)
}

var oLoad2
function startLoading(){
  page = new lib_doc_size()

  oLoadCont = new lib_obj('divLoadCont')
  oLoad = new lib_obj('divLoad1','divLoadCont')
  oLoad2 = new lib_obj('divLoad2','divLoadCont.document.divLoad1')
  oLoadText = new lib_obj('divLoadText','divLoadCont.document.divLoad1')
  oLoad.moveIt(page.x50-loaderWidth/2,page.y50-20)
  oLoadText.moveIt(loaderWidth/2 - oLoadText.w/2,10)
  oLoad.clipTo(0,loaderWidth,40,0,1)
  oLoad2.per = loaderWidth/numImages
 oBut=new lib_obj_b('divBut','divLoading')
	xx=page.x50+33; xx+=bw.ie?80:bw.ns4?25:bw.opera5?50:60;

	setTimeout("init()",200)

}
function loadIt(ok){
  currentImg ++

  if (oLoad2) oLoad2.clipTo(0,oLoad2.per*currentImg,40,0,1)
if (currentImg>=numImages) {
    oLoadCont.css.visibility = "hidden"

    oLoadCont = null;
	oLoad1 = null;
	oLoad2 = null;
  }

}




function makeWriteObj(obj,text,size,color,align,speed,font,hide,hidewait){
   	this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
   	this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;	
	this.text=text; this.size=size; this.color=color; this.align=align; this.speed=speed;
	this.font=font; this.hide=hide; this.hidewait=hidewait; this.writeWrite=b_writeWrite;
	this.writeText=b_writeText;this.write=b_write
	if(bw.dom || bw.ie4){ //Setting the style properties
		this.css.fontFamily=this.font; this.css.fontSize=this.size+"px"; this.css.color=this.color;
		this.css.textAlign=this.align
	}
	this.obj = obj + "Object"; 	eval(this.obj + "=this"); return this
}
function b_write(num,fn){
	if(!fn) fn=""
	this.writeText(num,fn) 

}
function b_writeWrite(text){
	if(bw.ns4){
		this.writeref.write('<p style="text-align:'+this.align+'; font-size:' +this.size+'px; font-family:'+this.font+'; color:'+this.color+'">'+text+'</p>')
		this.writeref.close()
	}else this.writeref.innerHTML = text
}
function b_writeText(num,fn){
	if (num<=this.text.length){
		wtext = this.text.substr(0,num)
		this.writeWrite(wtext)
		num ++
		setTimeout(this.obj+".writeText("+num+",'"+fn+"')",this.speed)

	}

}



function writeInit(){
	if(bw.bw){
		oWrite = new makeWriteObj('divWrite',wText,wFontsize,wColor,wAlign,wSpeed,wFont,wHide,wHidewait)

		oWrite.write(0)
		oWrite.css.visibility = "visible"


	}


		
}

