// JavaScript Document


//picks css based on monitor width

var big = 1280;
var width = window.screen.availWidth;

if (width < big) {
document.write('<link rel="stylesheet" type="text/css" href="styles/1024.css" />');
}
else {
document.write('<link rel="stylesheet" type="text/css" href="styles/1280.css" />');
}

// Search page script


//ha,ha,ha
function cm()
{
 var dom = 'onahill';
 var tld = '.net';
 var uname = 'chris';
 document.location = 'mailto:' + uname + '@' + dom + tld;
}

function em()
{
 var dom = 'eatonauctionservice';
 var tld = '.com';
 var uname = 'mail';
 document.location = 'mailto:' + uname + '@' + dom + tld;
}

// instant breadcrumb nav (not used yet)
function breadcrumbs(){
  sURL = new String;
  bits = new Object;
  var x = 0;
  var stop = 0;
  var output = "You are here: <a href=\"/\">Home</a>  >  ";
  sURL = location.href;
  sURL = sURL.slice(8,sURL.length);
  chunkStart = sURL.indexOf("/");
  sURL = sURL.slice(chunkStart+1,sURL.length)
  while(!stop){
    chunkStart = sURL.indexOf("/");
    if (chunkStart != -1){
      bits[x] = sURL.slice(0,chunkStart)
      sURL = sURL.slice(chunkStart+1,sURL.length);
    }else{
      stop = 1;
    }
    x++;
  }
  for(var i in bits){
    output += "<a href=\"";
    for(y=1;y<x-i;y++){
      output += "../";
    }
    output += bits[i] + "/\">" + bits[i] + "</a>  >  ";
  }
  document.write(output + document.title);
}


// not used
function changeStyle(objectID, styleName, newVal){
var object = document.getElementById(objectID);
object.style [styleName] = newVal;
}


//just like to have this one
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}




  