// JavaScript BarCode39 v. 1.0 (c) Lutz Tautenhahn, 2005
// The author grants you a non-exclusive, royalty free, license to use,
// modify and redistribute this software.
// This software is provided "as is", without a warranty of any kind.
Chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
Codes=new Array(
"111221211","211211112","112211112","212211111","111221112","211221111","112221111","111211212",
"211211211","112211211","211112112","112112112","212112111","111122112","211122111","112122111",
"111112212","211112211","112112211","111122211","211111122","112111122","212111121","111121122",
"211121121","112121121","111111222","211111221","112111221","111121221","221111112","122111112",
"222111111","121121112","221121111","122121111","121111212","221111211","122111211","121121211",
"121212111","121211121","121112121","111212121");
BarPic=new Array(2);
BarPic[0]="/VIP/web/style/images/b.gif";
BarPic[1]="/VIP/web/style/images/w.gif";
function Code39(theX, theY, theBarHeight, theFontHeight, theBarCodeText)
{ var pp="", ff;
if ((theX!="")&&(theY!="")) pp="position:absolute;left:"+theX+";top:"+theY+";";
if ((theFontHeight>4)&&(theBarHeight>=2*theFontHeight))
{ ff="style='font-size:"+theFontHeight+"px;font-family:Verdana;'";
document.write("
");
document.write("| "+CodePics("*",theBarHeight)+" | ");
for (i=0; i"+CodePics(theBarCodeText.charAt(i),theBarHeight-theFontHeight-1)+"");
document.write(""+CodePics("*",theBarHeight)+" | ");
document.write("
");
for (i=0; i"+theBarCodeText.charAt(i)+"");
document.write("
");
}
else
{ document.write("");
document.write("| "+CodePics("*",theBarHeight)+" | ");
for (i=0; i"+CodePics(theBarCodeText.charAt(i),theBarHeight)+"");
document.write(""+CodePics("*",theBarHeight)+" |
");
}
}
function CodePics(theChar, theHeight)
{ var ss="", cc="9", ii=Chars.indexOf(theChar);
if (ii>=0) cc=Codes[ii];
for (ii=0; ii";
ss+="
";
return(ss);
}