
function confirmAuction(msgId,url)
  {
  	
  	switch (msgId)
  	{
  		case '1':
  		var msg="Are you sure you want to accept the auction?";
  		break;
  		case '2':
  		var msg="Are you sure you want to cancell the auction?";
  		break;
  		case '3':
  		var msg="Are you sure you want to approve the auction?";
  		break;
  		case '4':
  		var msg="Are you sure you we you want  to delete all the messages?";
  		break;
  		
  	}
  var r=confirm(msg);
  if (r==true)
    {
    location.href=url;
    }
  else
    {
   return;
    }
  }
  
function checkcode(val,theform)
{	
	  
  	var url1="choose_plan.php?code="+val;
//alert(url1+'  '+id);
  new Ajax.Request(url1,
  {
    method:'get',
   
    onSuccess: function(transport){
       var response = transport.responseText;

       if(response=='error'){
		   alert("Please enter the Valid Code");
		   theform.code.value="";
		   return false;
	   }
	   else{
		   theform.amount.value=response;
		   return true;
	   }
    }
   
  });
} 





function getState5(url,id,theform)
{	
	var state=document.userInfo.state.value;
	
  //var countryId=theform.value;
  var countryId=document.userInfo.country.value;;
  
  	var url1=url+"&cid="+countryId+"&state="+state;
//alert(url1+'  '+id);
	new Ajax.Request(url1,
  {
    method:'get',
   
    onSuccess: function(transport){
      var response = transport.responseText || "no response text";
  
      
      document.getElementById(id).innerHTML=response;
      
    },
    onFailure: function(){ alert('Something went wrong...') }
  });
} 

function getUser(url,id)
{
	//var url =id;
//var idarray = txtid.split(',');
	
  //var userId=document.getElementById(id1).value;
  var userId=document.userInfo.userid.value;
  var lName=document.userInfo.lname.value;
  var fName=document.userInfo.fname.value;
  	var url1=url+"&uid="+userId+"&lname="+lName+"&fname="+fName;
//alert(url1+'  '+id);
	new Ajax.Request(url1,
  {
    method:'get',
   
    onSuccess: function(transport){
      var response = transport.responseText || "no response text";
   
      //for(i=0;i<idarray.length;i++)
    
      //{
      	//var id1=idarray[i];
      
      document.getElementById(id).innerHTML=response;
      //}
    },
    onFailure: function(){ alert('Something went wrong...') }
  });
} 


	
function getContent(url,id)
{
	

new Ajax.Request(url,
  {
    method:'get',
   
    onSuccess: function(transport){
      var response = transport.responseText || "no response text";
   
      //for(i=0;i<idarray.length;i++)
    
      //{
      	//var id1=idarray[i];
      alert(response);
      document.getElementById(id).innerHTML=unescape(response);
      //}
    },
    onFailure: function(){ alert('Something went wrong...') }
  });
}

function disp_confirm(msgId,url)
  {
  	
  	switch (msgId)
  	{
  		case '1':
  		var msg="Are you sure you want to accept the auction?";
  		break;
  		case '2':
  		var msg="Are you sure you want to cancel the auction?";
  		break;
  		case '3':
  		var msg="Are you sure you want to cancel the bid?";
  		break;
  		case '4':
  		var msg="Are you sure you we you want  to delete all the messages?";
  		break;
  		
  	}
  var r=confirm(msg);
  if (r==true)
    {
    location.href=url;
    }
  else
    {
   return;
    }
  }




 
//-->