	function showhid(pay,path) {
		if(document.getElementById(pay).style.display=='none') {
			document.getElementById(pay).style.display='block';
			document.getElementById(path).src = 'india/images/eproduct_up.gif';
		} else {
		   document.getElementById(pay).style.display='none';
		   document.getElementById(path).src = 'india/images/eproduct_down.gif';
		}	   
	}
	function GetXmlHttpObject() {
		var xmlHttp=null;
		try
		{
		// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{
		// Internet Explorer
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		return xmlHttp;
	}
	function showproducts(filename,url,divname,not,tab){
		var i;
		var servers = document.location.hostname;
		var file=filename+url;
		showdiv('comingDiv');
		showdiv(divname);
		xmlHttpproduct=GetXmlHttpObject();
				var url="http://"+servers+"/eproducts/"+file;
				url=url+"&sid="+Math.random();
				xmlHttpproduct.onreadystatechange=function(){
					if (xmlHttpproduct.readyState==4) { 
						if(document.getElementById(divname)) {
							document.getElementById(divname).innerHTML=xmlHttpproduct.responseText;
							hidediv('comingDiv');
						}
					}									}			
					xmlHttpproduct.open("GET",url,true);
					xmlHttpproduct.send(null);
					for(i=1;i<=not;i++){
						document.getElementById("tab"+i).className='';
					}
					document.getElementById("tab"+tab).className="current";
	}

	function addtocart(action,id,btn,page,productname) {
		var servers =document.location.hostname;
		var pname = productname;
		var answer = confirm("Buy " +pname);
		if(answer) {
			xmlHttp=GetXmlHttpObject();
					var url="http://"+servers+"/eproducts/Ajaxcart.php";
					url=url+"?action="+action+"&id="+id+"&btn="+btn+"&page="+page;
					url=url+"&sid="+Math.random();
					xmlHttp.onreadystatechange=function(){
					if(xmlHttp.readyState==4) { 
						var respnse = xmlHttp.responseText;
						if(respnse==1) {
							window.location.href="http://"+servers+"/pay.php";
						} else {
							showdiv('showcartdIv');
							document.getElementById('showcartdIv').innerHTML="Try again....";
						}
					}									}			
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
			} else {
				return false;
			}
	}
	function checkconfirm(productid,type,productname) {
		var servers = document.location.hostname;
		var pname = productname;
		var answer = confirm("Activate " +pname)
		  if (answer){
					if(type=='0') {
						 window.location='http://'+servers+'/activateMail.php?id='+productid;
					} else {
						window.location = 'http://'+servers+'/activate.php?id='+productid;
					}
				return true;
		  } else {
			return false;
		  }
	}
	function hidediv(divname) {
		document.getElementById(divname).style.display="none";
	}
	function showdiv(divname) {
		document.getElementById(divname).style.display="block";
	}
