// Public variables
var userAgent = navigator.userAgent.toLowerCase();
var is_mac = (userAgent.indexOf("mac")!=-1);

function openWin(url,winId,width,height) {
	javascript:window.open(url,winId,'width='+width+',height='+height+',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no,screenX=0,screenY=0,top=0,left=0').focus();
}

function resizeFlash(idFlash, width, height, w1, h1) {
	var p_name = idFlash;
	var p_minwidth = width;
	var p_minheight = height;

	var p_width = 0;
	var p_height = 0;
	if (w1!=null && h1!=null) {
		p_width = w1;
		p_height = h1;
	} else if (self.innerWidth) {
		p_width = self.innerWidth;
		p_height = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientWidth) {
		p_width = document.documentElement.clientWidth;
		p_height = document.documentElement.clientHeight;
	} else if (document.body) {
		p_width = document.body.clientWidth;
		p_height = document.body.clientHeight;
	}
	if (w1==null && p_minwidth < p_width || p_minwidth==null) p_minwidth = "100%";
	if (h1==null && p_minheight < p_height || p_minheight==null) p_minheight = "100%";

	if (document.all && !document.getElementById) {
		document.all[idFlash].style.pixelWidth = p_minwidth;
		document.all[idFlash].style.pixelHeight = p_minheight;
	} else {
		document.getElementById(idFlash).style.width = p_minwidth;
		document.getElementById(idFlash).style.height = p_minheight;
	}
}
