


/*
PrintPreview Stuff
*/
var thisLocation = location.href;
var beginFilename = thisLocation.lastIndexOf("/")+1;
var endFilename;
if (thisLocation.indexOf("?") > -1) {
  endFilename = thisLocation.lastIndexOf("?");
}
if (thisLocation.indexOf("#")  > -1) {
  endFilename = thisLocation.lastIndexOf("#");
}
if (thisLocation.indexOf("?") == -1 && thisLocation.indexOf("#") == -1) {
  endFilename = thisLocation.length;
}
var filename = thisLocation.substring(beginFilename,endFilename);
var truePrint = false;
var pathTotal;

function PrintOrNot() {
  var myPrint = location.search;
  if (myPrint.indexOf("print=true") > -1) {
    truePrint = true;
  }
}
PrintOrNot();
if (truePrint == true) {
  pathTotal = pathToCSS + "css/styles_print.css";
  document.write('<style type="text/css" media="screen">@import url('+pathTotal+');</style>');
}


/*window open*/

function openNewWin(file,width,height) {
var windowString = "width="+width+", height="+height+", top=100,left=100, scrollbars=yes"; 
window.open(file,"newWin",windowString);
}
/*mac*/
var platform = navigator.platform;
var macStyles = '<style type="text/css" media="screen">'
    + '@import url('+pathToCSS + 'css/styles_mac.css);'
    + '</style>';

var d = document;

function checkPlatForm() {
  if (platform == "MacPPC") {
    d.write(macStyles);  /*here Mac styles.css */
  }
}
checkPlatForm();
