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

function replacePartMount(lvl)  
{ 
  var text =  
  [ 
    "FT-",
    "IG-", 
    "FS-"/**/  
  ][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 replaceRackConfig(TheId,lvl)
{
if ( lvl == 'bol') {
document.getElementById("rackConfig").firstChild.nodeValue="";
document.getElementById("specPart").firstChild.nodeValue="BOL-";
document.getElementById("partConfig").firstChild.nodeValue="BOL-";
document.getElementById("hitch").firstChild.nodeValue="";
document.form.hitch.value="";
} else if ( lvl == 'bolhitch' ) {
document.getElementById("rackConfig").firstChild.nodeValue="HITCH ";
document.getElementById("specPart").firstChild.nodeValue="BOLHITCH-";
document.getElementById("partConfig").firstChild.nodeValue="BOLHITCH-";
document.getElementById("hitch").firstChild.nodeValue="Hitch";
document.form.hitch.value="Hitch";
}
}

function replaceRackConfigSm(TheId,lvl)
{
if ( lvl == 'bol') {
document.getElementById("rackConfigSmall").firstChild.nodeValue="";
} else if ( lvl == 'bolhitch' ) {
document.getElementById("rackConfigSmall").firstChild.nodeValue="Hitch ";
}
}


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


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));
  	
  var text3 =  
  [ 
    'Surface mount has 8.5" diameter foot - 3 anchors. ', 
    "In-ground mount is embedded into concrete base. ", 
    "Rail Mount is bolted to two galvanized steel channels. "/**/  
  ][lvl]; 

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

// 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+
		}
	

var img=new Array();
  img["2H - Surface"]="images/rr2hft.png";
  img["2H - In Ground"]="images/rr2hig.png";
  img["2H - Freestanding"]="images/rr2hfs.png";
  img["3H - Surface"]="images/rr3hft.png";
  img["3H - In Ground"]="images/rr3hig.png";
  img["3H - Freestanding"]="images/rr3hfs.png";
  img["4H - Surface"]="images/rr4hft.png";
  img["4H - In Ground"]="images/rr4hig.png";
  img["4H - Freestanding"]="images/rr4hfs.png";
  img["5H - Surface"]="images/rr5hft.png";
  img["5H - In Ground"]="images/rr5hig.png";
  img["5H - Freestanding"]="images/rr5hfs.png";

function swap(type){
document.getElementById("image").src=img[type];
var sel=document.form.mount;
for(i=0;i<sel.length;i++){if(sel.options[i].text==type){sel.selectedIndex=i;}}
}

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 showCol(sel)
{
     theLayer = document.getElementById("Color");
     if(sel.selectedIndex==1) vis="visible"
     else vis = "hidden"
     theLayer.style.visibility=vis;
}

