var xmlhttp_pu = null;
function init_xmlhttp_pu()
{
	xmlhttp_pu = createXmlHttpPuRequest();
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		xmlhttp_pu.onreadystatechange = getResponsePu;
	}
	else
	{
		try
		{
			xmlhttp_pu.onload = getResponsePu;
		}
		catch(e)
		{
			xmlhttp_pu.onreadystatechange = getResponsePu;
		}
	}
}


function createXmlHttpPuRequest()
{
	var xh = false;
	if(window.XMLHttpRequest)
	{
		xh = new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
		try
		{
			xh = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xh = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xh;
}

function get_pickup(c, top_flag)
{
	init_xmlhttp_pu();
	if (!xmlhttp_pu || xmlhttp_pu.readyState == 1 || xmlhttp_pu.readyState == 2 || xmlhttp_pu.readyState == 3)
	{
			return;
	}

	url = (top_flag ? "" : "../") + "pickup.php?c=" + c;
	resp = getResponsePu;

	if (navigator.appName == "Microsoft Internet Explorer")
	{
		xmlhttp_pu.onreadystatechange = resp;
	}
	else
	{
		try
		{
			xmlhttp_pu.onload = resp;
		}
		catch(e)
		{
			xmlhttp_pu.onreadystatechange = resp;
		}
	}

	xmlhttp_pu.open("GET", url, false);
	xmlhttp_pu.send(null)
}

function getResponsePu()
{
	if (xmlhttp_pu.readyState == 4 && xmlhttp_pu.status == 200)
	{
		var targetd = document.getElementById("pickup_portfolio");
		var res_html = xmlhttp_pu.responseText;
		var flen = res_html.length;
		if (flen > 0)
		{
			targetd.innerHTML = res_html;
		}
	}

}



var xmlhttp_rp = null;
function init_xmlhttp_rp()
{
	xmlhttp_rp = createXmlHttpRpRequest();
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		xmlhttp_rp.onreadystatechange = getResponseRp;
	}
	else
	{
		try
		{
			xmlhttp_rp.onload = getResponseRp;
		}
		catch(e)
		{
			xmlhttp_rp.onreadystatechange = getResponseRp;
		}
	}
}

function createXmlHttpRpRequest()
{
	var xh = false;
	if(window.XMLHttpRequest)
	{
		xh = new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
		try
		{
			xh = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xh = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xh;
}

function get_rel_pages(c)
{
	init_xmlhttp_rp();
	if (!xmlhttp_rp || xmlhttp_rp.readyState == 1 || xmlhttp_rp.readyState == 2 || xmlhttp_rp.readyState == 3)
	{
			return;
	}

	url = "../rel_pages.php?c=" + c;
	resp = getResponseRp;

	if (navigator.appName == "Microsoft Internet Explorer")
	{
		xmlhttp_rp.onreadystatechange = resp;
	}
	else
	{
		try
		{
			xmlhttp_rp.onload = resp;
		}
		catch(e)
		{
			xmlhttp_rp.onreadystatechange = resp;
		}
	}

	xmlhttp_rp.open("GET", url, false);
	xmlhttp_rp.send(null)
}

function getResponseRp()
{
	if (xmlhttp_rp.readyState == 4 && xmlhttp_rp.status == 200)
	{
		var targetd = document.getElementById("box_related_page");
		var res_html = xmlhttp_rp.responseText;
		var flen = res_html.length;
		if (flen > 0)
		{
			targetd.innerHTML = res_html;
		}
	}

}

