function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{
			try{
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}

		return xmlhttp;
}
	
function photoajax(strURL,div_id)

	 {
  var req = getXMLHTTP();
		if (req) {
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {
						document.getElementById(div_id).innerHTML=req.responseText;
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}
			}
			req.open("GET", strURL, true);
			req.send(null);
		}
   }
   
//Ajax with small loading image
function captionajax(strURL,div_id)

	 {
 	var req = getXMLHTTP();
		if (req) {
			req.onreadystatechange = function() {
                if(req.readyState < 4){
                    //You can add animated gif while loading //
                    document.getElementById(div_id).innerHTML = '<img src="images/misc/ajaxloader01.gif" style="padding: 3px 0px 0px 3px;"/> <i>Loading content...</i>';
                }
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {
						document.getElementById(div_id).innerHTML=req.responseText;
					} else {
						document.getElementById(div_id).innerHTML = '<img src="images/misc/ajaxloader01.gif" style="padding: 3px 0px 0px 3px;"> <i>Loading content...</i>';
					}
				}
			}
			req.open("GET", strURL, true);
			req.send(null);
		}
	}

function enlargeajax(strURL,div_id)

	 {
		var req = getXMLHTTP();
		if (req) {
			req.onreadystatechange = function() {
                if(req.readyState < 4){
                    //You can add animated gif while loading //
                    document.getElementById(div_id).innerHTML = '<p  align="center"><img src="images/misc/ajaxloader02.gif"/></p>';
                }
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {
						document.getElementById(div_id).innerHTML=req.responseText;
					} else {
						document.getElementById(div_id).innerHTML = '<p  align="center"><img src="images/misc/ajaxloader02.gif"/></p>';
					}
				}
			}
			req.open("GET", strURL, true);
			req.send(null);
		}
	}

