var spinner = '<table width="100%" height="100%"><tr><td align="center" valign="middle"><img src="_images/ajax-loader-med.gif" width="32" height="32" align="absbottom"></td></tr></table>';
var ajaxBar = '<table width="100%" height="100%"><tr><td align="center" valign="middle"><img src="_images/ajax-loader-lrg.gif" align="absbottom"></td></tr></table>';
var loadbar = '<table width="55" height="55" id="loadbar"><tr><td align="center" valign="middle"><img src="_images/ajax-loader-med.gif" width="32" height="32" align="absbottom"></td></tr></table>';

function doPopup(theUrl, theFrame, w, h) {
	var canScroll = 'yes';
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+canScroll+',resizable';
	win = window.open(theUrl, theFrame, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


function capLock(e){
 kc = e.keyCode?e.keyCode:e.which;
 sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false);
 if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk))
	  return true;
 else
  return false;
}


function getFlashPlayer(swf, width, height, args) {
	if (swf && width && height) {
		if (AC_FL_RunContent == 0) {
			alert("This page requires ac.js.");
		} else {
		
		var flashSwf = '';
		var flashArgs = '';
		
		if (swf) {
			flashSwf = swf;
		}
		
		if (args) {
			flashArgs = '?'+args;
		}
		
		var foOut = AC_CUST_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', width,
			'height', height,
			'src', ''+base_url+flashSwf+flashArgs,
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'previewPlayer',
			'bgcolor', '#000000',
			'name', 'previewPlayer',
			'menu', 'true',
			'allowfullscreen', 'true',
			'allowScriptAccess','always',
			'movie', ''+base_url+flashSwf+flashArgs,
			'salign', ''
			);
		}
		return foOut;
	}
	
}