// Basic AJAX Functions for site ESV.FI
// (c) 2008 Juha Raivonen
// v1.0


// * Initialize ActiveXObject 
	function InitIt() {
		var xmlhttp=null;
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}
	
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			xmlhttp = new XMLHttpRequest();
		}
		
		return xmlhttp;
	}
	
// * imgswapper 
	function insertImg( X ) {
	
		xmlhttp=InitIt();
		
		kuvaNimi = X;
		
		document.getElementById("ajxImgChg").innerHTML = "<a href='carimg/"+kuvaNimi+"' target='_blank'><img src='carimg/big/"+kuvaNimi+"' alt='"+kuvaNimi+"' title='' border='0'></a>";

	}
