// JavaScript Document
var openListing='';
var selected = '';
var HTTPTask=getHTTPObject();
var HTTPList=getHTTPObject();
var HTTPshowCases=getHTTPObject();
var HTTPCheckUserCases=getHTTPObject();
var currentSortType = null;
var currentSortArg = null;
function getHTTPObject() {
var xmlhttp;
/*@cc_on
@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@else
xmlhttp = false;
@end @*/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
return xmlhttp;
}

function listing(divId){
	listingOpen = new Image();
	listingOpen.src = "images/explore/expanded.gif";
	
	listingClosed = new Image();
	listingClosed.src = "images/explore/collapsed.gif";
	
	if(document.getElementById(divId).style.display=="none"){
		if(openListing!=""){ 
			//new Effect.SlideUp(document.getElementById(openListing),{duration:.3});
			//document.getElementById("case_img_"+openListing).src=listingClosed.src;
		}
		new Effect.SlideDown(document.getElementById(divId),{duration:.3});		
		document.getElementById("explore_"+divId).src=listingOpen.src;
		openListing=divId;
	}else{
		new Effect.SlideUp(document.getElementById(divId),{duration:.3});
		document.getElementById("explore_"+divId).src=listingClosed.src;
		openListing="";
	}
}
function toggleDiv(div){
	showStatus(true);
	if(document.getElementById(div).style.display=="none"){
		new Effect.SlideDown(document.getElementById(div),{duration:.3});		
	}else{
		new Effect.SlideUp(document.getElementById(div),{duration:.3});
	}
	showStatus(false);
}
function openDiv(div){	
	if(document.getElementById(div).style.display=="none"){
		new Effect.SlideDown(document.getElementById(div),{duration:.3});	
	}	
}
function closeDiv(div){
	if(document.getElementById(div).style.display!="none"){
		new Effect.SlideUp(document.getElementById(div),{duration:.3});	
	}
}
function displayControl(page){
	var frame =	document.getElementById('pageViewFrame');
	frame.src=page;
}

