
/* ***********************************************************
Example 4-5 (DHTMLapi.js)
"Dynamic HTML:The Definitive Reference"
by Danny Goodman
Published by O'Reilly & Associates  ISBN 1-56592-494-0
http://www.oreilly.com
Copyright 1998 Danny Goodman.  All Rights Reserved.
************************************************************ */
// DHTMLapi.js custom API for cross-platform
// object positioning by Danny Goodman (http://www.dannyg.com)

// Global variables
var isNav, isIE
var coll = ""
var styleObj = ""
if (parseInt(navigator.appVersion) >= 4) {
  if (navigator.appName == "Netscape") {
    isNav = true
  } else {
    isIE = true
    coll = "all."
    styleObj = ".style"
  }
}

// Convert object name string or object reference
// into a valid object reference
function getObject(obj) {
  var theObj
  if (typeof obj == "string") {
    theObj = eval("document." + coll + obj + styleObj)
  } else {
    theObj = obj
  }
  return theObj
}

// Positioning an object at a specific pixel coordinate
function shiftTo(obj, x, y) {
  var theObj = getObject(obj)
  if (isNav) {
    theObj.moveTo(x,y)
  } else {
    theObj.pixelLeft = x
    theObj.pixelTop = y
  }
}

// Moving an object by x and/or y pixels
function shiftBy(obj, deltaX, deltaY) {
  var theObj = getObject(obj)
  if (isNav) {
    theObj.moveBy(deltaX, deltaY)
  } else {
    theObj.pixelLeft += deltaX
    theObj.pixelTop += deltaY
  }
}

// Setting the z-order of an object
function setZIndex(obj, zOrder) {
  var theObj = getObject(obj)
  theObj.zIndex = zOrder
}

// Setting the background color of an object
function setBGColor(obj, color) {
  var theObj = getObject(obj)
  if (isNav) {
    theObj.bgColor = color
  } else {
    theObj.backgroundColor = color
  }
}

// Setting the visibility of an object to visible
function show(obj) {
  var theObj = getObject(obj)
  theObj.visibility = "visible"
}

// Setting the visibility of an object to hidden
function hide(obj) {
  var theObj = getObject(obj)
  theObj.visibility = "hidden"
}

// Retrieving the x coordinate of a positionable object
function getObjectLeft(obj)  {
  var theObj = getObject(obj)
  if (isNav) {
    return theObj.left
  } else {
    return theObj.pixelLeft
  }
}

// Retrieving the y coordinate of a positionable object
function getObjectTop(obj)  {
  var theObj = getObject(obj)
  if (isNav) {
    return theObj.top
  } else {
    return theObj.pixelTop
  }
}

// Utility function returns the available content width space in browser window
function getInsideWindowWidth(){
  if (isNav) {
    return window.innerWidth
  } else {
    return document.body.clientWidth
  }
}
// Utility function returns the available content height space in browser window
function getInsideWindowHeight() {
  if (isNav) {
    return window.innerHeight
  } else {
    return document.body.clientHeight
  }
}




// code for rollovers

if (document.images) {
moton = new Image();
moton.src = "images/menu/test_m.gif";
motoff = new Image();
motoff.src = "images/menu/test.gif";
motabs_2on = new Image();
motabs_2on.src = "images/menu/tabs_2_m.gif";
motabs_2off = new Image();
motabs_2off.src = "images/menu/tabs_2.gif";
motabs_3on = new Image();
motabs_3on.src = "images/menu/tabs_3_m.gif";
motabs_3off = new Image();
motabs_3off.src = "images/menu/tabs_3.gif";
motabs_21on = new Image();
motabs_21on.src = "images/menu/tabs_13_m.gif";
motabs_21off = new Image();
motabs_21off.src = "images/menu/tabs_13.gif";
motabs_15on = new Image();
motabs_15on.src = "images/menu/tabs_15_m.gif";
motabs_15off = new Image();
motabs_15off.src = "images/menu/tabs_15.gif";
}
function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}



// function to hide email addresses from robots

// there's only one address, so no need for a lookup table


var str1="info" 
var domna="nofus";
var domnb="swebsi";
var domnc="tes.com";


var atstr="@";


function blat(){
  document.write("<A href=");
  document.write("'mailto:")
  document.write(str1 + atstr);
  document.write(domna);
  document.write(domnb);
  document.write(domnc);
  document.write("'>");
  if(arguments.length>0){
    document.write(arguments[0]);
    }
  else{
    document.write(str1 + atstr);
    document.write(domna);
    document.write(domnb);
    document.write(domnc);
  }
  document.write("</a>");
}





function forcetablewidth(){
  var wid=getInsideWindowWidth();
  if(wid>500){
    document.write("<img src='images/5x5.gif' height=15 width=500>");
    }
  else{
    document.write("<img src='images/5x5.gif' height=15 width=400>");
  }
}


function OnResizeProc(){history.go(0);}
