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 stateChanged() 
{
	document.getElementById("blueBox").innerHTML="<div class='loading'>&nbsp;</div>";       
	setTimeout("stateChangedAfterTimeout()",500);
	
}
function stateChangedAfterTimeout(){
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
	 	document.getElementById("blueBox").innerHTML=xmlHttp.responseText 
	 }else{
	    document.getElementById("blueBox").innerHTML="<div class='loading'>&nbsp;</div>";   
	 } 
}

function show_pic(id){
	xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null){
		alert ("This browser does not support HTTP Request.")
		return
	}
	style = document.getElementById("subListBox-"+id).style.display; 
	document.getElementById("blueBox").innerHTML="<div class='loading'>&nbsp;</div>";   
	var url="show_pic.php"
	url=url+"?folder_id="+id+"&style="+style;
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null) 
}

//subListBox-32
//document.getElementById("id").style.property