// Print Friendly Button

var newwindow = null;

function printpage(url)
{
	var aw = window.screen.availWidth;
	var leftmargin = (aw/2) - (307);
	var attributes = "width=615,height=675,status=yes,resizable=yes,left=" + leftmargin;
	newwindow=window.open(url,'newwindow',attributes);
	if (window.focus) {
		newwindow.focus()
	}
}



function setActiveStyleSheet(title) {
  var i, a;
  for (i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if (a.getAttribute("rel") &&
        a.getAttribute("rel").indexOf("style") != -1 &&
        a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}



window.onload = function(e) {
  //setActiveStyleSheet(title);
  if (window.name == "newwindow") {
	setActiveStyleSheet('screenprint');
}

	else setActiveStyleSheet("");
}
//window.onunload = function(e) {
  //var title = getActiveStyleSheet();
  //createCookie("style", title, 365);
//}

//var cookie = readCookie("style");
//var title = cookie ? cookie : getPreferredStyleSheet();
//setActiveStyleSheet(title);