function xmlhttpPost(strURL, idx, p) 
{
	//var obj_zoom = document.getElementById('zoom');
	//obj_zoom.className='tdhidden';

	var xmlHttpReq = false;
    var self = this;
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText, idx);
        }
    }
    self.xmlHttpReq.send(getquerystring(idx, p));
    
    
}

function getquerystring(idx, p)
{
	
	if(idx=="inst_pres" || idx=="inst_prom" || idx=="inst_gallery" || idx=="inst_google")
	{
		
		//document.getElementById("zoom").className='tdalpha';
		var arr = p.split("***");
		var lang_id = arr[0];
		var prod_id = arr[1];
		var type  = idx;
		
		document.getElementById("tabMainTdContent").innerHTML = '<div style="text-align:center;position:relative;z-index:80000;padding-top:50px"><img src="images/loading.gif" alt="" /></div>';
		
		qstr = 'lang_id=' +lang_id+ '&prod_id=' + prod_id + '&type=' + type;		
	
	}
	
	return qstr;
}

function updatepage(str, idx)
{
	if(idx=="inst_pres" || idx=="inst_prom" || idx=="inst_gallery" || idx=="inst_google")
	{
	
		//document.getElementById("zoom").className='tdnonalpha';
	
	
	
	
		if(idx=='inst_google')
		{
			arr = str.split("*****")			
			document.getElementById("tabMainTd").innerHTML = arr[0];
		
		 
			initialize();
		}
	
		else
		{
			GUnload()
			document.getElementById("tabMainTd").innerHTML = str;
			initLightbox() ;
		}
	}
}
