function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function xmlhttpRequest(reqUri, szParams, handler)
{
	var url = reqUri+'?'+szParams;
	xmlHttp = GetXmlHttpObject()
	
	if(xmlHttp == null)
	{
		target.innerHTML="ブラウザーはxmlHttpリクェストを対応してません。　もっと新しいブラウザーへアップグレードして下さい";
		return;
	}
	
	xmlHttp.onreadystatechange=handler;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function PasteReturn()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.responseText.length > 0)
		{
			if(document.all)
			{
				document.getElementById("pastearea").value += xmlHttp.responseText;
			}
			else
			{
				document.getElementById("pastearea").innerHTML += xmlHttp.responseText;
			}
		}
	}
}

function scriptLoad()
{
	xmlhttpRequest("noscript.php", "", PasteReturn);
}
