var xmlHttp;
function loadSet(setID){
	try{
    	// Firefox, Opera 8.0+, Safari
    	xmlHttp=new XMLHttpRequest();
    }catch (e){
		// Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e){
			try{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}catch (e){
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			document.getElementById("setContent").innerHTML = xmlHttp.responseText;
		}
	}
	
	xmlHttp.open("POST","products.php?setID=" + setID,true);
	
	xmlHttp.send(null);
	
}

function loadSet_en(setID){
	try{
    	// Firefox, Opera 8.0+, Safari
    	xmlHttp=new XMLHttpRequest();
    }catch (e){
		// Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e){
			try{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}catch (e){
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			document.getElementById("setContent").innerHTML = xmlHttp.responseText;
		}
	}
	
	xmlHttp.open("POST","products_en.php?setID=" + setID,true);
	
	xmlHttp.send(null);
	
}

function loadSet_se(setID){
	try{
    	// Firefox, Opera 8.0+, Safari
    	xmlHttp=new XMLHttpRequest();
    }catch (e){
		// Internet Explorer
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e){
			try{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}catch (e){
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			document.getElementById("setContent").innerHTML = xmlHttp.responseText;
		}
	}
	
	xmlHttp.open("POST","products_se.php?setID=" + setID,true);
	
	xmlHttp.send(null);
	
}


function loadSet_ru(setID){
  
  urli = "products_ru.php?setID=" + setID;
  
  new Ajax.Updater('setContent', urli , { method: 'get' });
  return false;
  
	//xmlHttp.open("POST","products_ru.php?setID=" + setID,true);
	
	//xmlHttp.send(null);
	
}



function openColorImage(productID, langID){
	imgWin = window.open( "kuva.php?product="+productID+"&langID="+langID, "colours", "status = 1, height = 800, width = 700, resizable = 1, scrollbars = yes" );
  
  imgWin.focus();
	
}
