function sculpturedinit() {
   var thumbnailsrc
   if (screen.availWidth >1000) {
      thumbnailsrc = 'thumbnails-wide.htm'
   }
   else {
      thumbnailsrc = 'thumbnails.htm'
   }

//   if (document.getElementById) {
   var framecontent='<hr/><h2>Coloured MDF, and woodgrain, plain &amp; metallic finishes available from stock - others to special order:</h2>'+
   '<iframe name="compimg" id="compimg" class="iframeleft" src="iframe.aspx" allowtransparency="true" '+
   'frameborder="no" scrolling="no"></iframe>'+
   '<iframe name="textfoils" id="textfoils" src=' +thumbnailsrc+ ' class="iframeright" allowtransparency="true" '+
   'frameborder="no" scrolling="no"></iframe>'
   document.getElementById("textdiv").innerHTML = framecontent
//   }
}

//###########################
if (document.getElementById) {
   function showfoils() {
      document.getElementById('showfoilslink').style.display='none'
      document.getElementById('textdiv').style.display='block'
   }
}

var cook
var textcook = "img=reed&txt=Reed"     //initialise texture
var foilcook = "img=walnut-light&txt=Light Walnut"   //initialise foil
var cookiecheck = document.cookie      //check whether a cookie has been set previously

function changefoil(foil){         //set the foil
      if (document.getElementById) {
         checkforcookie() //check to make sure cookies are enabled
         var d = new Date();
         if (document.cookie.indexOf("winwood-cookiecheck") != -1) {
            document.cookie = "winwood-cookiecheck=;path=/" + ";expires=" +d.toGMTString()+ ";" + ";";
         }
         cook = foil.split(":");
         newcookie = "img=" +cook[0]+ "&txt=" +cook[1]
         document.cookie = "sculptfoil" + "=" +newcookie+ " ;path=/";
         top.frames['compimg'].location.reload()
   }
}
function changetexture(texture){   //set the texture
      if (document.getElementById) {
        checkforcookie() //check to make sure cookies are enabled
         var d = new Date();
         if (document.cookie.indexOf("winwood-cookiecheck") != -1) {
            document.cookie = "winwood-cookiecheck=;path=/" + ";expires=" +d.toGMTString()+ ";" + ";";
         }
         cook = texture.split(":");
         newcookie = "img=" +cook[0]+ "&txt=" +cook[1]
         document.cookie = "sculpttext" + "=" +newcookie+ " ;path=/";
         top.frames['compimg'].location.reload()
   }
}

var oldheader = "texheadmdf"
function changeheaders(currentheader) {   //change the format of the chosen header
   if (oldheader != currentheader) {
      document.getElementById(oldheader).className="texheader"
      document.getElementById(currentheader).className="texheadercurrent"
      oldheader = currentheader
   }
}
if (document.getElementById) {
   function showfoils() {
      document.getElementById('showfoilslink').style.display='none'
      document.getElementById('textdiv').style.display='block'
   }
}