var xmlhttp;



function showImage(str,page,email)

{

cdate=str;	

xmlhttp=GetXmlHttpObject();

if (xmlhttp==null)

  {

  alert ("Browser does not support HTTP Request");

  return;

  }



var url="getimage.php";

url=url+"?id="+str+"&page="+page+"&email="+email;

url=url+"&sid="+Math.random();

xmlhttp.onreadystatechange=imageChanged;

xmlhttp.open("GET",url,true);

xmlhttp.send(null);

}



function imageChanged()

{





if (xmlhttp.readyState==4)

if (xmlhttp.responseText=="")

{

//document.getElementById("warning").innerHTML="<span class=\"oops\">&nbsp;&nbsp;&nbsp;&nbsp; Oops!! There's no strip for this date: "+cdate+"</span>";
document.getElementById("warning").innerHTML="<span class=\"oops\">&nbsp;&nbsp;&nbsp;</span>";
	if(document.getElementById("dynamic"))

	{

	

		

	document.getElementById("allcomments").style.display = "none";  

	document.getElementById("comments").style.display = "none";  

//	document.getElementById("carrow").style.display = "none";  

//	document.getElementById('arrow').src="images/arrow_plain_right.gif";



	}

}

else

{



disparrow="";

if(document.getElementById("dynamic"))

	{

	document.getElementById("allcomments").style.display = "block"; 

	document.getElementById("comments").style.display = "block";   

	disp=document.getElementById("dynamic").style.display ; 

	disparrow=document.getElementById("arrow").src;

	}

document.getElementById("strip").innerHTML=xmlhttp.responseText; 

document.getElementById("warning").innerHTML="";

if(document.getElementById("comicsdateid")) document.commentform.comicsdate.value=cdate; else document.loginform.comicsdate.value=cdate;

	if(disparrow!="")

	{

	document.getElementById("arrow").src=disparrow;

	document.getElementById("dynamic").style.display = disp;  

	}

}

}



function GetXmlHttpObject()

{

if (window.XMLHttpRequest)

  {

  // code for IE7+, Firefox, Chrome, Opera, Safari

  return new XMLHttpRequest();

  }

if (window.ActiveXObject)

  {

  // code for IE6, IE5

  return new ActiveXObject("Microsoft.XMLHTTP");

  }

return null;

}
