function setImageSrc(path){
	if (type=="IE") {
		eval("document.all." + "imagelayerid" + ".src='" + path + "'"); }
	if (type=="NN")	{
		eval("document." + "imagelayerid" + ".style.left='" + path + "'"); }
	if (type=="MO" || type=="OP")	{
		eval("document.getElementById('" + "imagelayerid" + "').style.left='" + path + "'"); }
}

function doload(url,eleid, showimage, height) {

	showimage = typeof(showimage) != 'undefined' ? showimage : true;
	height = typeof(height) != 'undefined' ? height : 0;
	
	if(showimage == true) {
		if(height > 0)
			document.getElementById(eleid).innerHTML = "<div align=center style='height:"+height+"px;'><img src='images/loading.gif'/></div>";
		else
			document.getElementById(eleid).innerHTML = "<div align=center ><img src='images/loading.gif'/></div>";
	}
	
	obj = new customAjax(url,'get',eleid);
}

function customAjax(url,method,eleid) {
		
	  var xmlhttp = false;
	  if (window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest();
	  }
	  else if (window.ActiveXObject)// code for IE
	  {
		try
		{
		  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		  try
		  {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (E) {
			xmlhttp=false;
		  }
		}
	  }
	  if(xmlhttp)
	  {
		  xmlhttp.onreadystatechange=function()
		{
			if(xmlhttp && xmlhttp.readyState==4)
			{
				if (xmlhttp.status==200)
				{
					document.getElementById(eleid).innerHTML = "";
					document.getElementById(eleid).innerHTML = xmlhttp.responseText;
					
					callBackFunction(eleid);
				}
				else
				{
				}
			}
			else
			{
			//alert(xmlhttp.readyState);
			}
		}
		  xmlhttp.open(method,url,true);
		  xmlhttp.send(null);
	  }
	  else
	  {
	  	alert("Unable to creat Ajax Object for this browser");
	  }
	}


function setfocus(valid)
{
	if(valid == 'login')
	{
		document.getElementById('uname').focus();	
	}
}


function load_more_testimonial(url,method,eleid,start,limit) 
	{
	  var next_limit = parseInt(start) + parseInt(limit);
	  var xmlhttp = false;
	  if (window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest();
	  }
	  else if (window.ActiveXObject)// code for IE
	  {
		try
		{
		  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		  try
		  {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (E) {
			xmlhttp=false;
		  }
		}
	  }
	  if(xmlhttp)
	  {
		  xmlhttp.onreadystatechange=function()
		{
			if(xmlhttp && xmlhttp.readyState==4)
			{
				if (xmlhttp.status==200)
				{
					document.getElementById('limit').value = next_limit;
					document.getElementById(eleid).innerHTML = document.getElementById(eleid).innerHTML + xmlhttp.responseText;
					document.getElementById('loading').style.display = 'none';
					
					callBackFunction(eleid);
				}
			}
			else
			{
			//alert(xmlhttp.readyState);
			}
		}
   		  url = url+next_limit+"&limit="+parseInt(limit);
		  xmlhttp.open(method,url,true);
		  xmlhttp.send(null);
	  }
	  else
	  {
	  	alert("Unable to creat Ajax Object for this browser");
	  }
	}

function loading()
{

	document.getElementById('loading').style.display = 'block';
	$('#loading').html('<p><img src="images/testimonial-ajax-loader.gif"/></p>');
	//$('#viewmore').load("/examples/ajax-loaded.html");

}