var xmlHttp;
function getXmlHttpObject()
{
	var objxmlHttp=null;
	if (window.XMLHttpRequest)     // Object of the current windows
	{
	    objxmlHttp = new XMLHttpRequest();     // Firefox, Safari, ...
	}
	else if (window.ActiveXObject)   // ActiveX version
	{
		objxmlHttp = new ActiveXObject('Microsoft.XMLHTTP');  // Internet Explorer
	}
	return objxmlHttp;
}

function $(divId){
	return document.getElementById(divId);
}

function stateChanger()
{
	if( xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
	{	
		var temp = xmlHttp.responseText;
		$('loadBox').innerHTML = temp;
		appearMe();
		//alert(temp);
	}
}

function appearMe(){
	if($('shadowWrap')){
		$('shadowWrap').style.display = 'block';
	}
	$('shadBox').style.display = 'block';
	$('loadBox').style.display = 'block';
	//alert('shadow!!!');
}

function closeMe(){
	if($('shadowWrap')){
		$('shadowWrap').style.display = 'none';
	}
	$('shadBox').style.display = 'none';
	$('loadBox').style.display = 'none';
	//alert('no shadow :(');
}

function catalog(){
	xmlHttp = getXmlHttpObject();
	xmlHttp.onreadystatechange=stateChanger;
	var urler = "catalog.html";
	xmlHttp.open('GET', urler,  true);
	xmlHttp.send(null);
}