function xmlhttpPost(strURL) {
    var xmlHttpReq = false;
    var self = this;
    
	
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
     //IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
	strURL = strURL 
    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);
        }
    }
	
        self.xmlHttpReq.send(null);    
    
    
}
function getquerystring() {
    var form     = document.forms['form1'];
    var word = form.grpName.value;
	
    qstr = 'grpName=' + escape(word);
    word = form.grpCurr.value;
    qstr += '&grpCurr=' + escape(word);    
    return qstr;
}

function updatepage(str){
    try
    {		
    	
		var resultarr=str.split("#");
	    document.getElementById("productDet").innerHTML = "";
	    document.getElementById("productDet").innerHTML = resultarr[1];
	    document.getElementById("productimg").innerHTML = "";
		document.getElementById("productimg").innerHTML = resultarr[0];
	    //location.href="addAjaxgroup.aspx";
	}
	catch(ex)
	{
	    location.href="ErrorPage.php?error=Unknown Error";
	}
}
function toggle() {
//	alert(document.getElementById("div_stat").value);
	 if(document.getElementById("div_stat").value==0)
	 {
		 if( document.getElementById("hidethis").style.display=='none' ){
		   document.getElementById("hidethis").style.display = '';
		 }else{
		   document.getElementById("hidethis").style.display = 'none';
		 }
	 }
	 else if(document.getElementById("div_stat").value==2)
	 {
	 	document.getElementById("hidethis").style.display = 'none';
	 	document.getElementById("div_stat").value=0;
	 }
}
function ShowSearch()
{
	if(document.getElementById("div_stat").value==0 || document.getElementById("div_stat").value==2)
	{
		document.getElementById("hidethis").style.display = '';
		document.getElementById("div_stat").value=1;
	}
	else
	{
		document.getElementById("hidethis").style.display = 'none';
		document.getElementById("div_stat").value=2;
	}	
}