
﻿function addToCart(mode,ProdId,CatId,qnty)
{var ajaxDiv=document.getElementById("dropin");if(mode!=""&&ajaxDiv!=null)
{var xmlHttpReq=false;var self=this;if(window.XMLHttpRequest)
{self.xmlHttpReq=new XMLHttpRequest();}
else if(window.ActiveXObject)
{self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}
self.xmlHttpReq.open('POST',"http://www.giftstoindia24x7.com/ajaxAddToCart1.aspx",true);self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');self.xmlHttpReq.onreadystatechange=function()
{if(self.xmlHttpReq.readyState==4)
{var GetValue=new Array();if(self.xmlHttpReq.responseText.indexOf('~'!=-1))
{GetValue=self.xmlHttpReq.responseText.split("~");if(GetValue[0].toString()=="0")
{alert('There is some error. Please try again.');}
else if(GetValue[0].toString()=="1")
{var varUrl=GetValue[1].toString();window.location='http://www.giftstoindia24x7.com/cart.aspx';}}
else
{alert("There is some error on adding to cart. Please click browser refresh button.");}
ajaxDiv.style.display="none";}
else
{ajaxDiv.style.display="block";positionDivOnClick(ajaxDiv);}}
self.xmlHttpReq.send("Mode="+mode+"&ProdId="+ProdId+"&CatId="+CatId+"&qnty="+qnty);}}
function addToCartNR(obj,mode,ProdId,CatId,qnty)
{var ajaxDiv=document.getElementById("dropin");var objMainDiv=document.getElementById("dvCartMain");var objDiscount=document.getElementById("dvCartDiscount");var objdvcart=document.getElementById("Uc_Header_New1_cartDetail");if(objMainDiv!=null&&ajaxDiv!=null&&objDiscount!=null)
{obj.disabled=true;objdvcart.innerHTML="";var xmlHttpReq=false;var self=this;if(window.XMLHttpRequest)
{self.xmlHttpReq=new XMLHttpRequest();}
else if(window.ActiveXObject)
{self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}
self.xmlHttpReq.open('POST',"http://www.giftstoindia24x7.com/ajaxAddToCart1.aspx",true);self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');self.xmlHttpReq.onreadystatechange=function()
{if(self.xmlHttpReq.readyState==4)
{var GetValue=new Array();if(self.xmlHttpReq.responseText.indexOf('~'!=-1))
{GetValue=self.xmlHttpReq.responseText.split("~");if(GetValue[0].toString()=="0")
{alert("There is some error. Please try again.");}
else if(GetValue[0].toString()=="1")
{objMainDiv.innerHTML=GetValue[1].toString();objDiscount.innerHTML=GetValue[2].toString();objdvcart.innerHTML=GetValue[3].toString();}
updateAlsoBought();}
else
{alert("There is some error on adding to cart. Please click browser refresh button.");}
ajaxDiv.style.display="none";obj.disabled=false;}
else
{ajaxDiv.style.display="block";positionDivOnClick(ajaxDiv);obj.disabled=false;}}
self.xmlHttpReq.send("Mode="+mode+"&ProdId="+ProdId+"&CatId="+CatId+"&qnty="+qnty);}}
function fnCartAdd(Mode,intcounter,proID,catId)
{var spnAddtocart=document.getElementById("spnBuyBtn_"+intcounter);var spnload=document.getElementById("spnload_"+intcounter);if(spnAddtocart!=null&&spnload!=null)
{var xmlHttpReq=false;var self=this;if(window.XMLHttpRequest)
{self.xmlHttpReq=new XMLHttpRequest();}
else if(window.ActiveXObject)
{self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}
self.xmlHttpReq.open('POST',"http://www.giftstoindia24x7.com/ajaxAddToCart1.aspx",true);self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');self.xmlHttpReq.onreadystatechange=function()
{if(self.xmlHttpReq.readyState==4)
{var GetValue=new Array();if(self.xmlHttpReq.responseText.indexOf('~'!=-1))
{GetValue=self.xmlHttpReq.responseText.split("~");if(GetValue[0].toString()=="0")
{alert("There is some error. Please try again.");}
else if(GetValue[0].toString()=="1")
{window.location="http://www.giftstoindia24x7.com/cart.aspx";}}
else
{alert("There is some error on adding to cart. Please click browser refresh button.");}
spnAddtocart.style.display="block";spnload.style.display="none";}
else
{spnAddtocart.style.display="none";spnload.style.display="block";}}
self.xmlHttpReq.send("ProdId="+proID+"&CatId="+catId+"&mode="+Mode+"&qnty=1");}
else
{alert("Objects not found. Try again.");}}
function addToCartNew(objImgName,objAjaxName,ProdId,CatId,qnty)
{var oi=document.getElementById(objImgName);var od=document.getElementById(objAjaxName);if(oi!=null&&od!=null)
{oi.disabled=true;oi.style.display="none";od.style.display="block";var xmlHttpReq=false;var self=this;if(window.XMLHttpRequest)
{self.xmlHttpReq=new XMLHttpRequest();}
else if(window.ActiveXObject)
{self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}
self.xmlHttpReq.open('POST',"http://www.giftstoindia24x7.com/ajaxAddToCart1.aspx",true);self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');self.xmlHttpReq.onreadystatechange=function()
{if(self.xmlHttpReq.readyState==4)
{od.style.display="none";var GetValue=new Array();if(self.xmlHttpReq.responseText.indexOf('~'!=-1))
{GetValue=self.xmlHttpReq.responseText.split("~");if(GetValue[0].toString()=="0")
{alert('There is some error. Please try again.');}
else if(GetValue[0].toString()=="1")
{var varUrl=GetValue[1].toString();window.location.href='http://www.giftstoindia24x7.com/cart.aspx';}
else
{oi.disabled=false;oi.style.display="block";}}
else
{alert("There is some error on adding to cart. Please click browser refresh button.");}}
else
{oi.disabled=true;oi.style.display="none";od.style.display="block";}}
self.xmlHttpReq.send("Mode=1&ProdId="+ProdId+"&CatId="+CatId+"&qnty="+qnty);}}
//develop on 24-06-2011

function addToCartNewhotdeal(objImgName,objAjaxName,ProdId,CatId,qnty)
{var oi=document.getElementById(objImgName);var od=document.getElementById(objAjaxName);if(oi!=null&&od!=null)
{oi.disabled=true;oi.style.display="none";od.style.display="block";var xmlHttpReq=false;var self=this;if(window.XMLHttpRequest)
{self.xmlHttpReq=new XMLHttpRequest();}
else if(window.ActiveXObject)
{self.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP");}
self.xmlHttpReq.open('POST',"ajaxAddToCart1.aspx",true);self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');self.xmlHttpReq.onreadystatechange=function()
{if(self.xmlHttpReq.readyState==4)
{od.style.display="none";var GetValue=new Array();if(self.xmlHttpReq.responseText.indexOf('~'!=-1))
{GetValue=self.xmlHttpReq.responseText.split("~");if(GetValue[0].toString()=="0")
{alert('There is some error. Please try again.');}
else if(GetValue[0].toString()=="1")
{var varUrl=GetValue[1].toString();window.location.href='http://www.giftstoindia24x7.com/cart.aspx';}
else
{oi.disabled=false;oi.style.display="block";}}
else
{alert("There is some error on adding to cart. Please click browser refresh button.");}}
else
{oi.disabled=true;oi.style.display="none";od.style.display="block";}}
self.xmlHttpReq.send("Mode=hotdeal&ProdId="+ProdId+"&CatId="+CatId+"&qnty="+qnty);}}
