function GoTo(cPath, cPane, cTab, cFileName) {
  if (typeof cPath == "object") {
    var cTmp  = cPath.href;
    var aPath = cTmp.split(".com"); 
    cPath     = aPath[1];
    }
    
  if (typeof cPane != "string") {cPane = "1";}
  var cCook = "Pane=" + cPane + "; path=" + cPath;
  document.cookie = "";
  document.cookie = cCook;

  if (typeof cTab != "string") {cTab = "";}
  var cCook = "Tab=" + cTab + "; path=" + cPath;
  document.cookie = cCook;

  if (typeof cFileName=="string") cPath = cPath + cFileName;
  
  window.location.href=cPath; 
  return false;
}

function GoToProducts()      { return GoHome("1"); }
function GoToCustomCoating() { return GoHome("2"); }
function GoToDealers()       { return GoHome("3"); }
function GoToContact()       { return GoHome("4"); }
function GoToPolicies()      { return GoHome("5"); }

function GoToSteamJet()        { return GoTo("/products/steamers/steamjet/", "1","11"); }
function GoToVerticalSteamer() { return GoTo("/products/steamers/verticalsteamer/", "1","11"); }
function GoToSteamerCores()    { return GoTo("/products/steamers/steamjet/", "1","14"); }
function GoToSteamingPaper()   { return GoTo("/products/steamers/verticalsteamer/", "1","13"); }
function GoToMicroLogica()     { return GoTo("/products/printers/micrologica/"); }

function GoToJAcid()     { return GoTo("/products/inks/jcqacid/", "1", "11"); }
function GoToJReactive() { return GoTo("/products/inks/jcqreactive/", "1", "11"); }
function GoToJPigment()  { return GoTo("/products/inks/jcqpigment/", "1", "11"); }
function GoToTerasil()   { return GoTo("/products/inks/cibaterasil/", "1", "11"); }
function GoToCibacron()  { return GoTo("/products/inks/cibacibacron/", "1", "11"); }
function GoToLanaset()   { return GoTo("/products/inks/cibalanaset/", "1", "11"); }

function GoToFabList() { return GoTo("/products/fabric/fablist/"); }

function GoToVSteamer() { return GoTo("/products/steamers/verticalsteamer/", "1", "11"); }
function GoToSteamJet() { return GoTo("/products/steamers/steamjet/", "1", "11"); }

function GoToFab(cTypId) {
  document.cookie = "ft=" + cTypId + "; path=/products/fabric/";
  SetLocalCookie("Pane","1","/products/fabric/","fpFabs");
  SetLocalCookie("Tab","11","/products/fabric/","fpFabs");
  return GoTo("/products/fabric/", "1", "11"); }

function GoToCoatings(oA) {
  document.cookie = "Coatings=Pn1&Tb11; path=/products/coatings/"
  return GoTo(oA.href,"2","11"); }
function GoToFabriSign(oA) {
  document.cookie = "Coatings=Pn1&Tb11; path=/products/coatings/"
  return GoTo(oA.href,"2","11"); }
function GoToProCoat(oA) {
  document.cookie = "Coatings=Pn2&Tb521; path=/products/coatings/"
  return GoTo(oA.href,"2","521"); }

function GoHome(cPane,cTab) {
  if (arguments.length==0) { cPane = "0"; cTab = "0"; }
  if (arguments.length==1) { cTab = "0"; }
  
  SetLocalCookie("Pane",cPane,"/","JIFS");
  SetLocalCookie("Tab",cTab,"/","JIFS");
  
  location.href = "/";  

  return false;
}
function IsFromHere(cRfr) {
  if      (cRfr.length==0) {return true;}
  else if (/www.inkjetfabrics.com/.test(cRfr)) {return true;}
  else    return false;
}

function ShowPane() {
  var cState, cPn, iTb;
  
  cState = GetCookie(cPageId);
  
  if (cState.length > 0 ) {

    if ( /Pn(\d+)/.test(cState) ) { 
    
      cPn = RegExp.$1;
     
      if (/Tb(\d+)/.test(cState)) { iTb = parseInt(RegExp.$1); } else {iTb = 0;}
           
      oMM.ItemClick(cPn,iTb); 
    }
  }
}


