function Checkcheckbox (val, checked, formnum){
elform = document.forms["form"+formnum];
elid = elform["vwitem"+val];
elid.checked = (checked>0?true:false);
}

function checkQty(val,checked,formnum){
elform = document.forms["form"+formnum];
elform.elements['vwquantity'+val].value = (checked ? 1 : 0 );
}

function chkZero(val,formnum){
elform = document.forms["form"+formnum];
elQty=elform['vwquantity'+val];
if(elQty.value == ''){elQty.value = '0';}
}

function PrintEst(page_id){
window.frames["theif"].location.href = page_id;
window.frames["theif"].focus();
document.getElementById('PrintEstAlert').style.display = 'block';
setTimeout("document.getElementById('PrintEstAlert').style.display = 'none'", 2000);
}

var imageURL;
var printWin;
function makeWin(imsrc, ww, wh, printwin) {
window.imageURL=imsrc;
window.printWin=printwin;
ww=ww+25; wh=wh+50;
window.open('showimage.html','w1','width='+ww+',height='+wh+',resizable=yes,scrollbars=yes');
}

/*
function makeWin(imsrc, ww, wh, tr) {
ww=ww+25; wh=wh+50;
w1=window.open('','w1','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
w1.document.open();
w1.document.write("<html><head><title>Image Zoom<\/title><META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\"><META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\"><\/head>");
w1.document.write("<body bgcolor='#FFFFFF' text='#000000' leftmargin=2 topmargin=10><p align=center>");
w1.document.write("<a href=javascript:close();><img border=0 title=\"Click to Close\" alt=\"Click to Close\" name=theimg src=" + imsrc + "></a><br>");
w1.document.write("<a href=\"javascript:window.close();\"><font size=1 face=tahoma color=#000000>close window<\/font><\/a>");
	if(tr){
		w1.document.write('<form><input type="button" name="Button" value="Print" onClick="window.print();"><\/form>');
	}
w1.document.write("<\/body><\/html>");
w1.focus();
};
*/
