function init() {
	//
}

function clearInfo(field) {
	field.value = "";
}

function popUp(URL) {
	eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600');");
}

function popUp2(URL) {
	eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=1,width=650,height=600');");
}

function video_popup(URL) {
	eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=500');");
}

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');
	var p = document.getElementById('page-main').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');
	var li = document.getElementById('page-main').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');
	var td = document.getElementById('page-main').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');
	var a = document.getElementById('page-main').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';
		}
	}

	// var span = document.getElementsByTagName('span');
	var span = document.getElementById('page-main').getElementsByTagName("span");
	
	for(n=0; n<span.length; n++) {
		if(span[n].style.fontSize) {
			var size = parseInt(span[n].style.fontSize.replace("px", ""));
		} else {
			var size = 12;
		}

		if (inc==12) {
			size=12;
			span[n].style.fontSize = size + 'px';
		} else {
			span[n].style.fontSize = size+inc + 'px';
		}
	}

	var h1 = document.getElementById('page-main').getElementsByTagName("h1"); 	
	for(n=0; n<h1.length; n++) {	   
		if(h1[n].style.fontSize) {
			var size = parseInt(h1[n].style.fontSize.replace("px", ""));
		} else {
			var size = 26;
		}
		    
		if (inc==26) {
			size=26;
			h1[n].style.fontSize = size + 'px';	
		} else {
			h1[n].style.fontSize = size+inc + 'px';
		}
	}

	var h2 = document.getElementById('page-main').getElementsByTagName("h2");
	for(n=0; n<h2.length; n++) {
		if(h2[n].style.fontSize) {
			var size = parseInt(h2[n].style.fontSize.replace("px", ""));
		} else {
			var size = 16;
		}

		if (inc==16) {
			size=16;
			h2[n].style.fontSize = size + 'px';	
		} else {
			h2[n].style.fontSize = size+inc + 'px';
		}
	}

	var h3 = document.getElementById('page-main').getElementsByTagName("h3");
	for(n=0; n<h3.length; n++) {	   
		if(h3[n].style.fontSize) {
			var size = parseInt(h3[n].style.fontSize.replace("px", ""));
		} else {
			var size = 16;
		}
		    
		if (inc==16) {
			size=16;
			h3[n].style.fontSize = size + 'px';	
		} else {
			h3[n].style.fontSize = size+inc + 'px';
		}
	}

/*
	var txt = document.getElementById('txt');
	for(n=0; n<txt.length; n++) {
		if(txt[n].style.fontSize) {
			var size = parseInt(txt[n].style.fontSize.replace("px", ""));
		} else {
			var size = 26;
		}
		    
		if (inc==26) {
			size=26;
			txt[n].style.fontSize = size + 'px';
		} else {
			txt[n].style.fontSize = size+inc + 'px';
		}
	}
*/
}

function news_archive_year()   {
   var w = document.news_archive.archive_year.selectedIndex;
   var url_add = document.news_archive.archive_year.options[w].value;
   window.location.href = url_add;
}

function select_itella_country_en ()
{
        if (document.itella.itella_country.options[0].selected) {
                alert("Please select a country.");
        }
        else {
                var w = document.itella.itella_country.selectedIndex;
                var url_add = document.itella.itella_country.options[w].value;
                window.location.href = url_add;
        }
}

function select_itella_country_fi ()
{
        if (document.itella.itella_country.options[0].selected) {
                alert("Valitse haluamasi maa, ole hyvä.");
        }
        else {
                var w = document.itella.itella_country.selectedIndex;
                var url_add = document.itella.itella_country.options[w].value;
                window.location.href = url_add;
        }
}

function select_itella_country_sv ()
{
        if (document.itella.itella_country.options[0].selected) {
                alert("Var god och välj ett land.");
        }
        else {
                var w = document.itella.itella_country.selectedIndex;
                var url_add = document.itella.itella_country.options[w].value;
                window.location.href = url_add;
        }
}

try {
	document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}