callScript('item');

var softVer='3.0(100)';
var webAddress='http://www.rackmount-devices.com';
var imgDir='/images';
var supDir='/support-files';
var imgPath=webAddress+imgDir;
var supPath=webAddress+supDir;

var thisDate=new Date();
var myYear=thisDate.getFullYear();
var browApp=navigator.appCodeName;
var browType=navigator.appName;
var browVer=navigator.appVersion;
var browAgent=navigator.userAgent;
var browOS=navigator.platform;
var winHeight=screen.height;
var winWidth=screen.width;

var bgButton='bgcolor="#f0fff0"';
var bgCart='bgcolor="#ddddee"';
var bgColor='bgcolor="#ffffff"';
var bgGray='bgcolor="#f3f3f3"';
var bgNav='bgcolor="#ddeedd"';
var bgShade='bgcolor="#eeeeee"';
var bgTable='bgcolor="#ccddcc"';

var tableColor1='#eeeecc';
var tableColor2='#ffffcc';

var bullDot='&nbsp;&nbsp;<FONT color="teal">&bull;</FONT>&nbsp;&nbsp;';

function addToCartHeader() {
}

function addToCart() {
}

function antInfo(ty) {
  if (ty == 'directional')
    document.write('This uni-directional antenna must be pointed in the direction of the television transmitters for optimum performance. ');
  document.write('Visit ');
  document.write('<A href="http://www.antennaweb.org" target="_blank" class="descDoc" onclick="showLoadMsg();">antennaweb.org</A>');
  document.write(' for more details. ');
}

function args_init() {
}

function callScript(s) {
  document.write('<SCRIPT type="text/javascript" src="/support-files/'+s+'.js"></SCRIPT>');
}

function closeButton(p) {
  var s='cart', v='Close';
  r = readCookie('crumb');
  if (p == 'return') { s = 'history'; v = 'View Order History'; }
  else if ((p == 'cart') || (r == undefined) || (r == '')) s = 'last';
  document.write('&nbsp;&nbsp;<INPUT name="close" type="submit" value="'+v+'" class="button');
  if (p == 'account') document.write('Gray'); else document.write('Orange');
  document.write('" onclick="goBack(\''+s+'\'); return false;">');
}

function descAlt(link,text) {
  if (link.substring(0,4) != 'http')
    link = imgPath+'/'+link;
  document.write('<A href="'+link+'" target="_blank" class="descLink" onclick="showLoadMsg();">'+text+'</A>');
}

function descDocs(link,text) {
  document.write('<A href="'+link+'" class="descDoc" onclick="showLoadMsg();">'+text+'</A>');
}

var xMore=-1;
function descMore() {
  document.write(' See additional information below.');
}

function descSearch(sp,text) {
  xLink = webAddress+'/search.html?sp='+sp+'&fc=99';
  document.write('<A href="'+xLink+'" class="descLink" onclick="showLoadMsg();">'+text+'</A>');
}

function findMsg() {
  document.write('<BR><FONT color="gray" size="1"><I>To search within this page, use your Web browser\'s <B>Find</B> function (<B>Ctrl-F</B>).</I></FONT>');
}

function getTest() {
}

function goBack() {
}

function helpImage(img,h,w) {
  document.write('<IMG src="');
  if (img.substring(0,4) == 'http')
    document.write(img);
  else
    document.write(imgPath+'/'+img);
  document.write('"');
  if (h > 0)
    document.write(' height="'+h+'"');
  if (w > 0)
    document.write(' width="'+w+'"');
  document.write('>');
}

function lastUpdate(ud) {
  document.write('<BR><BR><FONT class="helpUpdate">Updated: <B>'+ud+'</B></FONT>');
}

function linkNew(link) {
  showLoadMsg();
  window.open(link);
}

function linkWin(link) {
  showLoadMsg();
  parent.location = link;
}

function lpadStr(s,x,d) {
  return(leftPad(s,x,d));
}

function ltrimStr(s,d) {
  return(leftTrim(s,d));
}

function mailContact(link,text) {
  contactUs(text,link);
}

function mailCorp(text) {
  mailContact(emailCorp,text);
}

function mailLink(text) {
  mailContact(emailAddress,text);
}

function mailSite(text) {
  mailContact(emailSite,text);
}

function moreInfo(pdf,sz,text) {
  showPrice(pdf,sz,text);
}

function noReturn() {
  document.write('<BR><B>Non-returnable item. Contact manufacturer for warranty service.</B>');
}

function rmdClose() {
  mainClose();
}

function rmdOpen() {
  mainOpen();
}

function rpadStr(s,x,d) {
  return(rightPad(s,x,d));
}

function rtrimStr(s,d) {
  return(rightTrim(s,d));
}

function setBack() {
}

function setLast() {
}

function setPrev() {
}

function setSearch() {
}

function setTest() {
}

function showBatt(size) {
  document.write('<FONT size="4"><B>'+size+'-Cell </B></FONT><BR>');
}

function showDiff(shown,actual) {
  document.write(' Note: '+shown+' unit is shown for reference, however this listing is for the '+actual+' model.');
}

function showFinish(color,prefix) {
  document.write('<BR>');
  switch(prefix) {
    case 'FC': document.write('Chassis '); break;
    case 'FP': document.write('Faceplate '); break;
  }
  document.write('Finish: ');
  switch(color) {
    case 'BBA': document.write('<B>Brushed Black Anodized</B>'); break;
    case 'BL': document.write('<B>Black Laminate</B>'); break;
    case 'BSA': document.write('<FONT color="silver"><B>Brushed Silver Anodized</B></FONT>'); break;
    case 'OL': document.write('<FONT color="goldenrod"><B>Oak Laminate</B></FONT>'); break;
    case 'TBP': document.write('<FONT color="#444444"><B>Textured Black Powdercoat</B></FONT>'); break;
  }
}

function showMerchant(mn) {
  if (mn == 'paypal')
    document.write('<FONT color="teal">PayPal</FONT>');
  else if (mn == 'google')
    document.write('<FONT color="teal">Google Checkout</FONT>');
}

function showPopup(img,h,w,fc,link) {
  if (img.substring(0,4) != 'http')
    img = imgPath+'/'+img;
  if ((link == undefined) || (fc < 2))
    link = img;
  else if (link.substring(0,4) != 'http')
    link = imgPath+'/'+link;
  if ((fc == 2) || (fc == 4) || (fc == 5) || (((h * 1 > 0) || (w * 1 > 0))  && (h != '-2') && (w != '-2'))) {
    xLink = " Move pointer away from image to close detail viewer.";
    document.write('<DIV id="pic"><A class="p1" onclick="showAlert(\''+xLink+'\'); return false;">');
  }
  document.write('<IMG src="'+img+'"');
  if (h * 1 > 0)
    document.write(' height="'+h+'"');
  if (w * 1 > 0)
    document.write(' width="'+w+'"');
  document.write('>');
  if ((fc == 2) || (fc == 4) || (fc == 5) || (((h * 1 > 0) || (w * 1 > 0))  && (h != '-2') && (w != '-2'))) {
    document.write('<IMG  src="'+link+'" class="');
    if (fc == 4)
      document.write('tall');
    else if ((fc == 5) || (w > 0))
      document.write('wide');
    else
      document.write('large');
    document.write('" ></A></DIV>');
    if (fc >= 0)
      document.write('<BR><IMG src="'+imgPath+'/enlarge.jpg" height="10" > Move pointer over image for detail');
  }
}
