function getHTTPObject() {
  var xmlhttp;
 
  if(window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
  }
  else if (window.ActiveXObject){
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    if (!xmlhttp){
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    
}
  return xmlhttp;

  
}
var http = getHTTPObject(); // We create the HTTP Object

function requestInfo(url,id,redirectPage)
{  
		
		//alert(url);
		http.open("GET", url, true);
		http.onreadystatechange = function()
		{
			
			//alert(http.readyState);
			if (http.readyState == 4) 
			{
			  if(http.status==200)
			  {
			  		
			  		//results = http.responseText.split("|||");
					results = http.responseText;
					//alert(results);
					//alert(results[1]);
					document.getElementById(id).innerHTML = results;
			  } 
			}
		};
		
	http.send(null);
			
}
function loaderfunc()
{
	document.getElementById('location').innerHTML = "<table width='97%' height='500' border='0' align='center' cellpadding='2' cellspacing='2'><tr align='center'><td><img src='http://transmesaglobal.com/shop/skin1/images/ajax-loader.gif' alt='' /></td></tr></table>";	
	
}
function test(url,val)
{
	//alert(url+"&rec_val="+val);
	//window.location.href=url+"&rec_val="+val;
	
	//alert(url+"/rec_val/"+val);
	window.location.href=url+"/rec_val/"+val;
	
}
function valid_save(val,v_id,type,view_all,record_val)
{
	//alert("hi");
	//alert(url_val);
	//window.location.href='viewall.php?name=view&sort_field='+val+'&v_id='+v_id+'&type='+type+'&view_all='+view_all+'&record_val='+record_val;
	
	window.location.href = 'viewall/name/view/sort_field/'+val+'/v_id/'+v_id+'/type/'+type+'/view_all/'+view_all+'/record_val/'+record_val;
	
	//viewall/name/view/sort_field/'+val+'/v_id/'+v_id+'/type/'+type+'/view_all/'+view_all+'/record_val/'+record_val
	
}
function absd(val,v_id)
{
	//window.location.href="viewall.php?record_val="+val+'&v_id='+v_id;
	window.location.href="viewall/record_val/"+val+'/v_id/'+v_id;
	
}
function valid_payment()
{
	var p_id = document.getElementById('paymentid').value;
	window.location.href="cart.php?paymentid="+p_id+"&mode=checkout";
}


/****** Added by ZIA *****/

$(document).ready( function(){
	$('#masterWapper table tr td').each(function(){
		$(this).addClass('first_row');
		$(this).next().addClass('second_row');
	})
})
