<!--
function InsertMailToTag( userName, domainName, classI)
{
var EmailId;
var atSign = "@"
var fullStop = ".";
var classId;

EmailId = userName;
EmailId = "" + EmailId + atSign;
EmailId = EmailId + domainName;

classId = classI;

document.write( "<a href='mail" + "to:" + EmailId + "' class='" + classId + "'>" + EmailId
+"</A>" );
}
var item0004="Add to "
var icon2_cart_name="Cart"
function add_check(p_id)
{
 var name=p_id;  //取得cookie的名稱
 var value="100"; //取得cookie的值
 var d1=new Date();
 d1.setTime(d1.getTime() + 3600000);      //計算到期時間
 var expiredate=d1.toGMTString(); 						   //轉換為cookie的日期格式
   var cat=name.split("*");
 document.cookie = name + "=" + value + "; expires="+expiredate; 
   document.getElementById(cat[1]).innerHTML="<a href='Inquiry-List.php' class='CartAdded' title='check inquiry cart'>" + icon2_cart_name + "</a>";
   var pp_id=cat[1].split("W");
   var ppp_id=pp_id[1].replace(/#/, "\"");
   alert('Product '+ppp_id+' added to the inquiry cart.');
}

function modify_check(cp_id)
{
	var p_id=cp_id.split("*");
	var rp_id=p_id[1].split("W");
  var rrp_id=rp_id[1].replace(/#/, "\"");
 if(document.getElementById(rp_id[1]).value=="")
 {
  alert('Quantity cannot be null.');
  window.location.reload( false );
 }
 else
 	{
 	if(document.getElementById(rp_id[1]).value<100)
 		{
  		alert('Quantity cannot be less than 100.');
  		window.location.reload( false );
 		}
 	else
 {
 var name=p_id[1];  //取得cookie的名稱
 var value=document.getElementById(rp_id[1]).value; //取得cookie的值
 var d1=new Date();
 d1.setTime(d1.getTime() + 3600000);      //計算到期時間
 var expiredate=d1.toGMTString(); 						   //轉換為cookie的日期格式
 document.cookie = cp_id + "=" + value + "; expires="+expiredate; 
 alert(rrp_id+' quantity updated.');
 location.reload(); 
 }
}
}

function del_check(p_id)
{
 var name=p_id;  //取得cookie的名稱
 var value="100"; //取得cookie的值
 var d1=new Date();
 d1.setTime(d1.getTime() + 10);      //計算到期時間
 //d1.setTime(d1.getTime() + 99999*(24*60*60*1000));      //計算到期時間
 var expiredate=d1.toGMTString(); 						   //轉換為cookie的日期格式
 document.cookie = name + "=" + value + "; expires="+expiredate;  
 alert('Item deleted from inquiry list.');
 location.reload();
}


function act_check()
{
  if(document.cookie!="")
  {
  	var c = document.cookie.split("; ");
  	for (var i=0; i < c.length; i++)
  	{
   		var b = c[i].split("=");  
    	if(document.all(b[0]).value=="")   
    	{
  			alert('Quantity cannot be null.');
  			document.all(b[0]).focus(); 
    	    return false; 
		}
 	 }
  }
  else
  {
  	 alert('There is no any product.');
  	 return false; 
  }
  
  if (document.all("name").value == "")
  {
    alert("Please enter name");
    document.all("name").focus(); 
    return false;
  }  
  if (document.all("telephone").value == "")
  {
    alert("Please enter telephone");
    document.all("telephone").focus(); 
    return false;
  }  
  if (document.all("address").value == "")
  {
    alert("Please enter address");
    document.all("address").focus(); 
    return false;
  } 
  if (document.all("email").value == "")
  {
    alert("Please enter email");
    document.all("email").focus(); 
    return false;
  }  
  return true;
}

//-->
