function printtitle2()
	{
		tabletitle="<center><table border='1' borderColorDark='#FFFFFF' borderColorLight='#000000' cellPadding='0' cellSpacing='0' width='90%'>"
		+"<tr align=center>"
		+"<td bgcolor=#d6ddee>item</td>"
		+"<td bgcolor=#d6ddee>Message to supplier(s):</td>"
		+"<td bgcolor=#d6ddee>select</td></tr>";
		document.write(tabletitle);
	}

function printend2(){
    document.write("</table>");
}	


function printcontent(cnt,Name,no,cata) {
  	if (no!=""){ 
  		document.write("<tr align='center'>");
		document.write("<td height='20' bgcolor=#FFFFEC><b>"+cata+"</b>"+Name+"</td>");
		document.write("<td height='20' bgcolor=#FFFFEC align='center'><textarea rows=2 cols=20 name='mm'></textarea></td>");
		document.write("<td height='20' bgcolor=#FFFFEC><input type='checkbox' name='C1' value='"+no+"' checked>"); 
		document.write("<input type=hidden name='m_id' value='"+no+"'>");  
		document.write("<input type=hidden name='m_name' value='"+Name+"'>");  
		document.write("<input type=hidden name='m_cata' value='"+cata+"'>");
		document.write("</tr>");
	}
 }
  
function  view_inquiry() {
	var Name="";	
	var no="";	
	var cata="";	
	var i=0;     
	dispose_cookie();
	printtitle2();
    for(i=0;i<Arraylength;i++)  {
       Name=getitem(mycookie[i],"na");
       no= getitem(mycookie[i],"no");   
       cata=getitem(mycookie[i],"ca");   
       printcontent(i,Name,no,cata);
     }
	printend2();
 }

function printtitle3()
	{
	
		tabletitle="<table border=0 cellPadding=0><tbody><tr>"
		+"<td bgColor=#d6ddee height=20 width=41%><b><font face=Arial size=2>Items</font></b></td>"
		+"<td bgColor=#d6ddee height=20 width=46%><b><font color=black face=Arial size=2>Message to supplier(s):</font></b></td>"
		+"<td bgColor=#d6ddee height=20 width=13%><font face=Arial size=2><b>Select</b></font></td></tr>";
		document.write(tabletitle);
	}

function printend3(){
    var tableend;
    //tableend="<tr>"
    //+"<td bgColor=#ffffec height=32 width=41%><font face=Arial size=2><b>Other inquiries</b></font></td>"
    //+"<td bgColor=#ffffec height=32 width=46%><font face=Arial><textarea cols=29 name='company_inquiry' rows=2></textarea></font></td>"
    //+"<td bgColor=#ffffec height=32 width=13%><font face=Arial><input CHECKED name='company_ck' type='checkbox' value='ok'></font></td>"
    //+"</tr></tbody></table>"
    tableend="</tbody></table>"
    document.write(tableend);
}	

function printcontent3(cnt,Name,no,cata) {
  	if (no!=""){ 
  		document.write("<tr>");
		document.write("<td bgColor=#ffffec height=32 width=41%><font face=Arial><b><font size=2>"+cata+"</b><br><a href='product_detail.asp?item_sn=" + no + "'>("+no+")"+Name+"</a></font></td>");
		document.write("<td bgColor=#ffffec height=32 width=46%><font face=Arial><textarea cols=29 name='p_inquiry' rows=2></textarea></font></td>");
		document.write("<td bgColor=#ffffec height=32 width=13%><font face=Arial><input CHECKED name='p_ck' type='checkbox' value='" + no + "'></font></td>"); 
		document.write("<input type=hidden name='m_data' value=''>");
		document.write("<input type=hidden name='m_id' value='"+no+"'>");
		document.write("<input type=hidden name='m_name' value='"+Name+"'>");  
		document.write("<input type=hidden name='m_cata' value='"+cata+"'>");
		document.write("</tr>");
	}
 }

function inquiry_form(){
	var name="";
	var no="";
	var cata="";
	var i=0;
	dispose_cookie();
	printtitle3();
	for(i=0;i<Arraylength;i++)  {
       Name=getitem(mycookie[i],"na");
       no= getitem(mycookie[i],"no");   
       cata=getitem(mycookie[i],"ca");   
       printcontent3(i,Name,no,cata);
     }
	printend3();
}