function showsubcategoryofferLogin(pid,id)
{
  //alert(pid);
  //alert('here');
  //alert(id);
 if(id=='pcat')
  {  
   document.getElementById('subcat').innerHTML='';
   document.getElementById('sub1cat').innerHTML='';
   document.getElementById('offer').innerHTML='';
  }
if(id=='scat')
{
  //alert(id);
 document.getElementById('sub1cat').innerHTML='';
 document.getElementById('offer').innerHTML='';
}
  var xmlHttp = getXmlHttpRequest();
  xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState==4 && xmlHttp.status==200){
       //alert(xmlHttp.responseText);
       var rettext = xmlHttp.responseText;
       myString = new String(xmlHttp.responseText);
       //alert(myString);
       flag = /111111/.test(myString);
       //alert(flag+'aaaaaaa');
       if(/111111/.test(myString))
       {
       //alert("subcat2222222222");
       //alert(xmlHttp.responseText)
       document.getElementById('subcat').innerHTML=xmlHttp.responseText.replace( /111111/, '');
       myString=''; 
       }
       flag1 = /222222/.test(myString);
       //alert(flag1+'bbbbb');
       if(/222222/.test(myString))
       {
       //alert("sub1cat33333333333");
       //alert(xmlHttp.responseText)
       document.getElementById('sub1cat').innerHTML=xmlHttp.responseText.replace( /222222/, '');
       myString='';
       }
       if(myString)
       {
       //alert(xmlHttp.responseText)
       //alert(document.getElementById('offer').innerHTML=xmlHttp.responseText);
       document.getElementById('offer').innerHTML=xmlHttp.responseText;
       myString='';
       } 
     }   
  }
  //alert(path);
  /*if(id=='pcat')
  {
    document.getElementById('subcat').innerHTML='';
    document.getElementById('sub1cat').innerHTML='';
    path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text ;
  }
  if(id=='scat')
  {
  path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
          + document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text; 
  }
  if(id=='scat1')
  {
  path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
         +document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text + '>>>'
         + document.getElementById('scat1').options[document.getElementById('scat1').selectedIndex].text; 
  }
  document.getElementById('lable').innerHTML= path*/
  //alert(pid);
  //alert(BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?parentid='+pid+'&id='+id);
  xmlHttp.open('GET',BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?case=login&parentid='+pid+'&id='+id, true);
  //xmlHttp.open('GET',BASE_URL+'/webadmin/ajaxResponse.html?parentid=13', true);
 xmlHttp.send(null);
}
function showsubcategoryadmin(pid,id)
{
 if(id=='pcat')
  {  
   document.getElementById('subcat').innerHTML='';
   document.getElementById('sub1cat').innerHTML='';
   
  }
if(id=='scat')
{
 //alert(id);
 document.getElementById('sub1cat').innerHTML='';
}
  var xmlHttp = getXmlHttpRequest();
  xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState==4 && xmlHttp.status==200){
       //alert(xmlHttp.responseText);
       var rettext = xmlHttp.responseText;
       myString = new String(xmlHttp.responseText);
       //alert(myString);
       flag = /111111/.test(myString);
       //alert(flag+'aaaaaaa');
       if(/111111/.test(myString))
       {
       //alert("subcat2222222222");
       //alert(xmlHttp.responseText)
       document.getElementById('subcat').innerHTML=xmlHttp.responseText.replace( /111111/, '');
       myString=''; 
       }
       flag1 = /222222/.test(myString);
       //alert(flag1+'bbbbb');
       if(/222222/.test(myString))
       {
       //alert("sub1cat33333333333");
       //alert(xmlHttp.responseText)
       document.getElementById('sub1cat').innerHTML=xmlHttp.responseText.replace( /222222/, '');
       myString='';
       }
    }   
 }
  //alert(path);
  /*if(id=='pcat')
  {
    document.getElementById('subcat').innerHTML='';
    document.getElementById('sub1cat').innerHTML='';
    path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text ;
  }
  if(id=='scat')
  {
  path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
          + document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text; 
  }
  if(id=='scat1')
  {
  path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
         +document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text + '>>>'
         + document.getElementById('scat1').options[document.getElementById('scat1').selectedIndex].text; 
  }
  document.getElementById('lable').innerHTML= path*/
  //alert(pid);
  //alert(BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?parentid='+pid+'&id='+id);
  xmlHttp.open('GET',BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?case=admin&parentid='+pid+'&id='+id, true);
  //xmlHttp.open('GET',BASE_URL+'/webadmin/ajaxResponse.html?parentid=13', true);
  xmlHttp.send(null);
}


