/**********************************************************************************   
ZoomFade 
*   Copyright (C) 2001 Thomas Brattli
*   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 Thomas Brattli
*
*   Script date: 09/05/2001 (keep this date to check versions) 
*********************************************************************************/
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	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=lib_bwcheck()
/*Here are the variables you have to set, play with different values:
First the text: (it will stop and fade/change the colors on the last one)*/
function SetLanguageHeader(LanguageID)
{
	switch(LanguageID) 
	{
		case 2: //German
			return new Array('Wir','suchen','für','Sie!','Wir suchen für Sie!')
		break;
		case 3: // French
			return new Array('Nous','allons','à la','recherche!','pour','vous!','Nous allons à la recherche pour vous!')
		break;
		default: // English
			return new Array('We','will','search','for','you!','We will search for you!')
		break;
	}

}
zText1=SetLanguageHeader(GetLanguage())
  
//Now the colors:
//all you have to do is set the color you want to have in here: 
//(the first color will be the color that the text is when it zooms.)
zColor1=new Array('#202020','#424242','#8E8E8E','#C2C2C2','#006699')
 
var zEndSize1=12   //The fontsize in px you want the zoom to end at
var zSpeed1=500     //Zoom speed
var zAddSize1=1    //Px to add to the fontsize on each interval
var zFadeSpeed1=500 //Color change/fade speed
var zFont1='verdana,arial,helvetica,sans-serif' //Font
var zHide1=false    //do you want it to hide when its done? (true or false)
var zHideWait1=70  //Time to wait before hiding
var zStartSize1=11 //The size to start at
var zEndCode1=""   // Code to execute when the zoom and fade is finished. ie: "location.href='newpage.html', executes when the hide does.

/*You can remove this if you don't wan't it to start right away.
You can have it start if someone clicks a link (make a link like this:
<a href="#" onclick="fadeInit()">Click to Zoomtext</a>)*/
//onload=zoomInit;

/********* You shouldn't really have to set anything below this point ***********/

//Object functions
function makeZoomObj(obj,font,size,endsize,color,text,zspeed,fadespeed,addsize,hide,hidewait,endcode){
   	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.zoomWrite=b_zoomWrite;	this.zoomIt=b_zoomIt; this.fadeIt=b_fadeIt;	this.zoomFade=b_zoomFade;
	this.font=font; this.color=new Array(); this.color=eval(color);	this.text=new Array(); this.text=eval(text);
	this.zspeed=zspeed; this.fadespeed=fadespeed; this.addsize=addsize; this.endcode=endcode
	this.hide=hide; this.hidewait=hidewait; this.size=size; this.startsize=size; this.endsize=endsize
	if(size<endsize){this.way="<"; this.addsize=this.addsize
    }else{this.way=">"; this.addsize=-this.addsize}
	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[0]
	}
	this.obj = obj + "Object"; 	eval(this.obj + "=this"); return this
}
function b_zoomFade(num){
	if(num<this.text.length){
		this.size=this.startsize
		this.zoomIt(num,'this.zoomFade('+(num+1)+')')
	}
	else if(num==this.text.length) this.fadeIt(0,'this.zoomFade('+(num+1)+')')
	else if(this.hide) setTimeout(this.obj+".css.visibility='hidden'; eval("+this.obj+".endcode)",this.hidewait)
}
function b_zoomWrite(num,cnum){
	if(bw.ns4){
		this.writeref.write('<span style="text-align:center; font-size:' +this.size+'px; font-family:'+this.font+'; color:'+this.color[cnum]+'">'+this.text[num]+'</span>')
		this.writeref.close()
	}else this.writeref.innerHTML="<center>"+this.text[num]+"</center>"
}
function b_zoomIt(num,fn){
	if(eval(this.size+this.way+this.endsize)){
		if(this.size==this.startsize || bw.ns4) this.zoomWrite(num,0)
		if(bw.dom || bw.ie4) this.css.fontSize=this.size+"px"
		this.size=this.size+this.addsize
		setTimeout(this.obj+".zoomIt("+num+",'"+fn+"')",this.zspeed)
	}else eval(fn)	
}
function b_fadeIt(num,fn){
	if(num<this.color.length){
		if(bw.ns4) this.zoomWrite(this.text.length-1,num)
		else this.css.color=this.color[num]
		num++
		setTimeout(this.obj+".fadeIt("+num+",'"+fn+"')",this.fadespeed)
	}else eval(fn)	
}
/*Initiates the object, shows it and starts the zoom
****************************************************************************/
function zoomInit(){
	if(bw.bw){
		/*oZoom=new makeZoomObj('divZoom1',zFont1,zStartSize1,zEndSize1,'zColor1','zText1',zSpeed1,zFadeSpeed1,zAddSize1,zHide1,zHideWait1,zEndCode1)
		oZoom.zoomFade(0)
		oZoom.css.visibility='visible'*/
	}
}





