//Ajax function [Debby Create by 2006/12/08]
//購物車function 
function AddShopCar(InqiryId,ProdId,ProdName,ImgUrl) {
   var strValue ='SessionId='+InqiryId+
	              '&ProdId='+ProdId +
	              '&ProdName='+escape(ProdName)+
                 '&ImgUrl='+escape(ImgUrl)+
                 '&Flag=I&rnd='+Math.random();
                 //alert(strValue);
   xmlhttpPost('..\\js\\ShopCar.asp',strValue,'ShopCarResult','');
}
function DelShopCar(InqiryId,ProdId,ProdName) {
   var strValue ='SessionId='+InqiryId+
	               '&ProdId='+ProdId +
	              '&ProdName='+ProdName+
                 '&Flag=D&rnd='+Math.random();
   xmlhttpPost('..\\js\\ShopCar.asp',strValue,'ShopCarResult','');
}
function ShopCarResult(ResultValue,FuncValue){
   //alert('ResultValue=='+ResultValue+'***FuncValue=='+FuncValue)
   if (ResultValue!='Error'){
      //alert('Add to Cart Ok!!\n<a href="Video_Inquiry.htm">Check Video Cart</a>');
      if (confirm(' The video is added to cart. \n\r Check the video cart now?')){
        self.location='Video_Inquiry.htm';
      }
   }
}

function fn_LinkInq(sform,sProductSet,sModelNum){
var oProductSet=document.getElementById('ProductSet');
    oProductSet.value=sProductSet;
var oModelNum=document.getElementById('ModelNum');    
oModelNum.value=sModelNum;
var oform=document.getElementById(sform);   
 oform.submit();
}

function InquiryFrom(DivName,ProdId,ModelName,ProdDesc,OtherDesc){
//if (ProdId!=''){
//  var oDivName=document.getElementById(DivName); 
  var strValue = 'ProdId='+ProdId+'&ModelName='+ModelName+'&ProductDesc='+escape(ProdDesc)+'&OtherDesc='+escape(OtherDesc);
      xmlhttpPost('..\\js\\InquirySampleForm.asp',strValue,'InquiryFormResult',DivName);
 //  }
}
function InquiryFormResult(ResultValue,DivName){
   if (ResultValue!='Error'){
      var oDivName=document.getElementById(DivName); 
      oDivName.innerHTML += ResultValue;
      //oDivName.innerHTML=oDivName.text+'<BR>'+ResultValue;
      //document.getElementById(Id).style.display="inline";
      //document.getElementById(Id).style.visibility="inherit";
   }
}



