 matchHeight=function(){
         var divs,contDivs,maxHeight,divHeight,d;
         // get all <div> elements in the document
         divs=document.getElementsByTagName('div');
         contDivs=[];
         // initialize maximum height value
         maxHeight=0;
         // iterate over all <div> elements in the document
         for(var i=0;i<divs.length;i++){
              // make collection with <div> elements with class attribute 'container'
              if(/\bcontainer\b/.test(divs[i].className)){
                    d=divs[i];
                    contDivs[contDivs.length]=d;
                    // determine height for <div> element
                    if(d.offsetHeight){

                         divHeight=d.offsetHeight;
                    }
                    else if(d.style.pixelHeight){
                         divHeight=d.style.pixelHeight;
                    }
                    // calculate maximum height
                    maxHeight=Math.max(maxHeight,divHeight);
              }
         }
         // assign maximum height value to all of container <div> elements
         for(var i=0;i<contDivs.length;i++){
              contDivs[i].style.height=maxHeight+'px';
         }
    }
	
	window.onload = function() {
	matchHeight();
	if(document.getElementsByTagName){
		matchHeight();
	}
}

// This is the calculator 

function calcf1()
{
calc=document.estimator;
calc.k9.value=Math.round(parseFloat(calc.d10.value)*(1/0.4064)*Math.pow(10,2))/Math.pow(10,2);
calc.k10.value=Math.round(calc.k9.value);
calc.k11.value=Math.round((parseFloat(calc.d9.value)*parseFloat(calc.d10.value))*Math.pow(10,2))/Math.pow(10,2);
calc.k12.value=Math.round((parseFloat(calc.k11.value)-parseFloat(calc.d13.value))*Math.pow(10,2))/Math.pow(10,2);
if (parseFloat(calc.d13.value)>0)
 calc.k14.value=Math.round(((parseFloat(calc.d13.value)*(1/parseFloat(calc.k11.value))*100))*Math.pow(10,2))/Math.pow(10,2);
else
 calc.k14.value="0.00";
calc.k15.value=Math.round(((parseFloat(calc.d9.value)/1.2192)-parseFloat(calc.d11.value))*Math.pow(10,2))/Math.pow(10,2);
calc.d18.value=Math.round((((parseFloat(calc.d9.value)/1.2192)*parseFloat(calc.k10.value))-(parseFloat(calc.d11.value)*parseFloat(calc.k10.value))-(parseFloat(calc.d13.value)*(1/2.01364242))));
if (parseFloat(calc.d11.value)>0)
 calc.d19.value=Math.round(parseFloat(calc.d11.value)*parseFloat(calc.k10.value));
else
 calc.k14.value="0";
  
calc.d20.value=Math.round((parseFloat(calc.d18.value)*12)+(parseFloat(calc.d19.value)*8)+(parseFloat(calc.k15.value)*6)+(parseFloat(calc.d11.value)*4));
calc.d21.value=Math.round((parseFloat(calc.k12.value)*(parseFloat(calc.d12.value)/1000))*Math.pow(10,2))/Math.pow(10,2);;
calc.d22.value=Math.ceil(parseFloat(calc.d21.value));
calc.k18.value=Math.ceil(parseFloat(calc.d18.value)/6);
calc.k19.value=Math.ceil(parseFloat(calc.d19.value)/6);
if (parseInt(calc.d12.value)==101)
{
 calc.k20.value=Math.ceil(parseFloat(calc.d20.value)/1000);
}
else
{
 calc.k20.value=Math.ceil(parseFloat(calc.d20.value)/500);
}
/*
if (parseInt(calc.d12.value)==101)
{
 calc.k20.value=Math.ceil(parseFloat(calc.d20.value)/1000);
 document.getElementById("l19").innerTEXT="BLACK Bags ( 4-Inch Corners)";
}
else
{
 calc.k20.value=Math.ceil(parseFloat(calc.d20.value)/500);
 if (parseInt(calc.d12.value)==152)
  document.getElementById("l19").innerHTML="GREEN Bags (6-Inch Corners)";
 else
  document.getElementById("l19").innerHTML="RED Bags (8-Inch Corners)";
}
if (parseInt(calc.d12.value)==101)
{
 document.getElementById("l20").innerHTML="BLACK Label (1000 4-Inch/Box)";
}
else
{
 if (parseInt(calc.d12.value)==152)
  document.getElementById("l20").innerHTML="GREEN Label (500 6-Inch/Box)";
 else
  document.getElementById("l20").innerHTML="RED Label (500 8-Inch/Box)";
}*/
}























function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.4  

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){	
	  byFactor = w / imageWidth;			
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}
	posTop = parseInt(posTop);
	posLeft = parseInt(posLeft);		
	scrWidth = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {
	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Click screen to close" >'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}
//-->