/*			
			var _officeItemListCombobox1 = null;
			var _officeItemListCombobox2 = null;
			var _officeItemListCombobox3 = null;
			var _officeItemListCombobox4 = null;
			var _officeItemListCombobox5 = null;
			var _officeItemListCombobox6 = null;
			var _officeItemListCombobox7 = null;
			var _officeItemListCombobox8 = null;
			var _officeItemListCombobox9 = null;
			var _officeItemListCombobox10 = null;
			var _officeItemListCombobox11 = null;
			var _officeItemListCombobox12 = null;
			
 			var _cssStyleSelectJQ = null;
  			//var _animationTypeSelectJQ = null;
  			var _animationType = "slide"; 
			$(function()
			{
					var comboboxSettings = {animationSpeed: 100};
					setupCombobox();
					//changeStyle();
			});
			//drop down
			function setupCombobox()
			{
				_officeItemListCombobox1 = $('#ddlState').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox2 = $('#ddlDistrict').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox3 = $('#ddlCategory').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox4 = $('#ddlluk').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox5 = $('#ddlfrom').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 41
					});
					_officeItemListCombobox6 = $('#ddlto').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 41
					});
					_officeItemListCombobox7 = $('#ddlcommunity').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox8 = $('#uxState').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox9 = $('#uxDistrict').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox10 = $('#uxCategory').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox11 = $('#ddlBdistrict').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
					_officeItemListCombobox12 = $('#ddlBCategory').combobox(
					{
						comboboxContainerClass: "comboboxContainer",
						comboboxValueContentContainerClass: "comboboxValueContainer",
						comboboxValueContentClass: "comboboxValueContent",
						comboboxDropDownClass: "comboboxDropDownContainer",
						comboboxDropDownButtonClass: "comboboxDropDownButton",
						comboboxDropDownItemClass: "comboboxItem",
						comboboxDropDownItemHoverClass: "comboboxItemHover",
						comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
						comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
					},
					{
						animationType: _animationType,
						width: 85
					});
			}*/
			
			/*function changeStyle()
			{
				selectedStyle = "dropdownjquery/combobox_mac.css";
				$("link[@title='combobox']").attr("href", selectedStyle);
			}*/
			//new page
			function ajaxInfor(Id)
			{
				if(Id=="1")
				{
					if (document.getElementById('lblPageNo').innerHTML < document.getElementById('lblMaxPage').innerHTML)
						//alert(document.getElementById('lblPageNo').innerHTML);
						ajaxfn((document.getElementById('lblPageNo').innerHTML*1)+1);
				}
				else if(Id=="0")
				{
					if (document.getElementById('lblPageNo').innerHTML!="1")
						ajaxfn((document.getElementById('lblPageNo').innerHTML*1)-1);
				}
			}
			function ajaxfn(PageNo)
			{
				var xmlHttp;
				try
				{  // Firefox, Opera 8.0+, Safari  
				xmlHttp=new XMLHttpRequest();  
				}
				catch (e)
				{  // Internet Explorer  
				try
					{   
					xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
					}
					catch (e)
					{    
						try
							{    
							xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
							}
					catch (e)
					{      
					alert("Your browser does not support AJAX!");    
						return false;    
						}  
					} 
				}
				xmlHttp.onreadystatechange=function()
				{
					if(xmlHttp.readyState==4)
					{
						var content  = xmlHttp.responseText;
						document.getElementById('lblInforList').innerHTML=content;
						document.getElementById('lblPageNo').innerHTML=PageNo;
					}
				}
				xmlHttp.open("GET","index.aspx?inforid="+PageNo,true);
				xmlHttp.send(null);  
			}	
// Disable Right Click
 function mousedown() 
    { 
       return false; 
    } 
    function mouseup(e)
    { 
        if(e != null && e.type == "mouseup") 
        { 
            if (e.which==2||e.which==3) 
            { 
                    return false; 
            } } } 
    function contextMenu() 
    { 
        return false; 
    } 
    if (document.layers)
    { 
        document.captureEvents(Event.MOUSEDOWN); 
        document.onmousedown=mousedown;  
    } 
    else 
    { 
        document.onmouseup=mouseup; 
    } 
    document.oncontextmenu=contextMenu; 
    document.ondragstart=new Function("return false")
    document.onselectstart=new Function("return false")
