var xmlHttp;
function checkbrowser()
{
	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;
			}
		}
	}
}

function do_ajax(ding,actie,id,id2)
{
	checkbrowser();
	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			document.getElementById(ding).innerHTML=xmlHttp.responseText;
			
			if (actie=='showprod')
			{
				document.getElementById(ding).className=ding;
				document.getElementById('overlay').className='overlay';
			}
		}
	}
	
	url="/include/ajax.asp?elem="+ding+"&action="+actie+"&id="+id+"&id2="+id2+"&dtm="+Date();
	
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function goto(url,id)
{
	window.location=url + id;
}

function closewin(id1,id2)
{
	document.getElementById(id1).className='hidden';
	document.getElementById(id2).className='hidden';
}

function showwin(id1,id2)
{
	document.getElementById(id1).className=id2;
	document.getElementById(id1).innerHTML='';
}