/**********************************************************************************   
WriteText 
*   Copyright (C) 2001 Thomas Brattli
*   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 Thomas Brattli
*
*   Script date: 09/04/2001 (keep this date to check versions) 
*********************************************************************************/
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	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=lib_bwcheck()
//Here are the variables you have to set:                                                                 

//There are 2 ways this script can work.
// 0 = WriteText
// 1 = RemoveText
wWorks = 0

function SetLanguageText(LanguageID)
{
	switch(LanguageID) 
	{
		case 2: //German
			return "Sparen Sie sich das Suchen.<br>Nennen Sie uns Ihr Gesuch<br>und wir finden für Sie die<br>gewünschten Baumaschinen<br>und das weltweit."
		break;
		case 3: // French
			//return "Ne vous donnez pas la peine de chercher. Communiquez-nous votre demande et nous vous trouverons la machine de vos besoins. Dans le monde entier!"
			return "Ne vous donnez pas la peine de chercher. Communiquez-nous votre demande et nous répondrons à vos besoins, dans le monde entier!"
		break;
		case 200: //German
			return "Non perdete tempo per la ricerca. Inviateci la vostra richiesta, troveremo per voi la macchina usata che state cercando, su scala mondiale."
		break;
		default: // English
			return "Save the time you need for searching. Submit your request to us we will find the desired used machine for you on a worldwide basis."
		break;
	}

}

var wText = SetLanguageText(GetLanguage()) //The text you want write out
var wFontsize = 10           //Set the fontsize you want
var wColor = "#000000"       //The text color
var wAlign = "center"        //the alignment of the text, you can choose center, right or left.
var wSpeed = 1             //Set the speed you want it to write in (in milliseconds between each letter)
var wFont = 'verdana,arial' //The font face
var wHide = false             //do you want it to hide when its done? (true or false)
var wHidewait = 1000         //Set the time you want it to wait before it hides

        
/*You can remove this if you don't wan't it to start right away.
You can have it start if someone clicks a link (make a link like this:
<a href="#" onclick="writeInit()">Click to writetext</a>)*/
	onload = writeInit;

/********* You shouldn't really have to set anything below this point ***********/
//Object functions
function makeWriteObj(obj,text,size,color,align,speed,font,hide,hidewait,works){
   	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.removeText=b_removeText; this.works=works; 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=""
	if(!this.works) this.writeText(num,fn) 
	else this.removeText(fn)
}
function b_writeWrite(text){
	if(bw.ns4){
		this.writeref.write('<span style="text-align:'+this.align+'; font-size:' +this.size+'px; font-family:'+this.font+'; color:'+this.color+'">'+text+'</span>')
		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)
	}else{
		if(this.hide) setTimeout(this.obj+".css.visibility='hidden'",this.hidewait);
		eval(fn)
	}
}
function b_removeText(fn){
	if (this.text.length>0){
		this.text = this.text.slice(0,this.text.length-1)
		this.writeWrite(this.text)
		setTimeout(this.obj+".removeText('"+fn+"')",this.speed)
	}else{
		if(this.hide) setTimeout(this.obj+".css.visibility='hidden'",this.hidewait);
		eval(fn)
	}
}
/*Initiates the object, shows it and starts the zoom
****************************************************************************/
function writeInit(){
	if(bw.bw){
		oWrite = new makeWriteObj('divWrite',wText,wFontsize,wColor,wAlign,wSpeed,wFont,wHide,wHidewait,wWorks)
		//Change the line below to: oWrite.write(0) if you only have one object.
		oWrite.write(0)
		oWrite.css.visibility = "visible"

		//Another object, just remove this line if you only want one object. It's just to show you how can have more objects.
		//oWrite2 = new makeWriteObj('divWrite2',"This is layer 2",20,"red","left",100,"Verdana,Arial",1,500,0)
	}
}
