// This function does the stock window popup

function pw(){
	swindow = window.open("/stocklevel.aspx", "stockwindow", "width=400,height=400,status=1,menu=0,left=100,top=100,screenX=100,screenY=100");
	swindow.moveTo(window.screenX + 100, window.screenY + 100);
}

// This function performs a browser/platform check.

function checkBrowser(){

  this.ver=navigator.appVersion

  this.dom=document.getElementById?1:0;

  this.mac=(this.ver.indexOf("PPC")!= -1)?1:0;

  this.win=(this.ver.indexOf("Win")!= -1)?1:0;

  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;

  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;

  this.ie4=(document.all && !this.dom)?1:0;

  this.ie=(this.ie6 || this.ie5 || this.ie4);

  this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

  this.ns4=(document.layers && !this.dom)?1:0;

  this.ns=(this.ns4 || this.ns5);

  this.browser=(this.ie || this.ns);

  return this;

}



// This function performs a simple browser check and if the browser is IE
// the AddFavorite dialog is displayed otherwise an alert message is
// shown detailing how other browsers can bookmark the page.

function bookmark() {

  browser = new checkBrowser();

  if (browser.ie) {

    window.external.AddFavorite(window.location.href,document.title);

  } else {

    alert('To bookmark this page\n\nNetscape users\nPress Ctrl-D\n\nOpera users\nPress CTRL+SHIFT+T\n\nOther users\nConsult your browser help');

  }

}

// Code by Paul Sowden :http://www.alistapart.com/articles/alternate/ //

function setActiveListView(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}






