var preloadFlag = true;

function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}

function changeImages() {
	changeImagesArray(changeImages.arguments);
}

//POPPIUPPI KESKELLE
var win = null;
function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
//Informational purposes only -
// 750 - width
// 450 - height
// resizable - window can be resized
// scrollbars - window displays the scrollbar on the right
// status - window displays the status bar at the bottom
// toolbar - window displays the toolbar at the top
// Note: href="#null" makes the link display as a link. Don't leave it out!


// ladataan sivu uudestaan, käyttö esim. onResizen yhteydessä
function redo() {
  location.reload();
}

function SetWidth() {
// kehys-layerin leveys täytyy olla erilainen eri selaimilla

n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
ie6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? 1:0
NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)? 1:0
//firefox = (userAgent.indexOf( "Firefox/" ) != -1 )? 1:0;


<!--

	if(ie){
		document.all["kehys"].style.pixelWidth=778
	}
	//if((NS6) || (firefox)) {
	//	document.getElementById("kehys").style.width=799
	//}

	if(ie6){
		document.getElementById("kehys").style.width=778
	}
}


