var drop1names = new Array
("--- General Four-Color Printing---",
"Customer Provided Paper",
"70# Offset",
"80# Cougar Cover",
"80# Gloss Text",
"100# Gloss Text");

var drop1links = new Array
("#",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31327",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31328",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31345",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31320",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31321");
 
var drop2names = new Array
("--- Specialized Printing ---",
"Color Envelopes",
"Note Cards",
"Notepads",
"4 x 9 Rack Cards");

var drop2links = new Array
("#",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31344",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31343",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31322",
"?pid=1532Tradem&mdl=selections/view.mdl&PAGE_ID=31346");

if (document.getElementById('dropdowns'))
{

var span1 = document.createElement('span');
var span2 = document.createElement('span');

var drop1 = document.createElement('select');
drop1.id = 'drop01';
drop1.name = 'drop01';
drop1.style.width = '300px';

var drop2 = document.createElement('select');
drop2.id = 'drop02';
drop2.name = 'drop02';
drop2.style.width = '300px';

for (var q=0, quail=drop1links.length; q<quail; ++q) {

var opt = document.createElement('option');
opt.value = drop1links[q];
var linkname = document.createTextNode(drop1names[q]);
opt.appendChild(linkname);
drop1.appendChild(opt);
}

for (var p=0, pony=drop2links.length; p<pony; ++p) {

var opt2 = document.createElement('option');
opt2.value = drop2links[p];
var linkname = document.createTextNode(drop2names[p]);
opt2.appendChild(linkname);
drop2.appendChild(opt2);
}

span1.appendChild(drop1);
span2.appendChild(drop2);

span1.appendChild(document.createTextNode(" "));
span2.appendChild(document.createTextNode(" "));

var button1 = document.createElement('input');
button1.setAttribute('type', 'button');
button1.setAttribute('value', 'Go');
if ((!document.all)&&(document.getElementById)){
button1.setAttribute('onClick', 'pkg_update1();');
}
if ((document.all)&&(document.getElementById)){
button1['onclick'] = new Function("pkg_update1()");
}

var button2 = document.createElement('input');
button2.setAttribute('type', 'button');
button2.setAttribute('value', 'Go');
if ((!document.all)&&(document.getElementById)){
button2.setAttribute('onClick', 'pkg_update2();');
}
if ((document.all)&&(document.getElementById)){
button2['onclick'] = new Function("pkg_update2()");
}

span1.appendChild(button1);
span2.appendChild(button2);

var br = document.createElement('br');

document.getElementById('dropdowns').appendChild(span1);
document.getElementById('dropdowns').appendChild(document.createElement('br'));
document.getElementById('dropdowns').appendChild(document.createElement('br'));
document.getElementById('dropdowns').appendChild(span2);
}


if (document.getElementById('toc'))
{
var toc = document.getElementById('toc');
var table = document.createElement('table');
var tbody = document.createElement('tbody');
var tr = document.createElement('tr');
var td1 = document.createElement('td');
var td2 = document.createElement('td');
var header1 = document.createElement('h1');
var header2 = document.createElement('h1');
var headline1 = document.createTextNode('General Four-Color Printing');
var headline2 = document.createTextNode('Specialized Printing');

//header1.style.fontSize = '15px';
//header1.style.fontWeight = 'bold';
td1.style.paddingRight = '20px';
td1.setAttribute('vAlign', 'top');
td2.style.paddingLeft = '20px';
td2.setAttribute('vAlign', 'top');

//header2.style.fontSize = '15px';
//header2.style.fontWeight = 'bold';

header1.appendChild(headline1);
header2.appendChild(headline2);

td1.appendChild(header1);
td2.appendChild(header2);

for (var q=1, quail=drop1links.length; q<quail; ++q) {
var contents = document.createElement('a');
contents.setAttribute('href',drop1links[q]);
contents.className = 'guidelinks';
var linkname = document.createTextNode(drop1names[q]);
//var br = document.createElement('br');
contents.appendChild(linkname);
td1.appendChild(contents);
//td1.appendChild(br);
}

for (var p=1, pony=drop2links.length; p<pony; ++p) {
var contents = document.createElement('a');
contents.setAttribute('href',drop2links[p]);
contents.className = 'guidelinks';
var linkname = document.createTextNode(drop2names[p]);
//var br = document.createElement('br');
contents.appendChild(linkname);
td2.appendChild(contents);
//td2.appendChild(br);
}

tr.appendChild(td1);
tr.appendChild(td2);
tbody.appendChild(tr);
table.appendChild(tbody);
toc.appendChild(table);


}

function pkg_update1()
{
window.location.href = drop1.value;
}

function pkg_update2()
{
window.location.href = drop2.value;
}


