/* "PyukiWiki" version 0.2.0-p2 $$ */
/* $Id: videoresize.js,v 1.48 2012/03/01 07:55:24 papu Exp $ */

var w=window,d=w.document,x=0,y=0,ax=0,ay=0,h=0,f=0;w.oncontextmenu=dmy;function initVideoSize(p,k,o,n){x=p;y=k;f=n;var l=p;var j=k;var e=1,g,c,m;if(l>j){g=l;c=j}else{g=j;c=l}a=g;b=c;if(ax==0&&ay==0){if(l>0&&j>0){while(e>0){if(a%b==0){e=0;m=b}else{a=a%b}if(e!=0){if(b%a==0){e=0;m=a}else{b=b%a}}}ax=l/m;ay=j/m}}if(h==0){h=o}resizeTo(x+h,y+f)}function resize(){initVideoSize(getBrowserWidth(),getBrowserHeight(),f)}function getBrowserWidth(){if(w.innerWidth){return w.innerWidth}else{if(d.documentElement&&d.documentElement.clientWidth!=0){return d.documentElement.clientWidth}else{if(d.body){return d.body.clientWidth}}}return 0}function getBrowserHeight(){if(w.innerHeight){return w.innerHeight}else{if(d.documentElement&&d.documentElement.clientHeight!=0){return d.documentElement.clientHeight}else{if(d.body){return d.body.clientHeight}}}return 0}function dmy(){return false};
