﻿
// ADJUST SPECS SECTION ---------------

function replacePartMount(lvl)  
{ 
  var text =  
  [ 
    "FT",
    "IG" 
  ][lvl]; 

  var span = document.getElementById("partMount"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text));
	
	var span = document.getElementById("specMount"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text));
	
  var text2 =  
  [ 
    "SURFACE MOUNTED ", 
    "IN-GROUND MOUNTED ", 
    "RAIL MOUNTED "/**/  
  ][lvl]; 

  var span = document.getElementById("rackName"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text2));
  	
  var text3 =  
  [ 
    "Surface Mounted ", 
    "In-Ground Mounted ", 
    "Rail Mounted "/**/  
  ][lvl]; 

  var span = document.getElementById("rackNameSmall"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text3));

}

function replacePartFinish(lvl)  
{ 
  var text =  
  [ 
    "GV", 
    "EPX",
    "ST"/**/  
  ][lvl]; 

  var span = document.getElementById("partFinish"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text));
  	
  var span = document.getElementById("specFinish"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text)); 
}

function replacePcColor(lvl)  
{ 
  var text =  
  [ 
    "",
    "White.", 
    "Black.", 
    "Light Grey (RAL7042).",
    "Sky Blue (RAL5015).",
    "Blue (RAL5005).",
    "Hunter Green (RAL6005).",
    "Light Green (6018).",
    "Green (RAL6016).",
    "Yellow (RAL1023).",
    "Deep Red (RAL3003)."/**/  
  ][lvl]; 

  var span = document.getElementById("pcColor"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text));  
}


function replaceRackConfig(TheId,lvl)
{
if ( lvl == 'rccr') {
document.getElementById("partConfig").firstChild.nodeValue="RCCR-";
document.getElementById("specPart").firstChild.nodeValue="RCCR-";
document.getElementById("specShape").firstChild.nodeValue="CIRCLES";
document.getElementById("specShapeSm").firstChild.nodeValue="Circles";
document.getElementById("shapeHeader").firstChild.nodeValue="- Circles";
//document.getElementById("fraOne").src="specs/recycle-circles.html";
document.getElementById("cad").href="http://www.dero.com/cad/recycle-circles.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/recycle-circles.zip";
document.getElementById("hires").href="http://www.dero.com/hires/recycle-circles.jpg";
document.getElementById("brochure").href="http://www.dero.com/brochures/recycle-racks.pdf";
} else if ( lvl == 'rctr' ) {
document.getElementById("partConfig").firstChild.nodeValue="RCTR-";
document.getElementById("specPart").firstChild.nodeValue="RCTR-";
document.getElementById("specShape").firstChild.nodeValue="TREE";
document.getElementById("specShapeSm").firstChild.nodeValue="Tree";
document.getElementById("shapeHeader").firstChild.nodeValue="- Tree";
//document.getElementById("fraOne").src="specs/recycle-tree.html";
document.getElementById("cad").href="http://www.dero.com/cad/recycle-tree.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/recycle-tree.zip";
document.getElementById("hires").href="http://www.dero.com/hires/recycle-tree.jpg";
document.getElementById("brochure").href="http://www.dero.com/brochures/recycle-racks.pdf";
}
}


function replaceFinish(lvl)  
{ 
  var text =  
  [ 
    "A Hot-dipped galvanized finish is standard. Powder coated colors and stainless steel finish are also available.",
    "Hot-dipped, galvanized finish.", 
    "Sandblast, epoxy prime 2-4 mils, final TGIC UV resistant coating at 2-4 mils.", 
    "High grade polished stainless steel"/**/  
  ][lvl]; 

  var span = document.getElementById("ex3Span"); 
  while(span.childNodes[0]) /* removing nodes */ 
    span.removeChild(span.childNodes[0]); 
  	span.appendChild(document.createTextNode(text));  
}

// End Specs

function imgChange(elem)
	{
		var imageName = elem.form.config.value+elem.form.mount.value;
		if (document.images)  document.images['image'].src= 'images/'+imageName+'.png'; // ie4+ ns3+
			else window.open(imageName+'.png','newimage','width=300,height=400'); // ie3+
		}
	

function change(id, newClass) {

 identity=document.getElementById(id);

 identity.className=newClass;

 }

function changebk(TheId,lvl)
{
  if ( lvl == '') {
        clr = "";
  } else if ( lvl == 'Galvanized' ) {
        clr = "URL(images/galvanized.gif)";
  } else if ( lvl == 'Powdercoat' ) {
        clr = "URL(images/white.gif)";
  } else if ( lvl == 'Stainless' ) {
        clr = "URL(images/stainless.gif)";
  } else if ( lvl == 'Black' ) {
        clr = "URL(images/black.gif)";
  } else if ( lvl == 'White' ) {
        clr = "URL(images/white.gif)";
  } else if ( lvl == 'Light Grey' ) {
        clr = "URL(images/grey.gif)";
  } else if ( lvl == 'Deep Red' ) {
        clr = "URL(images/red.gif)";
  } else if ( lvl == 'Yellow' ) {
        clr = "URL(images/yellow.gif)";
  } else if ( lvl == 'Sky Blue' ) {
        clr = "URL(images/sky.gif)";
  } else if ( lvl == 'Blue' ) {
        clr = "URL(images/blue.gif)";
  } else if ( lvl == 'Green' ) {
        clr = "URL(images/green.gif)";
  } else if ( lvl == 'Hunter Green' ) {
        clr = "URL(images/hunter.gif)";
  } else if ( lvl == 'Light Green' ) {
        clr = "URL(images/light.gif)";
  } 
document.getElementById("Finish").style.backgroundImage = clr;
}
function showCol(sel)
{
     theLayer = document.getElementById("Color");
     if(sel.selectedIndex==2) vis="visible"
     else vis = "hidden"
     theLayer.style.visibility=vis;
}

