function go2()
{
	document.search.keyword.value=document.search.q.value;
	if (document.search.selectsearch.options[document.search.selectsearch.selectedIndex].value=='K')
	{			
		document.search.action = "http://www.khoj.com/bin/khojsearch";
		document.search.submit();
		return true;
	}
	else
	{
		document.search.action = "http://search.sify.com/cgi-bin/search.pl";	
		document.search.submit();
		return true;
	}	
}
function search_keyword()
{
    var lstparent_selind = document.cat_search.lstParentCategory.selectedIndex;
    var ad_city_selind = document.cat_search.ad_cty.selectedIndex;
	var ad_type_selind = document.cat_search.ad_type.selectedIndex;
	var cty_val = document.cat_search.ad_cty.options[ad_city_selind].value;
 	var ad_type = "Select Ad Type";
 	if (ad_type_selind > 0) {
	 	ad_type = document.cat_search.ad_type.options[ad_type_selind].value;
	}
    if(lstparent_selind <=0)
	{
		alert("Select a Category");
		document.cat_search.lstParentCategory.focus();
		return false;
	}
	else if(ad_type_selind <=0)
	{
		alert("Select a Adtype");
		document.cat_search.ad_type.focus();
		return false;
	}
	else		    
    {
        document.cat_search.set_adtype.value = ad_type; 	
	    document.cat_search.submit();
   	}
}
function toAdv_search()
{
    var lstparent_selind = document.cat_search.lstParentCategory.selectedIndex;
    var ad_city_selind = document.cat_search.ad_cty.selectedIndex;
	var ad_type_selind = document.cat_search.ad_type.selectedIndex;
	var cty_val = document.cat_search.ad_cty.options[ad_city_selind].value;
    var ad_type = "Select Ad Type";
 	if (ad_type_selind > 0) {
	 	ad_type = document.cat_search.ad_type.options[ad_type_selind].value;
	}
    if(lstparent_selind <=0)
	{
		alert("Select a Category");
		document.cat_search.lstParentCategory.focus();
		return false;
	}
    else if(cty_val == "adv")
    {
 			document.cat_search.set_adtype.value = ad_type;
	    	document.cat_search.action='advsearch.php';
			document.cat_search.method="POST";
			document.cat_search.submit();
	}
	else		    
    {
        	return false;
   	}
}
function search_product()
{
	f = document.ssform;
	if(f.ProductName.value == "")
	{
		alert("Enter Product Name");
		f.ProductName.focus();
		return;
	}
	else
	{
		f.action = "http://seekandsource.com/scripts/SearchResult.aspx";
		f.submit();
	}
}
function goSearch()
{
	if(document.advSearchForm.lstParentCategory.value == "")
	{
		alert("Choose Category");
		document.advSearchForm.lstParentCategory.focus();
		return ;
	}
	if(document.advSearchForm.lstChildCategory.value == "")
	{
		alert("Choose Sub Category");
		document.advSearchForm.lstChildCategory.focus();
		return;
	}
	else
	{
		document.advSearchForm.cat_id.value = document.advSearchForm.lstParentCategory.value;
		document.advSearchForm.submit();
	}
}
function sort_ad()
{
	var frm = document.sortAdForm;	
	frm.submit();
}
function goAdvSearch()
{
	if(document.frmkeysearch.lstParentCategory.value == "")
	{
		alert("Choose Category");
		document.frmkeysearch.lstParentCategory.focus();
		return false;
	}
	if(document.frmkeysearch.lstChildCategory.value == "")
	{
		alert("Choose Sub Category");
		document.frmkeysearch.lstChildCategory.focus();
		return false;
	}
	else
	{
		document.frmkeysearch.cat_id.value = document.frmkeysearch.lstParentCategory.value;
		document.frmkeysearch.submit();	
	}
}
function reloadForm(form_name,action,elem,cat)
{
	var frm = eval("document."+form_name);
	var cityoptions = eval("frm."+elem+".options[frm."+elem+".selectedIndex].value"); 
	var category = eval("frm."+cat+".value");
	frm.is_city_reload.value = "Y";
	frm.action = action;
	frm.submit();
}

	

			

	
	
	
