function getValue(selectName)
{
	object = document.forms[0].elements[selectName];
	

	if(object.selectedIndex >= 0){
		value =  object.options[object.selectedIndex].value;
	}else {
		value = 0;
	}
	return value;
	
}
function getChecked(checkboxName)
{
	object = document.forms[0].elements[checkboxName];
	
	if(object != null )
	{
		return object.checked;
	}else{
		return false;
	}
	
}

function displayImg(imgName)
{
	document.images.product.src = "../catalog/web/" + imgName ;
} 

function displaySImg(imgName)
{
	document.images.special.src = "../catalog/specials/" + imgName ;
} 

function displayEmailImg(imgName)
{
	document.images.include.src = "../catalog/" + imgName ;
} 
 function gotosite(site) {
       if (site != "") {
           self.location=site;
       }
   }
  
  function popsite(site) {
       if (site != "") {
           blank.location=site;
       }
   }
	
	
function selectAll(cnt) {
	
	form = document.items;
	var i;
	for(i=0; i<cnt; i++){
		form.elements[i].checked = true;
	}
}

function deselectAll(cnt) {
	
	form = document.items;
	var i;
	for(i=0; i<cnt; i++){
		form.elements[i].checked = false;
	}
}

function changeColor(thing) {
	box = document.getElementById("colorBox");
	box.style.backgroundColor = document.colors.colorHex.value;
	
}


function setFocus() {
	document.main.elements[1].focus();

}

function PopUp(url,name,width,height) {
  var winX = 0;
  var winY = 0;
  var w = width;
  var h = height;
  // only set new values if 4.0 browser
  if (parseInt(navigator.appVersion) >= 4) {
    winX = (screen.availWidth - w)*.85;
    winY = (screen.availHeight - h)*.85;
  }
  popupWin = window.open(url, name, 'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY);
}

function popWin(url,WinName) {
	var heightString = ",height=" + 195;
	var widthString  = ",width=" + screen.availWidth;
	var args = "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no" + heightString + widthString;
	var newWin =window.open("",WinName,args);
       newWin.moveTo(0, 0);
       //newWin.resizeTo(screen.availWidth, screen.availHeight);
	   //newWin.resizeTo(650,	525);
	newWin.location = url;
	newWin.focus();
}

function printWin(url,WinName, w, h) {
	var heightString = ",height=" + screen.availHeight - 50;
	var widthString  = ",width=" + w;
	var args = "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=yes,google=no" + heightString + widthString;
	var newWin =window.open("",WinName,args);
    newWin.moveTo(0, 0);
	newWin.location = url;
	newWin.focus();
}