/*========== Sidebar Link ==========*/
  function sblOver(oDiv) {oDiv.className ="SBL sblHov";}
  function sblOut(oDiv)  {oDiv.className ="SBL";}
  
  function GoToJInks() {document.cookie="page=JcqInks; path=/products/inks/";}
  function GoToCiba() {document.cookie="page=CibaInks; path=/products/inks/";}
  function GoToWashes() {document.cookie="page=Wash; path=/products/inks/";}

/*========== Expando ==========*/
  function Expando(cExpandoId) {
    this.oExpando = document.getElementById(cExpandoId);

    this.Expand = function(ev) {
      ev = NormalizeEvent(ev);
      var oXCap  = this.GetElement(ev.target.parentNode.childNodes, "xCap");
      var oXBody = this.GetElement(ev.target.parentNode.childNodes, "xBod");
      var oXBtn  = this.GetElement(ev.target.parentNode.childNodes, "xBtn");
      if (oXCap) {oXCap.className = "xCap xcSel";}
      if (oXBody.style.display=="block") {
        oXBody.style.display = "none"; 
        if (oXBtn) {oXBtn.src = "/images/buttons/Plus_13.jpg";}
      }
      else {
        oXBody.style.display = "block";
        if (oXBtn) {oXBtn.src = "/images/buttons/Minus_13.jpg";}
      }
        
     }
    this.xOver = function(ev) {
      ev = NormalizeEvent(ev);
      if (!/xCap/.test(ev.target.className) && ev.target.className != "xBtn") {return;}
      var oXCap = this.GetElement(ev.target.parentNode.childNodes, "xCap");
      var oXBtn = this.GetElement(ev.target.parentNode.childNodes, "xBtn");
      if(oXCap) {oXCap.className = "xCap xcHov";}
      if (oXBtn) {rOver(oXBtn);}
     } 
    this.xOut = function(ev) {
      ev = NormalizeEvent(ev);
      if (!/xCap/.test(ev.target.className) && ev.target.className != "xBtn") {return;}
      var oXCap = this.GetElement(ev.target.parentNode.childNodes, "xCap");
      var oXBtn = this.GetElement(ev.target.parentNode.childNodes, "xBtn");
      if(oXCap) {oXCap.className = "xCap";}
      if (oXBtn) {rOut(oXBtn);}
     } 
     this.GetElement = function(oNodes,cClass) {
       var oClass = new RegExp(cClass);
       for (i=0; i<oNodes.length; i++) { if (oClass.test(oNodes[i].className)) {return oNodes[i];}  }   
     }
  }
  
  function mbOver(oMb) {
    if (mbId==oMb.id) { return; }
    oMb.className = "MenuBox mbHov";
    for (var i=0; i<oMb.childNodes.length; i++ ) {
      if (oMb.childNodes[i].tagName=="IMG") { rOver(oMb.childNodes[i]); }  }
  }
  function mbOut(oMb)  {
    if (mbId==oMb.id) { return; }
    oMb.className = "MenuBox mbStd";
    for (var i=0; i<oMb.childNodes.length; i++ ) {
      if (oMb.childNodes[i].tagName=="IMG") { rOut(oMb.childNodes[i]); }  }
  }
  function mbSelect(oMb) {
    oMb.className = "MenuBox mbSel";
    for (var i=0; i<oMb.childNodes.length; i++ ) {
      if (oMb.childNodes[i].tagName=="IMG") { rOver(oMb.childNodes[i]); }  }
  }
  function mbReset(aMenuBoxes)  {
    for (var i=0; i<aMenuBoxes.length; i++) {  
      oMb = document.getElementById(aMenuBoxes[i]) 
      oMb.className = "MenuBox mbStd";
      for (var j=0; j<oMb.childNodes.length; j++ ) { 
        if (oMb.childNodes[j].tagName=="IMG") { rOut(oMb.childNodes[j]); }  
      }
    }
  }
  
  
  