function validateSearch()
	{
		var Svalidator=0;
				if(!(document.getElementById("txtSearch").value=="" || document.getElementById("txtSearch").value=="type keyword"))
				{
					Svalidator=1;
				}
				if(document.getElementById("divSerchBox").innerHTML!=""){
				if(document.getElementById("topicIdIndex").value!="")
				{
					Svalidator=1;
				}
				if(document.getElementById("catIdIndex").value!="")
				{
					Svalidator=1;
				}
				if(document.getElementById("subCatIdIndex").value!="")
				{
					Svalidator=1;
				}}
			if(Svalidator==0)
				{	
				alert("please select atleast one Search Condition.");
				document.formSearch.txtSearch.focus();
				return false;
				}
			return true;
	}
function getCheckedValue() {
	for(var i = 0; i < document.formPoll.PollRadio.length; i++) {
		if(document.formPoll.PollRadio[i].checked) {
			return document.formPoll.PollRadio[i].value;
		}
	}
	return "";
}
function getCheckedValueMem() {
	for(var i = 0; i < document.formmemPoll.PollRadioMem.length; i++) {
		if(document.formmemPoll.PollRadioMem[i].checked) {
			return document.formmemPoll.PollRadioMem[i].value;
		}
	}
	return "";
}

function doit(id) {
htmfile="pollResult.asp?id="+id+"&vote="+getCheckedValue()
	popUpWin = window.open(htmfile,'pollWin','height=310,width=250,toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=yes,resizable=1')
	if (navigator.appName == 'Netscape') {
		popUpWin.focus()
	}
 }
function doit1(id) {
htmfile="pollResult-a.asp?id="+id
	popUpWin = window.open(htmfile,'AuthenticatedPollWin','height=400,width=500,toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=yes,resizable=1')
	if (navigator.appName == 'Netscape') {
		popUpWin.focus()
	}
 }
function fClear()
	{
		document.getElementById("txtSearch").value="";
	}

function f_poll(strid,PollMsg)
{
	comments=encodeURI(document.getElementById("comments").value);
url="AjaxsubmitPoll.asp?id="+strid+"&vote="+getCheckedValueMem()+"&comments="+comments;
//alert(comments);

var xmlHttp=new CreateObject1();
xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
    	document.getElementById(PollMsg).innerHTML=xmlHttp.responseText;
	 }
    }
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);

 }

 function CreateObject1()
{
 http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
return http_request;
}

//*************** Advance Search Box ********
function fNormalSide()
{  document.getElementById("divSerchBox").innerHTML="";  
         document.getElementById("divButSearch").innerHTML="<a href='javascript:fAdvanceSide();' class='ds-innerlinks4a'>Advance Search</a>";  
    
	}

function fAdvanceSide()
{
	var url = "ajaxSearchBoxesSide.asp";  
 var parameters = "id=1"; 
 var xmlHttp=new CreateObjectIndex();
 xmlHttp.open("POST", url, true);  
 //Send the proper header information along with the request  
 xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");  
 xmlHttp.setRequestHeader("Content-length", parameters .length);  
 xmlHttp.setRequestHeader("Connection", "close");  
 xmlHttp.onreadystatechange = function() {//Handler function for call back on state change.  
     if(xmlHttp.readyState == 4) { 
         document.getElementById("divSerchBox").innerHTML=xmlHttp.responseText;  
       // document.getElementById("divButSearch").innerHTML="";  
     }  
 }  
 xmlHttp.send(parameters); 
}

