/*
** 站点浏览器辅助脚本
** 作者： Molay
** 版本： 1.0
** 修改时间： 2007-09-20
** 版权所有： Vnice's Group, Inc.
*/
/********** 实用功能函数部分 **********/
// 最低播放器版本
var FLASH_REQUIRE_VERSION = 9;
// 创建FLASH对象
function createFlash(id, url, name, width, height) {
	var version = deconcept.SWFObjectUtil.getPlayerVersion();
	if (document.getElementById(id) && version["major"] > 0) {
		var so = new SWFObject(url, name, width, height, "9", "#FFFFFF");
		so.addParam("scale", "noscale");
		so.addParam("quality", "high");
		so.addParam("wmode", "transparent");
		//so.addParam("wmode", "opaque");
		so.addParam("allowScriptAccess", "always");
		so.addParam("allowFullScreen", "true");
		so.addParam("menu", "false");
		so.write(id);
	}
}
// 返回当前页的准确高宽
function getPageSize(){
	var xScroll, yScroll;
	if(window.innerHeight && window.scrollMaxY){
	xScroll = document.body.scrollWidth;
	yScroll = window.innerHeight + window.scrollMaxY;
	}else if(document.body.scrollHeight > document.body.offsetHeight){
		// all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	}else{
		// Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if(self.innerHeight){
		// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	}else if(document.documentElement && document.documentElement.clientHeight){
		// Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	}else if(document.body){
		// other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else {
		pageHeight = yScroll;
	}
	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
	return arrayPageSize;
}
// 简单的弹出新窗口
function showPage(url){
	var para="height=400, width=700, top=0, left=0, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes";
	var name="mySystem";
	open_window(url, name, para);
}
function open_window(url, name, para) {
	window.open(url, name, para);
}
// 重定向页面
function gotoURL(url) {
	window.location.href = url;
}
// 范围取值
function clamp(min, n, max) {
	if (n<min) {
		return min;
	}
	if (n>max) {
		return max;
	}
	return n;
}
// 自定义圆整
function roundoff(n, base) {
	
}