/* <![CDATA[ */
//Insert values
  var picwidth = 1280;
  var picheight = 720;
  var pagemargin = 200;
//No user parts below this line
  var picratio = picheight / picwidth;
  var neededwidth = picwidth + pagemargin;
  var myWidth = 0;
//Calculate user window size
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
//Output adjusted size and percentage of original
if (myWidth < neededwidth) {
	webcamwidth = (myWidth - pagemargin);
	webcamheight = Math.round(webcamwidth * picratio);
	webcamsize = Math.round((webcamwidth / picwidth) * 100);
}  else {
	webcamwidth = picwidth;
	webcamheight = picheight;
	webcamsize = 100;
}
/* ]]> */