/********************************************************

   Break out of frames

 ********************************************************/



if (top.location != location) {

  top.location.href = document.location.href ;

}







/********************************************************

   Dynamic Menu

 ********************************************************/



// create the later that slides on page scroll

function initStatLyr() {

  // args: id, left, top, w, h, duration of glide to location onscroll, acceleration factor

  // acceleration factor should be -1 to 1. -1 is full deceleration

  var statLyr = new Glider("menu",560, 0,null,null,750,-1);

  statLyr.show();

}





function writeCSS(){

  document.write('<style type="text/css">');

  document.write('.pictures img { filter: alpha(opacity=25); }');

  document.write('.pictures a:hover img { filter: alpha(opacity=80); }');  

  document.write('ul.portfolio li a img { filter: alpha(opacity=45);}');

  document.write('ul.portfolio li a:hover img { filter: alpha(opacity=99);}');

  document.write('textarea { scrollbar-track-color: #252525; scrollbar-face-color: #252525; scrollbar-arrow-color: #FDFAEB; scrollbar-3dlight-color: #252525; scrollbar-highlight-color: #252525; scrollbar-shadow-color: #252525; scrollbar-darkshadow-color: #252525; }');

  document.write('</style>');

}








/********************************************************

   Centered, popup window

 ********************************************************/



function popupCenter(url, width, height, opt){

  var top = (screen.height/2)-(height/2);

  var left = (screen.width/2)-(width/2);

  var features = 'height='+height+',width='+width+',top='+top+',left='+left+',scrollbars=' + opt;

  theWin = window.open(url,'',features);

}





/********************************************************

   Dynamically fills remaining page height

 ********************************************************/



function setDynProp(id, footerId){

  var px = window.opera ? 0: "px";

  var el = document.getElementById(id);

  var footer = document.getElementById(footerId);

  

  if(el && footer){    

    var winHt = getWindowHeight();

    var prop = winHt - (footer.offsetTop + footer.offsetHeight);

    el.style.height = prop + px;    

  }

}



/********************************************************

   Returns the browser's window height

 ********************************************************/

 

function getWindowHeight() {

  var winHt = 0;



  if (window.innerHeight)

    winHt = window.innerHeight - 10;

  else if (document.documentElement && document.documentElement.clientHeight)

    winHt = document.documentElement.clientHeight;

  else if (document.body && document.body.clientHeight)

    winHt = document.body.clientHeight;



  return winHt;

}



function getCopyrightYear() {

  var date = new Date();

  document.write(date.getFullYear());

}