function showsubcategoryoffer(pid,id)
{
  //alert(pid);
  //alert('here');
  //alert(id);
 if(id=='pcat')
  {  
   document.getElementById('subcat').innerHTML='';
   document.getElementById('sub1cat').innerHTML='';
   document.getElementById('offer').innerHTML='';
  }
if(id=='scat')
{
  //alert(id);
 document.getElementById('sub1cat').innerHTML='';
 document.getElementById('offer').innerHTML='';
}
  var xmlHttp = getXmlHttpRequest();
  xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState==4 && xmlHttp.status==200){
       //alert(xmlHttp.responseText);
       var rettext = xmlHttp.responseText;
       myString = new String(xmlHttp.responseText);
       //alert(myString);
       flag = /111111/.test(myString);
       //alert(flag+'aaaaaaa');
       if(/111111/.test(myString))
       {
       //alert("subcat2222222222");
       //alert(xmlHttp.responseText)
       document.getElementById('subcat').innerHTML=xmlHttp.responseText.replace( /111111/, '');
       myString=''; 
       }
       flag1 = /222222/.test(myString);
       //alert(flag1+'bbbbb');
       if(/222222/.test(myString))
       {
       //alert("sub1cat33333333333");
       //alert(xmlHttp.responseText)
       document.getElementById('sub1cat').innerHTML=xmlHttp.responseText.replace( /222222/, '');
       myString='';
       }
       if(myString)
       {
       //alert(xmlHttp.responseText)
       //alert(document.getElementById('offer').innerHTML=xmlHttp.responseText);
       document.getElementById('offer').innerHTML=xmlHttp.responseText;
       myString='';
       } 
     }   
  }
  //alert(path);
  /*if(id=='pcat')
  {
    document.getElementById('subcat').innerHTML='';
    document.getElementById('sub1cat').innerHTML='';
    path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text ;
  }
  if(id=='scat')
  {
  path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
          + document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text; 
  }
  if(id=='scat1')
  {
  path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
         +document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text + '>>>'
         + document.getElementById('scat1').options[document.getElementById('scat1').selectedIndex].text; 
  }
  document.getElementById('lable').innerHTML= path*/
  //alert(pid);
  //alert(BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?parentid='+pid+'&id='+id);
  xmlHttp.open('GET',BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?case=offer&parentid='+pid+'&id='+id, true);
  //xmlHttp.open('GET',BASE_URL+'/webadmin/ajaxResponse.html?parentid=13', true);
  xmlHttp.send(null);
}


function showsubcategory(pid,id)
{
  //alert(pid);
  //alert('here');
  //alert(id);
  if(id=='pcat')
  {  
    document.getElementById('subcat').innerHTML='';
    document.getElementById('sub1cat').innerHTML='';
    document.getElementById('offer').innerHTML='';
  }
if(id=='scat')
{
  //alert(id);
 document.getElementById('sub1cat').innerHTML='';
 document.getElementById('offer').innerHTML='';
}
var xmlHttp = getXmlHttpRequest();
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState==4 && xmlHttp.status==200){
    //alert(xmlHttp.responseText);
     var rettext = xmlHttp.responseText;
     myString = new String(xmlHttp.responseText);
     //alert(myString);
     flag = /111111/.test(myString);
     //alert(flag+'aaaaaaa');
     if(/111111/.test(myString))
     {
     //alert("subcat2222222222");
     //alert(xmlHttp.responseText)
     document.getElementById('subcat').innerHTML=xmlHttp.responseText.replace( /111111/, '');
     myString=''; 
     }
     flag1 = /222222/.test(myString);
     //alert(flag1+'bbbbb');
     if(/222222/.test(myString))
     {
     //alert("sub1cat33333333333");
     //alert(xmlHttp.responseText)
     document.getElementById('sub1cat').innerHTML=xmlHttp.responseText.replace( /222222/, '');
     myString='';
     }
     if(myString)
     {
     //alert(xmlHttp.responseText)
     //alert(document.getElementById('offer').innerHTML=xmlHttp.responseText);
     document.getElementById('offer').innerHTML=xmlHttp.responseText;
     myString='';
     } 
   }   
}
//alert(path);
/*if(id=='pcat')
{
  document.getElementById('subcat').innerHTML='';
  document.getElementById('sub1cat').innerHTML='';
  path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text ;
}
if(id=='scat')
{
path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
        + document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text; 
}
if(id=='scat1')
{
path = document.getElementById('pcat').options[document.getElementById('pcat').selectedIndex].text + '>>>'
       +document.getElementById('scat').options[document.getElementById('scat').selectedIndex].text + '>>>'
       + document.getElementById('scat1').options[document.getElementById('scat1').selectedIndex].text; 
}
document.getElementById('lable').innerHTML= path*/
//alert(pid);
//alert(BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?parentid='+pid+'&id='+id);
xmlHttp.open('GET',BASE_URL+'/'+MAPADMIN_FOLDER+'/ajaxResponse.html?parentid='+pid+'&id='+id, true);
//xmlHttp.open('GET',BASE_URL+'/webadmin/ajaxResponse.html?parentid=13', true);
xmlHttp.send(null);
}