// Disable Right Click Ends
// JScript source code
		
		function ajaxRealDist(txtValue)
         {
           document.Form1.realdistrict.value = document.Form1.uxDistrict.value;
         }

function ajaxFunction()
{

var xmlHttp;

document.Form1.uxDistrict.value ="";
var id =document.Form1.uxState.value;
try
  {  // Firefox, Opera 8.0+, Safari  
  xmlHttp=new XMLHttpRequest();  
  }
catch (e)
  {  // Internet Explorer  
  try
    {   
     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
    }
	catch (e)
    {    
		try
			{    
			  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
		    }
    catch (e)
      {      
       alert("Your browser does not support AJAX!");    
        return false;    
          }  
     } 
   }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      var content  = xmlHttp.responseText;
      var cntParts = content.split("~");
      var ids      = cntParts[1];
      var prdts    = cntParts[0];
      var idList   = ids.split(",");
      var prdtList = prdts.split(",");
      var i;
	    document.getElementById("uxDistrict").options.length = 0;
	    document.Form1.uxDistrict.options[0]= new Option("-District-",0);
       for (i=0; i < prdtList.length; i++)
		{
			//var officeItemListSelectJQ = $("#uxDistrict");
			//officeItemListSelectJQ.append("<option value='" + idList[i] + "'>" + prdtList[i] + "</option>");
			//_officeItemListCombobox9.combobox.update();
			document.Form1.uxDistrict.options[i+1]=new Option(prdtList[i],idList[i]);
		}		
      }
    }
  xmlHttp.open("GET","index.aspx?rest="+id,true);
  xmlHttp.send(null);  
}	
//BD
function ajaxBDDist(txtValue)
         {
           document.Form1.bddistrict.value = document.Form1.ddlDistrict.value;
         }

function ajaxFunctionBD()
{

var xmlHttp;

document.Form1.ddlDistrict.value ="";
var id =document.Form1.ddlState.value;
try
  {  // Firefox, Opera 8.0+, Safari  
  xmlHttp=new XMLHttpRequest();  
  }
catch (e)
  {  // Internet Explorer  
  try
    {   
     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
    }
	catch (e)
    {    
		try
			{    
			  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
		    }
    catch (e)
      {      
       alert("Your browser does not support AJAX!");    
        return false;    
          }  
     } 
   }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      var content  = xmlHttp.responseText;
      var cntParts = content.split("~");
      var ids      = cntParts[1];
      var prdts    = cntParts[0];
      
      var idList   = ids.split(",");
      var prdtList = prdts.split(",");
      var i;
	    document.getElementById("ddlDistrict").options.length = 0;
	    document.Form1.ddlDistrict.options[0]= new Option("District",0);
       for (i=0; i < prdtList.length; i++)
		{
			//var officeItemListSelectJQ = $("#ddlDistrict");
			//officeItemListSelectJQ.append("<option value='" + idList[i] + "'>" + prdtList[i] + "</option>");
			//_officeItemListCombobox2.combobox.update();
			//document.Form1.uxDistrict.options[i+1]=new Option(prdtList[i],idList[i]);
			document.Form1.ddlDistrict.options[i+1]=new Option(prdtList[i],idList[i]);
		}		
      }
    }
  xmlHttp.open("GET","index.aspx?bdst="+id,true);
  xmlHttp.send(null);  
}	
//BD Ends
//Auto
function ajaxAutoDist(txtValue)
         {
           document.Form1.autodistrict.value = document.Form1.ddlautodistrict.value;
         }

