			var http_request = false;
			   function makerequest(url, parameters) 
			   {
				  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;
				  }
				  
				  
				  http_request.onreadystatechange = alertContents;
				  http_request.open('POST', url, true);
				  http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
				  http_request.setRequestHeader("Content-length", parameters.length);
				  http_request.setRequestHeader("Connection", "close");
				  http_request.send(parameters);
			   }
			
			
			   function alertContents() {
				  if (http_request.readyState == 4) {
					 if (http_request.status == 200) {
						//alert(http_request.responseText);
						result = http_request.responseText;
						document.getElementById('myspan').innerHTML = result;            
					 } else {
						alert('There was a problem with the request.');
					 }
				  }
			   }
			   //######### THIS FUNCTION WILL BE USED FOR OUTCOME REPORT########
			   function get(obj) {
				   //alert(obj);
				   var ToDo = document.getElementById('ToDo').value;
				   //alert(ToDo);
				   var myid = document.getElementById('Id').value;
				   //alert(myid)
				   var poststr = "CallType="+obj+'&ToDo='+ToDo+'&Id='+myid;
				   //alert(poststr);
				   //alert(ToDo) ;
				   makerequest('printformbycall.php', poststr);
			   }
			   ///##############THIS IS FOR SHIPPING CLAIMS############//////
				  function get1(obj) {
				   var ToDo = document.getElementById('ToDo').value;
				   var myid = document.getElementById('Id').value;
				   //alert(myid) ;
				   var poststr = "OrderType="+obj+'&ToDo='+ToDo+'&Id='+myid;
				   //alert(ToDo) ;
				   makerequest('printformbycall2.php', poststr);
			   }
			   /////########## THIS IS FOR BILLING ##################/////
					 function get2(obj) {
				var ToDo = document.getElementById('ToDo').value;
				   var myid = document.getElementById('Id').value;
				   //alert(myid) ;
				   var poststr = "TransactionType="+obj+'&ToDo='+ToDo+'&Id='+myid;
				   //alert(ToDo) ;
				   makerequest('printformbycall3.php', poststr);
			   }
				 function get3(obj)
				 {
					   var poststr = "MailTemplateId="+obj;
				   //alert(ToDo) ;
				   makerequest('fillmsg.php', poststr);
			   }
			   
			   function get21(obj)
				 {
					   var poststr = "myform="+obj;
					   alert(poststr) ;
				   //alert(ToDo) ;
				   document.frm1.action=obj ;
				   makerequest('ticketform.php', poststr);
			   }
			   function cart121(obj,mem_id,whrtocome){
				   //alert(whrtocome);
				   //alert(obj);
				 if(mem_id=="no"){
					 window.location='login.php?wheretocome='+whrtocome;
					 return;
					 }
				  // var chacklogin = 
				   //alert('raghav');
				   var km="cart_"+obj;
				   var currentsrc123 = document.getElementById(km).src;
				  var fullpath = fullsiturl+'images/addincart.gif';
				  //alert(currentsrc123);
				  //alert(fullpath);
				  //alert(currentsrc123);
				   if(currentsrc123==fullpath)
				   {
					 //alert('arvind1');
					   
						document.getElementById(km).src = 'images/alreadyincart.gif';
						document.getElementById(km).alt = 'Already in cart';
					}
					else{
						//alert(km);
						 document.getElementById(km).src = 'images/addincart.gif';
						document.getElementById(km).alt = 'Add in cart';
						}
					 
				 var poststr = "prod_id="+obj;
					   //alert(poststr) ;
				   //alert(ToDo) ;
				   //document.frm1.action=obj ;
				  // alert(poststr);
				   makerequest('addinwish.php', poststr);
				   
			   }
			   function updatecart(obj,qty)
				 {
					 //alert(obj);
					// alert(qty);
					   var poststr = "myform="+obj;
					  // alert(poststr) ;
				   //alert(ToDo) ;
				   document.frm1.action=obj ;
				   makerequest('ticketform.php', poststr);
			   }
//}
function showproduct(obj){
	//alert(obj);
	var prodcataray = obj.split('_');
	//alert(prodcataray[0]);
	if(prodcataray[0]=='pro'){
		window.location='product-detail.php?prod_id='+prodcataray[1];
		}
		else{
			window.location='products.php?categoryid='+prodcataray[1];
			}
	
	}
