function resizIt(){
	if (document.layers){
		window.location.reload()
	}
}

function spotshow(which,state){
	if (NS4 || IE4){
		if (NS4){
				//document.layers[which].visibility = state
				spot = document.layers['DIV' + which]
				show = document.layers[which]
		}
		else if (IE4){
				//document.all[which].style.visibility = state
				spot = document.all['DIV' + which].style
				show = document.all[which].style
		}
		spot.xpos = parseInt(spot.left)
		spot.ypos = parseInt(spot.top)
		show.left = eval(spot.xpos + 10)
		show.top = eval(spot.ypos + 35)
		show.visibility = state
	}
	
}
function popout(which,state){
	//ter = "spotshow('" + old + "')"
	a = setTimeout("spotshow('" + which + "','" + state + "')",3000);
}

// a small preload 
function preload(imgObj,imgSrc) {
	if (document.images) {
	eval(imgObj+' = new Image()')
	eval(imgObj+'.src = "'+imgSrc+'"')
	}
}

function msSwitch(which,state){
	document.images[which].src = eval(which + '_' + state + '.src')
}

function msDSwitch(which,state){
	hej = eval(state + '.src')
	alert(hej)
	document.images[which].src = eval(state + '.src')
}

var last = '0'
function msOverRan(where){
	if (where == 'roc'){
		which = Math.floor(4*Math.random()+1);
	}else{
		which = Math.floor(5*Math.random()+1);
	}
	if (last == '0'){
		if (document.layers){
			eval('document.' + where + '.document.images[where + which].src =' + where + which + '_1.src');
		}
		else{
			document.images[where + which].src = eval(where + which + '_1.src')
		}
	}
	else{
		if (document.layers){
		eval('document.' + lastlayer + '.document.images[last].src =' + where + which + '_1.src');
		eval('document.' + where + '.document.images[where + which].src =' + where + which + '_1.src');
		}
		else{
		document.images[last].src = eval(last + '_0.src')
		document.images[where + which].src = eval(where + which + '_1.src')
		}
	}
	last = where+which
	lastlayer = where
}

//var last2 = '0'
function msOverRan4(where){
	which = Math.floor(4*Math.random()+1);
	if (last == '0'){
		if (document.layers){
			ter= ('document.' + where + '.document.images[where + which].src =' + where + which + '_1.src');
			alert(ter)
		}
		else{
			document.images[where + which].src = eval(where + which + '_1.src')
		}
	}
	else{
		if (document.layers){
			eval('document.' + lastlayer + '.document.images[last].src =' + where + which + '_1.src');
			eval('document.' + where + '.document.images[where + which].src =' + where + which + '_1.src');
		}
		else{
		document.images[last].src = eval(last + '_0.src')
		document.images[where + which].src = eval(where + which + '_1.src')
		}
	}
	last = where+which
	lastlayer = where
}

old = '0'
function showInfo(div,which){
	if (NS4 || IE4){
		towhich = div + which
		fromwhich = div + old
		if (NS4){
				hide = document.layers[fromwhich]
				show = document.layers[towhich]
		}
		else if (IE4){
				hide = document.all[fromwhich].style
				show = document.all[towhich].style
				
		}
		show.visibility = 'visible'
		hide.visibility = 'hidden'
		old = which
	}
}

var H = 0
function stepWise(direction){
	if(navigator.appVersion < "4"){
		if (direction > 0){
			for (H=0; H<=direction; H=H+200){
	 			self.scroll(H,0);
	 		}
		}else if (direction < 0){
	 		self.scroll(direction,0);
		}
	 }else if(navigator.appVersion >= "4"){ 
	 	if (direction > 0){
	 		for (H=0; H<=direction; H=H+200){
	 			self.scrollTo(H,0);
	 		}
		}else if (direction < 0){
	 		self.scrollTo(direction,0);
		}
	 }
}


function NewWindow( Page,X,Y ){
    if( X == null ) var X=600;
    if( Y == null ) var Y=400;
    var NewWin =  window.open ( Page , "NewWin" , "width=" + X + ",height=" + Y + ",scrollbars=yes,menubar=no" );
    NewWin.window.focus();
}

