/**********************Displaying the Light Box for editing an entry*******************/

var loadingimage="<br><br><br><br><br><br><br><span style='margin-left:90px;'><img src='web/images/loading.gif'></img></span>";

function displaylightbox(obj1,obj2)
	{	
		
		document.getElementById("selectbox").style.display="none";
	    document.body.style.overflow="hidden";
		document.getElementById("contents-lightbox").innerHTML="";
		$("div#lightbox").show("slow");
		$("div#lightboxkeywordscontents").show("slow");
		a=obj1;
		b=obj2;
		setTimeout("deffered_lightboxcontents_load(a,b)",1000);
		
	}
	
function deffered_lightboxcontents_load(obj1,obj2)
{
		supportobj=ajxsupport();
		if (supportobj==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
		
		
		var url="image.php?str="+obj1+'&str1='+obj2;

		supportobj.onreadystatechange=responsevalue;		
		supportobj.open("GET",url,true);
		supportobj.send(null);
		}
	
	function ajxsupport()
	{
		var supportobj=null;
		try
		{
			supportobj=new XMLHttpRequest();
		}
		catch (e)
		{
			try
			{
				supportobj=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				supportobj=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		return supportobj;
	}

	function responsevalue() 
	{ 
		if (supportobj.readyState==1||supportobj.readyState==2||supportobj.readyState==3)
		{ 
			document.getElementById("contents-lightbox").innerHTML=loadingimage;					
		}

		if (supportobj.readyState==4)
		{ 

			var a=supportobj.responseText;
			document.getElementById("contents-lightbox").innerHTML=a;	
			
			
		}
	}


/* Image load for the inner pages in the light box */	


function displaylightbox1(obj1,obj2)
{	
	deffered_lightboxcontents_load1(obj1,obj2);
}
	function cleardiv()
	{
	document.getElementById("contents-lightbox").innerHTML="";

	}
	
function deffered_lightboxcontents_load1(obj1,obj2)
{
supportobj=ajxsupport1();
		if (supportobj==null)
		{
			alert ("Your browser does not support AJAX!");
			return;
		} 
	
		var url="image.php?str="+obj1+'&str1='+obj2;
		supportobj.onreadystatechange=responsevalue;		
		supportobj.open("GET",url,true);
		supportobj.send(null);
		}
	
	function ajxsupport1()
	{
		var supportobj=null;
		try
		{
			supportobj=new XMLHttpRequest();
		}
		catch (e)
		{
			try
			{
				supportobj=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				supportobj=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		return supportobj;
	}

	
	
/* Closing the lightbox */	

function closelightbox()
{
		document.getElementById("selectbox").style.display="block";
	    document.body.style.overflow="visible"; 
		document.getElementById('lightbox').style.display="none";
		document.getElementById('lightboxkeywordscontents').style.display="none";
}


/**********************Displaying the Light Box for editing an entry*******************/

