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

function replaceRackname(lvl)  
{ 
  var text =  
  [ 
    "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(text));
  	
  var text2 =  
  [ 
    "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(text2));

}

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));

}

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 setSD(lvl)  
{ 
  var text =  
  [ 
    "S3 ", 
    "D5 ", 
    ""/**/  
  ][lvl]; 

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

function replaceRackConfig(TheId,lvl)
{
if ( lvl == 'exrr') {
document.getElementById("partConfig").firstChild.nodeValue="EXRR-";
document.getElementById("shapeHeader").firstChild.nodeValue="Round";
document.getElementById("shape").firstChild.nodeValue="ROUND";
document.getElementById("shapeSm").firstChild.nodeValue="Round";
document.getElementById("bikesParked").firstChild.nodeValue="2";
document.getElementById("materials").firstChild.nodeValue='1.5” uncoated pipe';
document.getElementById("installation").firstChild.nodeValue='In-ground mount is embedded into concrete base. Flange mount has two 5.2” x 3.9” oval x .25" feet - 6 anchors.';
document.getElementById("setbackWall").firstChild.nodeValue='Wall Setback: For racks set parallel to the wall, a minimum of 24" should be left between the wall and the rack. 36" is the recommended setback. For racks installed perpendicular to the wall, a 34" setback is the minimum distance. 42" is recommended.';
document.getElementById("cad").href="http://www.dero.com/cad/ex_round.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/ex_round.zip";
document.getElementById("hires").href="http://www.dero.com/hires/ex_round.jpg";

} else if ( lvl == 'exar' ) {
document.getElementById("partConfig").firstChild.nodeValue="EXAR-";
document.getElementById("shapeHeader").firstChild.nodeValue="Arc";
document.getElementById("shape").firstChild.nodeValue="ARC";
document.getElementById("shapeSm").firstChild.nodeValue="Arc";
document.getElementById("bikesParked").firstChild.nodeValue="2";
document.getElementById("materials").firstChild.nodeValue='2” x .25” square tube';
document.getElementById("installation").firstChild.nodeValue='In-ground mount is embedded into concrete base.  Flange mount has two 5” x 4” x .25" feet - 6 anchors.';
document.getElementById("setbackWall").firstChild.nodeValue='Wall Setback: For racks set parallel to the wall, a minimum of 24" should be left between the wall and the rack. 36" is the recommended setback. For racks installed perpendicular to the wall, a 34" setback is the minimum distance. 42" is recommended.';
document.getElementById("cad").href="http://www.dero.com/cad/ex_arc.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/ex_arc.zip";
document.getElementById("hires").href="http://www.dero.com/hires/ex_arc.jpg";

} else if ( lvl == 'exsq' ) {
document.getElementById("partConfig").firstChild.nodeValue="EXSQ-";
document.getElementById("shapeHeader").firstChild.nodeValue="Square";
document.getElementById("shape").firstChild.nodeValue="SQUARE";
document.getElementById("shapeSm").firstChild.nodeValue="Square";
document.getElementById("bikesParked").firstChild.nodeValue="2";
document.getElementById("materials").firstChild.nodeValue='2” x .25” square tube';
document.getElementById("installation").firstChild.nodeValue='In-ground mount is embedded into concrete base. Flange mount has two 4.5” x 4” x .25" feet - 8 anchors.';
document.getElementById("setbackWall").firstChild.nodeValue='Wall Setback: For racks set parallel to the wall, a minimum of 24" should be left between the wall and the rack. 36" is the recommended setback. For racks installed perpendicular to the wall, a 34" setback is the minimum distance. 42" is recommended.';
document.getElementById("cad").href="http://www.dero.com/cad/ex_square.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/ex_square.zip";
document.getElementById("hires").href="http://www.dero.com/hires/ex_square.jpg";

} else if ( lvl == 'exsp' ) {
document.getElementById("partConfig").firstChild.nodeValue="EXSP-";
document.getElementById("shapeHeader").firstChild.nodeValue="Sphere";
document.getElementById("shape").firstChild.nodeValue="SPHERE";
document.getElementById("shapeSm").firstChild.nodeValue="Sphere";
document.getElementById("bikesParked").firstChild.nodeValue="3";
document.getElementById("materials").firstChild.nodeValue='1.5” pipe';
document.getElementById("installation").firstChild.nodeValue='In-ground mount is embedded into concrete base. Flange mount has two 4.5” x 4” x .25" feet - 8 anchors.';
document.getElementById("setbackWall").firstChild.nodeValue='Wall Setback: A 34" setback is the minimum distance. 42" is recommended.';
document.getElementById("cad").href="http://www.dero.com/cad/ex_sphere.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/ex_sphere.zip";
document.getElementById("hires").href="http://www.dero.com/hires/ex_sphere.jpg";

} else if ( lvl == 'extr' ) {
document.getElementById("partConfig").firstChild.nodeValue="EXTR-";
document.getElementById("shapeHeader").firstChild.nodeValue="Triangle";
document.getElementById("shape").firstChild.nodeValue="TRIANGLE";
document.getElementById("shapeSm").firstChild.nodeValue="Triangle";
document.getElementById("bikesParked").firstChild.nodeValue="2";
document.getElementById("materials").firstChild.nodeValue='2” x .25” square tube';
document.getElementById("installation").firstChild.nodeValue='In-ground mount is embedded into concrete base. Flange mount has two 4.5” x 4” x .25" feet - 8 anchors.';
document.getElementById("setbackWall").firstChild.nodeValue='Wall Setback: For racks set parallel to the wall, a minimum of 24" should be left between the wall and the rack. 36" is the recommended setback. For racks installed perpendicular to the wall, a 34" setback is the minimum distance. 42" is recommended.';
document.getElementById("cad").href="http://www.dero.com/cad/ex_triangle.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/ex_triangle.zip";
document.getElementById("hires").href="http://www.dero.com/hires/ex_triangle.jpg";

} else if ( lvl == 'excy' ) {
document.getElementById("partConfig").firstChild.nodeValue="EXCY-";
document.getElementById("shapeHeader").firstChild.nodeValue="Cylinder";
document.getElementById("shape").firstChild.nodeValue="CYLINDER";
document.getElementById("shapeSm").firstChild.nodeValue="Cylinder";
document.getElementById("bikesParked").firstChild.nodeValue="3";
document.getElementById("materials").firstChild.nodeValue='1.5” uncoated pipe';
document.getElementById("installation").firstChild.nodeValue='In-ground mount is embedded into concrete base. Flange mount has three 4" round x .25" feet - 6 anchors.';
document.getElementById("setbackWall").firstChild.nodeValue='Wall Setback: For racks set parallel to the wall, a minimum of 24" should be left between the wall and the rack. 36" is the recommended setback. For racks installed perpendicular to the wall, a 34" setback is the minimum distance. 42" is recommended.';
document.getElementById("cad").href="http://www.dero.com/cad/ex_cylinder.zip";
document.getElementById("sketchup").href="http://www.dero.com/sketchup/ex_cylinder.zip";
document.getElementById("hires").href="http://www.dero.com/hires/ex_cylinder.jpg";
}
}


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 == 'GV' ) {
        clr = "URL(images/galvanized.gif)";
  } else if ( lvl == 'EPX' ) {
        clr = "URL(images/white.gif)";
  } else if ( lvl == 'ST' ) {
        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 showCopy(theId) 
 { 
 	var line = document.getElementById(theId) 

 	if (line.className=="hidden") 
 	{ 
 		line.className="shown"; //show element 
 	} 
 	else 
 	{ 
 		line.className="hidden"; //hide element 
 	} 
 }

function showDiv(sel)
{
     theLayer = document.getElementById("Rail");
     if(sel.selectedIndex==3) {
     	vis="visible";
     	theLayer.style.visibility=vis;
     	document.form.quantity.value = "3";
     	document.form.quantity.readOnly=true;
     	}
     else {
     	vis = "hidden";
     	theLayer.style.visibility=vis;
	 	document.getElementById("Rail").selectedIndex=0;
	 	document.form.quantity.readOnly=false;
	 }
	 
}  

function showCol(sel)
{
     theLayer = document.getElementById("Color");
     if(sel.selectedIndex==2) vis="visible"
     else vis = "hidden"
     theLayer.style.visibility=vis;
}


