<!--
function NewWindow(mypage, myname, w, h, scroll){
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'width='+w+',height='+h+',top=100,left=100,scrollbars='+scroll+',resizable=no'
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
	
	

var state = 'none';
function showhide(layer_ref,msg) {
document.getElementById(layer_ref).innerHTML = msg;
	if (state == 'block') {
	state = 'none';
	}
	else {
	state = 'block';
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
	eval( "document.all." + layer_ref + ".style.display = state");

	}
	if (document.layers) { //IS NETSCAPE 4 or below
	document.layers[layer_ref].display = state;
	}
	if (document.getElementById &&!document.all) {
	hza = document.getElementById(layer_ref);
	hza.style.display = state;
	}
}





function isNumeric(elem, helperMsg){
	alert('asdfasdfs');
	var numericExpression = /^[0-9]+$/;
	if(elem.value.match(numericExpression)){
		return true;
	}else{
		alert(helperMsg);
		elem.focus();
		return false;
	}
}



function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,4)=="req_") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(4,30).toUpperCase();
alert("Taisi jäädä "+shortFieldName+"-kenttä täyttämättä.");
return false;
}
else return true;
}

function confirmSubmit(message){
var agree = confirm("Absolutely sure?\n You want to: "+message+"?");
	if(agree) return true;
	else return false;
}
//-->

