function init() {
	//
}

function clearInfo(field) {
	field.value = "";
}

// E-mail anti-spam
function jcontact(user, domain, suffix)	{
	var user;
	var domain;
	var suffix;
	var suffix2;	

	var searchpat = /\?/;		
	var result = suffix.search(searchpat);
	suffix2 = suffix;
	
	if (result != -1) {
		suffix2 = suffix.slice(0,result);
	}		
	
	document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix2 + '</a>');
}	

// Font resizing
function changeFontSize(inc)	{
	var p = document.getElementsByTagName('p');
		  
	for(n=0; n<p.length; n++) {
		if(p[n].style.fontSize) {
			var size = parseInt(p[n].style.fontSize.replace("px", ""));
		} else {
			var size = 12;
		}
		    
		if (inc==12) {
			size=12;
			p[n].style.fontSize = size + 'px';	
		} else {
			p[n].style.fontSize = size+inc + 'px';
		}
	}

	var li = document.getElementsByTagName('li');	  
	for(n=0; n<li.length; n++) {
		if(li[n].style.fontSize) {
			var size = parseInt(li[n].style.fontSize.replace("px", ""));
		} 
		else {
			var size = 12;
		}
		    
		if (inc==12) {
			size=12;
			li[n].style.fontSize = size + 'px';	
		} 
		else {
			li[n].style.fontSize = size+inc + 'px';
		}
	}

	var td = document.getElementsByTagName('td');
	for(n=0; n<td.length; n++) {
		if(td[n].style.fontSize) {
			var size = parseInt(td[n].style.fontSize.replace("px", ""));
		} 
		else {
			var size = 12;
		}
		    
		if (inc==12) {
			size=12;
			td[n].style.fontSize = size + 'px';
		} 
		else {
			td[n].style.fontSize = size+inc + 'px';
		}
	}
	
	var a = document.getElementsByTagName('a');
	for(n=0; n<a.length; n++) {
		if(a[n].style.fontSize) {
			var size = parseInt(a[n].style.fontSize.replace("px", ""));
		} 
		else {
			var size = 12;
		}
		    
		if (inc==12) {
			size=12;
			a[n].style.fontSize = size + 'px';
		} 
		else {
			a[n].style.fontSize = size+inc + 'px';
		}
	}

}

function openURL(sURL) {
	opener.document.location = sURL;
}

function loadPage()   {
   var w = document.hintalaskuri.hintalaskurilista.selectedIndex;
   var url_add = document.hintalaskuri.hintalaskurilista.options[w].value;
   window.location.href = url_add;
}
	   
function loadPage2()  {
   var w = document.hinta.hintalista.selectedIndex;
   var url_add = document.hinta.hintalista.options[w].value;
   window.location.href = url_add;
}	   
	   
function loadPage3()  {
   var w = document.hintasv.hintalistasv.selectedIndex;
   var url_add = document.hintasv.hintalistasv.options[w].value;
   window.location.href = url_add;
}

function loadPage4()  {
   var w = document.hintaen.hintalistaen.selectedIndex;
   var url_add = document.hintaen.hintalistaen.options[w].value;
   window.location.href = url_add;
}

// IE6 bgimage flicker fix
try {
	document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}