$(document).ready(init);function init(){	position()	window.onresize=function(){		position();	};}function position() {	var pagesize = getPageSize();		var arrayPageScroll = getPageScrollTop();		var target = "#swfcontent";	var minWidth = 800;	var minHeight = 450	var maxWidth = 1280;	var maxHeight = 720;		WIDTH = pagesize[0];	HEIGHT = pagesize[1];		if(WIDTH<minWidth){		WIDTH=minWidth;		pagesize[0]  = minWidth;	}	if(HEIGHT<minHeight){		HEIGHT=minHeight;		pagesize[1]  = minHeight;	}	if(WIDTH>maxWidth){		WIDTH=maxWidth;		margin_h = (pagesize[0]-WIDTH)*0.5;	}	if(HEIGHT>maxHeight){		HEIGHT=maxHeight;		margin_v = (pagesize[1]-HEIGHT)*0.5;	}	of_x_flag="visible";	if(WIDTH<minWidth || HEIGHT<minHeight){of_x_flag = "scroll";}		$(target).css({position:"absolute", width:WIDTH+"px",height:HEIGHT+"px",left: ((pagesize[0] - WIDTH)/2)+"px", top: (arrayPageScroll[1] + ((pagesize[1]-HEIGHT)/2))+"px",overflow:of_x_flag });	//$(target).css({position:"absolute", width:WIDTH+"px",height:HEIGHT+"px",left: ((pagesize[0] - WIDTH)/2)+"px", top:"0px",overflow:of_x_flag });}function getPageScrollTop(){	var yScrolltop;	if (self.pageYOffset) {		yScrolltop = self.pageYOffset;	} else if (document.documentElement && document.documentElement.scrollTop){		yScrolltop = document.documentElement.scrollTop;	} else if (document.body) {		yScrolltop = document.body.scrollTop;	}	arrayPageScroll = new Array('',yScrolltop) 	return arrayPageScroll;}function getPageSize(){	var de = document.documentElement;	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;		arrayPageSize = new Array(w,h) 	return arrayPageSize;}