function onFlashClickPopup(cts_idx,playTime) {
	try {
		var windowW = 475;
		var windowH = 365;
		var left = Math.ceil( (window.screen.width  - windowW) / 2 );
		var top = Math.ceil( (window.screen.height - windowH) / 2 );
			
		var playTime, cts_idx;
		var pageURI = "http://www.vercoop.com/popup/3screenWebplayer?cts_idx="+cts_idx+"&playTime="+playTime;
		window.open(pageURI,'_blank','top='+top+',left='+left+',width='+windowW+',height='+windowH+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	} catch (e) {
	}
}

function onFlashClickPopupEx(code, widget, width, height, params) {
	try {
		var left = Math.ceil((window.screen.width - width)/2);
		var top  = Math.ceil((window.screen.height - height)/2);
	
		params = escape(params);
	
		var url = "http://www.vercoop.com/external_api/popup_auto_widget.html?code="+code+"&widgetId="+widget+"&width="+width+"&height="+height+"&size="+width+"x"+height+"&params="+params;
		window.open(url,'_blank','top='+top+',left='+left+',width='+ width +',height='+ height +',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	} catch (e) {
	}
}

function onFlashClickPopupEx2(code, widget, width, height, params) {
	try {
		var left = Math.ceil((window.screen.width - width)/2);
		var top  = Math.ceil((window.screen.height - height)/2);
	
		params = escape(params);
	
		var url = "http://www.vercoop.com/external_api/popup_auto_widget2.html?code="+code+"&widgetId="+widget+"&width="+width+"&height="+height+"&size="+width+"x"+height+"&params="+params;
		window.open(url,'_blank','top='+top+',left='+left+',width='+ width +',height='+ height +',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	} catch (e) {
	}
}

function getFlashObject(id) {
	try {
		var flash = null;
		if (navigator.appName == "Netscape") {
			flash = document[id];
		} else if (navigator.appName == "Microsoft Internet Explorer") {
			flash = window[id];
		}
	} catch (e) {
	}
	return flash;
}

function vcWidgetResize(id, width, height) {
	try {
		var flash = getFlashObject(id);
		flash.width = width;
		flash.height = height;
		
		fsCommand(id, "resize", "");
	} catch (e) {
	}
}

function fsCommand(id, cmd, param) {
	try {
		var flash = getFlashObject(id);
		flash.fsCommand(cmd, param);
	} catch (e) {
	}
}
