﻿function calcHeight()
{
document.getElementById('ifEdu').scrolling="no"
//alert('here');
  //find the height of the internal page
  var the_height=
    document.getElementById('ifContent').contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('ifContent').height=
      the_height;
}
function calcWidth()
{
        var the_width=
    document.getElementById('ifContent').contentWindow.
      document.body.scrollwidth;

  //change the width of the iframe
  document.getElementById('ifContent').width=
      the_width;
}
function tryStockCodeAgainKeyPress(e)
{
    var txtStkCode = document.getElementById("pcode").value;
        if(e.keyCode == 13)
        {
            window.location="/epicweb2.0/default.aspx?screen=ProductView&pcode="+txtStkCode;
        }
}
function tryStockCodeAgain()
{
    var txtStkCode = document.getElementById("pcode").value;
    window.location="/epicweb2.0/default.aspx?screen=ProductView&pcode="+txtStkCode;
}

function DisplayLargeImageInNewWindow()
{
    var theImageObj = document.getElementById("ctl04_Hero").src.replace('Colourways','Big');
    theImageObj = theImageObj.replace('Hero','Big');
    window.open(theImageObj);
}
function swapImages(ImgObj1,ImgObj2)
{
    var src1 = document.getElementById(ImgObj1).src.substring(document.getElementById(ImgObj1).src.lastIndexOf('/')+1);
    var src2 = document.getElementById(ImgObj2).src.substring(document.getElementById(ImgObj2).src.lastIndexOf('/')+1);
    document.getElementById(ImgObj1).src = ""+src2;
    document.getElementById(ImgObj2).src = ""+src1;
}
function ChangeImage(ImgObjName,ImgSrc)
{
    document.getElementById(ImgObjName).src = ImgSrc;
}

