
function callAjax(url, params, containerID)
{
	$.ajax({
    type: "POST",
    url: url,
    data: params,
    success: function(req) 
    {
				
				//alert(req);return false;
				document.getElementById(containerID).innerHTML = trim(req); 
				
    }
  });
	
}//End of function callAjax(url, params, containerID)...


// callAjax function  with loading image..........
function callAjaxLoading(url, params, containerID, waitText)
{
	var waitImage = 'wait_small.gif';	
	var showWait = loadWaitGif(waitText, waitImage);
	document.getElementById(containerID).innerHTML = showWait;
	
	$.ajax({
    type: "POST",
    url: url,
    data: params,
    success: function(req) 
    {
				document.getElementById(containerID).innerHTML = trim(req);
    }
  });
	
}//End of function callAjaxLoading(url, params, containerID)...


// function added on  14 july 2009 for banner read more functiolity ...........
function readMeFunction(banner_id)
{
	//This will give window height and width...
	var heightWidth = getWindowHeightWidth();			
	var heightWidthArray = heightWidth.split(",");			
	var height = heightWidthArray[0];
	var width = heightWidthArray[1];
	
	$('#popupDiv').show(); 
	
	
	
	// Setting div width...
	$('#popupDiv').css('width' , width - 500);	
	$('#popupDiv').css('left', 250); 
	$('#popupDiv').css('top',  100);
	
	//load popup
	loadPopup(height, width);			
		
	//var banner_id = document.getElementById('banner_id').value;
	//var thumb_name = thumb_name;
				
	var params = "banner_id="+banner_id+"&thumb_name=banner_desc";
	var url = HTTPDISTROOT+'banner/viewimage/';
	var div_id='popupDiv';
	
	// call ajax to fill the div accordingly...
	callAjax(url, params, div_id);
}

