﻿// JavaScript Document

function writeCert(grp){
	var img = '&nbsp;';
	var htm = '';
	var i = 0;
	var certs = new Array();
	var db = new Array();
	switch(grp){
		case "iso":
			img = '<img src="../images/cer_iso.gif" width="85" height="85" style="margin-top: 5px; margin-bottom: 5px;" />';
			certs[0] = "ISO9001:2008|certificates/iso9001.pdf";
			certs[1] = "ISO14001:2004|certificates/iso14001.pdf";
			certs[2] = "OHSAS18001:1999|certificates/OHSAS18001.pdf";
		break;
		
		case "ce":
			img = '<img src="../images/cer_ce.gif" width="85" height="85" style="margin-top: 5px; margin-bottom: 5px;" />';
			certs[0] = "DZE-13E CE Certificate 2008|certificates/dze-13e_ce_certificate_2008.pdf";
			certs[1] = "DZE-14E CE Certificate 2008|certificates/dze-14e_ce_certificate_2008.pdf";
			certs[2] = "ER1 CE Certificate|certificates/er1_ce_certificate.pdf";
			certs[3] = "ER2 CE Certificate|certificates/er2_ce_certificate.pdf";
			certs[4] = "ER3 CE Certificate|certificates/er3_ce_certificate.pdf";
			certs[5] = "ERS CE Certificate|certificates/ers_ce_certificate.pdf";
			certs[6] = "FYJ180 CE Certificate 2008|certificates/fyj180_ce_certificate_2008.pdf";
			certs[7] = "GTW GTN CE Certificate|certificates/gtw_gtn_ce_certificate.pdf";
			certs[8] = "PZ300B CE Certificate 2010|certificates/PZ300B_CE_Certificate_2010.pdf";
			certs[9] = "PZD360 CE Certificate 2010|certificates/PZD360_CE_Certificate_2010.pdf";
			certs[10] = "PZD140 CE Certificate 2009(update)|certificates/PZD140_CE_Certificate_2009(update).pdf";
			certs[11] = "PZD140 CE Certificate 2009|certificates/PZD140_CE_Certificate_2009.pdf";
			certs[12] = "PZD220 CE Certificate 2009|certificates/PZD220_CE_Certificate_2008(update).pdf";
			certs[13] = "PZD220 CE Certificate 2009|certificates/PZD220_CE_Certificate_2008.pdf";
			certs[14] = "SPZ300 CE Certificate 2008|certificates/spz300_ce_certificate_2008.pdf";
			certs[15] = "SPZ800 CE Certificate 2008|certificates/spz800_ce_certificate_2008.pdf";
			certs[16] = "YJ140 CE Certificate 2008|certificates/yj140_ce_certificate_2008.pdf";
			certs[17] = "YJ240B FYJ245 CE Certificate|certificates/yj240b_fyj245_ce_certificate.pdf";
		break;
		
		case "ek":		
			img = '<img src="../images/cer_ek.gif" width="85" height="85" style="margin-top: 5px; margin-bottom: 5px;" />';
			certs[0] = "PZD140 (GTN1) EK-mark|certificates/pzd140_(gtn1)_ek-mark.pdf";
			certs[1] = "PZD220 (GTN2) EK-mark|certificates/pzd220_(gtn2)_ek-mark.pdf";
			certs[2] = "DZE-14E (GTW2) EK-mark|certificates/dze-14e_(gtw2)_ek-mark.pdf";
			certs[3] = "PZD220 (GTW5) EK-mark|certificates/pzd220_(gtw5)_ek-mark.pdf";
			break;
			
		case "csa":
			img = '<img src="../images/cer_csa.gif" width="85" height="85" style="margin-top: 5px; margin-bottom: 5px;" />';
			certs[0] = "CSA Certificate of brake|certificates/csa_certificate_of_brake.pdf";
			break;
			
		case "kmark":
			img = '<img src="../images/cer_km.gif" width="85" height="85" style="margin-top: 5px; margin-bottom: 5px;" />';
			certs[0] = "YJ240B K-mark|certificates/yj240b_k-mark.pdf";
			certs[1] = "KC MARK-GTN1_PZD140|certificates/KC_MARK-GTN1_PZD140.pdf";
			certs[2] = "KC MARK-GTN2_PZD220|certificates/KC_MARK-GTN2_PZD220.pdf";
			certs[3] = "KC MARK-GTW2_DZE-14E|certificates/KC_MARK-GTW2_DZE-14E.pdf";
			certs[4] = "KC MARK-GTW5_PZD220|certificates/KC_MARK-GTW5_PZD220.pdf";
			certs[5] = "KC-GTS_DZE-14E|certificates/KC-GTS_DZE-14E.pdf";
			break;
		
		case "ctp":
			img = '<img src="../images/cer_fire.gif" width="85" height="85" style="margin-top: 5px; margin-bottom: 5px;" />';
			certs[0] = "高新产品认定证书|certificates/cert_gx.pdf";
			certs[1] = "重点高新技术企业证书|certificates/cert-gxqy.pdf";
			break;
			
		default:
			certs[0] = "计量保证确认证书|certificates/2008_06_03_jl.pdf";
		}
		
		
		htm += '<table width="100%" style="border-bottom: dashed 1px #999999;"><tr>';
		htm += '<td width="100" align="center" valign="top">';
		htm += img;
		htm += '</td><td valign="top">';
		
		if(certs.length > 0){
			for(i = 0; i < certs.length; i++){
				db = certs[i].split("|");
				htm += '<table border="0" cellspacing="0" cellpadding="0" style="margin-top: 6px; margin-botton: 8px;"><tr>';
				htm += '<td width="250" style="border: solid 1px #999999; text-align: center; font-size: 12px; line-height: 100%;">';
				htm += db[0];
				htm += '</td><td width="100"><a href="javascript:getPDF(\'';
				htm += db[1];
				htm += '\');"><img src="../images/pdf_down_file.gif" alt="Download"  border="0" /></a></td>';
				htm += '</tr></table>';
				}			
			}
		htm += '</td></tr></table>';
		document.write(htm);
}