function ajaxFunctionAuto()
{

var xmlHttp;

document.Form1.ddlautodistrict.value ="";
var id =document.Form1.ddlautostate.value;
try
  {  // Firefox, Opera 8.0+, Safari  
  xmlHttp=new XMLHttpRequest();  
  }
catch (e)
  {  // Internet Explorer  
  try
    {   
     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
    }
	catch (e)
    {    
		try
			{    
			  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
		    }
    catch (e)
      {      
       alert("Your browser does not support AJAX!");    
        return false;    
          }  
     } 
   }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      var content  = xmlHttp.responseText;
      var cntParts = content.split("~");
      var ids      = cntParts[1];
      var prdts    = cntParts[0];
      
      var idList   = ids.split(",");
      var prdtList = prdts.split(",");
      var i;
	    document.getElementById("ddlautodistrict").options.length = 0;
	    document.Form1.ddlautodistrict.options[0]= new Option("Select a district",0);
       for (i=0; i < prdtList.length; i++)
		{
		document.Form1.ddlautodistrict.options[i+1]=new Option(prdtList[i],idList[i]);
		}		
      }
    }
  xmlHttp.open("GET","index.aspx?aust="+id,true);
  xmlHttp.send(null);  
}	
//Auto Ends
function validateRE()
{
if (document.getElementById("uxState").selectedIndex == 0)
		{
			alert("Select State");
			document.getElementById("uxState").focus();	
			return false;			
		}	 
	if (document.getElementById("uxDistrict").selectedIndex == 0)
		{
			alert("Select District");
			document.getElementById("uxDistrict").focus();
			return false;				
		}
		return true;
}
function validateBD()
{
if (document.getElementById("ddlCategory").selectedIndex == 0)
		{
			alert("Select Category");
			document.getElementById("ddlCategory").focus();	
			return false;			
		}
		return true;
}
function ValidateExpo() {
    if (document.getElementById("ddlBdistrict").selectedIndex == 0) {
        alert("Select District");
        document.getElementById("ddlBdistrict").focus();
        return false;
    }
    return true;
}
function validateBDNew() {
    debugger;
    if (document.getElementById('rdlBDCat_0').checked == true) {
        if (document.getElementById("ddlBSDCategory").selectedIndex == 0) {
            alert("Select Category");
            //document.getElementById("ddlBSDCategory").focus();
            return false;
        }
    }else if (document.getElementById('rdlBDCat_1').checked == true) {
    if (document.getElementById("ddlPISCategory").selectedIndex == 0) {
            alert("Select Category");
            //document.getElementById("ddlHNCategory").focus();
            return false;
        }
    }else if (document.getElementById('rdlBDCat_2').checked == true) {
    if (document.getElementById("ddlHNCategory").selectedIndex == 0) {
            alert("Select Category");
            //document.getElementById("ddlPISCategory").focus();
            return false;
        }
    }
    return true;
}

function ajaxFunctionBD(id) {

    var xmlHttp;

//    document.Form1.ddlautodistrict.value = "";
//    var id = document.Form1.ddlautostate.value;
    try {  // Firefox, Opera 8.0+, Safari  
        xmlHttp = new XMLHttpRequest();
    }
    catch (e) {  // Internet Explorer  
        try {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            try {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) {
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }
    xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState == 4) {
            var content = xmlHttp.responseText;
            var cntParts = content.split("~");
            var ids = cntParts[0];
            var prdts = cntParts[1];

            var idList = ids.split("#");
            var prdtList = prdts.split("#");
            var i;
            document.getElementById("ddlCategory").options.length = 0;
            document.Form1.ddlCategory.options[0] = new Option("-select-", 0);
            for (i = 0; i < prdtList.length; i++) {
                document.Form1.ddlCategory.options[i + 1] = new Option(prdtList[i], idList[i]);
            }
        }
    }
    xmlHttp.open("GET", "index.aspx?bdid=" + id, true);
    xmlHttp.send(null);
}

function ajaxBDValue() {
    document.Form1.txtBDId.value = document.Form1.ddlCategory.value + "###" + document.Form1.ddlCategory[document.Form1.ddlCategory.selectedIndex].text;
}

