//* "start.js" - Stand: 09.11.2000 - (B.E.)

var page;

function redirect() {

window.location = page;

}



function gotoPage(time, url) {

page = url;

timer = setTimeout('redirect()', time);

} 





if ((navigator.appVersion.indexOf("4.") != -1) && (navigator.appName.indexOf("Netscape") != -1) || (navigator.appVersion.indexOf("4.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){

	size = screen.width + "x" + screen.height;

	if (size == "640x480"){

		top.location = "start_move_bg_640x480.html";

	}

} 



/********************************************************************************

Copyright (C) 1999 Thomas Brattli

This script is made by and copyrighted to Thomas Brattli at www.bratta.com

Visit for more great scripts. This may be used freely as long as this msg is intact!

I will also appriciate any links you could give me.

********************************************************************************/

//Default browsercheck, added to all scripts!

  function checkBrowser(){

	this.ver=navigator.appVersion

	this.dom=document.getElementById?1:0
	
	this.ie8=(this.ver.indexOf("MSIE 8")>-1 && this.dom)?1:0;

	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom)?1:0;
	
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;

	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;

	this.ie4=(document.all && !this.dom)?1:0;

	this.ns7=(this.dom && parseInt(this.ver) >= 7)?1:0;
	
	this.ns6=(this.dom && parseInt(this.ver) >= 6)?1:0;
	
	this.ns5=(this.dom && parseInt(this.ver) >= 5)?1:0;

	this.ns4=(document.layers && !this.dom)?1:0;

	this.bw=(this.ie8 || this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ns6 || this.ns7)

	return this

}

bw=new checkBrowser()

//How do you want the slide to work?

// 0 =  Slide in from the left

// 1 = Slide in from the top

// 2 = Slide in from top and left

bgWorks=2 



//These are the variables you have to set:

var bgXmove=10 //How many pixels should it move every step from the left? 

var bgYmove=10 //How many pixels should it move every step from the top? 

var bgSpeed=50 //Timer speed (in milliseconds)



//Do you want the background image to move with the page if the user scroll the page? (true or false || 0 or 1)

var moveOnScroll=true



/********************************************************************************

Object constructor

********************************************************************************/

function makeBgObj(obj,speed,xmove,ymove,works){

	this.el=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;	

  	this.css=bw.dom || bw.ie4?this.el.style:bw.ns4?this.el:0;

	this.go=0; this.slideBgIn=b_slideBgIn; this.speed=speed; this.xmove=xmove; this.ymove=ymove

	this.slideBgDown=b_slideBgDown; this.slideBg=b_slideBg; this.works=works; 

	this.width=bw.ns4?this.css.document.width:bw.ns5?this.el.childNodes[0].width:this.el.offsetWidth;

	this.height=bw.ns4?this.css.document.height:bw.ns5?this.el.childNodes[0].height:this.el.offsetHeight;

	this.moveIt=b_moveIt; this.obj = obj + "Object"; eval(this.obj + "=this"); return this

}

function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}

//Bg out



function b_slideBgIn(){

	if(this.x<-this.xmove){

		this.moveIt(this.x+this.xmove,this.y)

		setTimeout(this.obj+".slideBgIn()",this.speed)

	}

}

function b_slideBgDown(){

	if(this.y<-this.ymove){

		this.moveIt(this.x,this.y+this.ymove)

		setTimeout(this.obj+".slideBgDown()",this.speed)

	}

}

function b_slideBg(){

	if(this.works==0){

		this.moveIt(-this.width,0)

		this.slideBgIn()  	

	}else if(this.works==1){

		this.moveIt(0,-this.height)

		this.slideBgDown()  	

	}else{

		this.moveIt(-this.width,-this.height)

		this.slideBgDown(); this.slideBgIn()  		

	}

	this.css.visibility='visible'

}



/********************************************************************************

Inits the page, and start the slide

********************************************************************************/

function slideBgInit()

{

	oBg=new makeBgObj('divBg',bgSpeed,bgXmove,bgYmove,bgWorks)

	oBg.slideBg()

}


if(bw.bw) {onload=slideBgInit;}
/********if(bw.bw) {onload=slideBgInit;gotoPage('9000','indexnew.html');} ***/
/********if(bw.bw) {onload=slideBgInit;gotoPage('9000','/shop/index.php');} ***/



