 function showform()
    {
       document.getElementById("savesearch_id").style.display="inline";
    }
  function ajax_saveserach(arg1,arg2,arg3)
    {
      var searchname= document.getElementById("save_id").value;
         if(searchname=='')
           {
               alert("Please Enter Search name :");
               return false;
           }
       var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
        } catch (e){
		// Internet Explorer Browsers
            try{
                ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    try{
                            ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
                        } catch (e){

                                    alert("Your browser broke!");
                                    return false;
                                    }
                            }
                    }
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
		//window.location=ajaxRequest.responseTex;
		//alert(ajaxRequest.responseText+"op");
                 if(ajaxRequest.responseText=='rom')
                    {
                        alert("search name "+searchname+" already exist please delete old one or enter a new search name:");
                        return false;
                    }
                     document.getElementById("save_serch_f").innerHTML=ajaxRequest.responseText;
                       document.getElementById("savesearch_id").style.display="none";

		}
	}

         // ajaxRequest.open("GET", "save_search.php?user_id="+arg1+"&reg_id="+arg2+"& savequery="+arg3+"&searchname="+searchname, true);
         //  ajaxRequest.send(null);
           ajaxRequest.open("POST", "save_search.php", true);
	     ajaxRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
           ajaxRequest.send("user_id="+arg1+"&reg_id="+arg2+"& savequery="+arg3+"&searchname="+searchname);

    }



 function  submitfunction()
  {
      if(document.form1.username.value==''||document.form1.username.value==' ')
          {
          alert("User Name should not blank");
          return false;
      }
       if(document.form1.password.value==''|document.form1.password.value==' ')
          {
          alert("Password  should not blank");
          return false;
      }
    document.form1.submit();
  }

  function ajxfunction(arg1,arg2,arg3,arg4,arg5,arg6,arg7)
    {
          var rom;
   if(arg7!='romharshan')
       {
   if(arg6==1)
       rom=2;
   if(arg6==2)
       rom=1;
       }else
           rom=arg6;
     var lodigswf="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='153' height='7'>";
    lodigswf+="<param name=\"movie\" value=\"loading.swf\">";
            lodigswf+="<param name=\"quality\" value=\"high\">";
               lodigswf+="<embed src=\"http://www.tendersinfo.com/loading.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"153\" height=\"7\"></embed>"
               lodigswf+="</object>";
       //document.getElementById("banner").style.display="none";

         document.getElementById("rom").innerHTML="<br><br><br><center><b><font color=#842432 size=4>Searching Tenders....</font></b><br/><br/><br/>"+lodigswf+"</center>";
        var ajaxRequest;  // The variable that makes Ajax possible!

	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
        } catch (e){
		// Internet Explorer Browsers
            try{
                ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    try{
                            ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
                        } catch (e){

                                    alert("Your browser broke!");
                                    return false;
                                    }
                            }
                    }

	ajaxRequest.onreadystatechange = function(){

		if(ajaxRequest.readyState == 4){
		//window.location=ajaxRequest.responseTex;
		//alert(ajaxRequest.responseText+"op");
                     document.getElementById("rom").innerHTML=ajaxRequest.responseText;

		}
	}
        var country=document.getElementById("select4").value;
        var sector=document.getElementById("select3").value;
        var post_date=document.getElementById("dateselect").value;
        var keywords=document.getElementById("textfield").value;
          if(document.getElementById("ti_ref_id")){
         var ti_ref_id=document.getElementById("ti_ref_id").value;
        }
        // ajaxRequest.open("GET", "updateComment.php?userid="+userid+"& dadeline="+dadeline+" & comment="+comment+"& location="+location+"& tenders="+tenders+"& cdate="+cdate, true);
        if(arg1!='romharshan')
            {
           ajaxRequest.open("GET", "http://www.tendersinfo.com/ajaxsearchresult.php?search_id="+arg1+"& total="+arg2+"&increment="+arg3+"&select="+arg4+"&order="+arg5+"&imagevalue="+rom, true);
            } else{
            ajaxRequest.open("GET", "http://www.tendersinfo.com/ajaxsearchresult.php?country="+country+"&sector="+sector+"&keywords="+keywords+"&post_date="+post_date+"&ti_ref_id="+ti_ref_id, true);
            }
            ajaxRequest.send(null);

    //document.getElementById("ram").removeNode(true);
    }

<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
