jQuery(document).ready(function(){
	var error=false;
	var errorType="";
	/* cookies validation */
	jQuery.cookie('testcookiesenabled', 'enabled');
	if (!jQuery.cookie('testcookiesenabled')){
		error=true;
		errorType="cookies";
	}		
	else {
		/* browser validation */
		jQuery("#browser-data").append("<b>"+jQuery.client.browser + " " + jQuery.client.browserversion+"</b>");
		if ( jQuery.client.browser=="Explorer" && jQuery.client.browserversion < 7 || 
			 jQuery.client.browser=="Firefox" && jQuery.client.browserversion < 3  ||
			 jQuery.client.browser=="Chrome" && jQuery.client.browserversion < 6 ||
			 jQuery.client.browser=="Safari" && jQuery.client.browserversion < 4 ) {
			error=true;
			errorType="browser";
		}
	}
	/* browser validation */
	if (error)
		jQuery("#"+errorType).removeAttr("style");
	else
		jQuery("#grid").removeAttr("style");
});
var messages=new Array(); // regular array (add an optional integer
messages[0]="<strong>General Tab</strong><br/> This section is for adding information needed to schedule a videoconference.";
messages[1]="<strong>Conference</strong><br/>Enter basic conference details. The information in the name field will be the information users will see on the auto attendant screen.";       // argument to control array's size)
messages[2]="<strong>Sites</strong><br/>Specify the number of video and audio ports to reserve.";
messages[3]="<strong>Security</strong><br/>Provides a level of security to conference access.";
messages[4]="<strong>Description</strong><br/>Additional information about the conference, which may be of value to users joining conferences.";
messages[5]="<strong>Reoccurrence</strong><br/>If this conference is to repeat, please set the values at which intervals it will reoccur. Maximum number of reoccurrences is 32.";
messages[6]="<strong>Recording</strong><br/>Select this option if you would like this conference to be recorded. You can select the full conference or any times between the time selected for the scheduled conference.";
messages[7]="<strong>Streaming</strong><br/>Select this option if you would like to have your conference available to people in a view only mode through streaming.";
messages[8]="<strong>Primary Use</strong><br/>Select the primary purpose for this conference.";
messages[9]="<strong>Invitees</strong><br/>Use this section to manage conference invitations to your participants.";
messages[10]="<strong>Delegates</strong><br/>This section allows you to delegate conference administration to other people.";
messages[11]="<strong>Files</strong><br/>Upload files related to the conference, and allow people to download them individually or as a single zip file.";
messages[12]="<strong>Video</strong><br/>This section will display video for conferences that have had streaming enabled or that have been selected to be recorded.";
messages[13]="<strong>Video</strong><br/>If streaming was enabled on the conference; viewers can select the viewer or can copy the URL and paste into an individual player.";
messages[14]="<strong>Chat</strong><br/>People who are watching the stream can use this feature to communicate with each other.";
messages[15]="<strong>Controls</strong><br/>This section gives you the ability to manage your conference once the conference has begun.";
messages[16]="<strong>Layouts</strong><br/>Select custom layouts to use for all conference participants.";
messages[17]="<strong>Layout Controls</strong><br/>Allow or prevent participants from changing their own view layout from their endpoint.";
messages[18]="<strong>Group Message</strong><br/>Send messages to all participants in a conference simultaneously.";
messages[19]="<strong>Dial Endpoint</strong><br/>Enter a CalREN, GDS, or IP address to dial an endpoint.";
messages[21]="Maximum limit of video sites reached.";
messages[22]="A listing of available documents for this conference.";
messages[23]="<strong>Conference Archive</strong><br/>Right-click and select <strong>Save As</strong> to download conference. Enter username <strong>download</strong> without a password.<br /><br /><strong>Note:</strong> Recordings will be available for 2 weeks after the end of the conference after which they are subject to deletion.";
function applyTheme(selector){	
	if (selector==null)
		selector = "select:not(.uniformed), input:text:not(.uniformed), input:password:not(.uniformed), input:checkbox:not(.uniformed), input:radio:not(.uniformed), textarea:not(.uniformed)"; 
	jQuery(selector).uniform();
	updateTheme();
}
function updateTheme(selector){
	if (selector==null)
		selector=".uniformed";
	jQuery.uniform.update(selector);
	setTimeout( focusLogin, 500);
}
function focusLogin(){
	if( (jQuery("form#login-form").attr("name") == 'login-form') ) {
		if (jQuery.cookie('username')) 
			jQuery("#password").focus();
		else
			jQuery("#username").focus();
	}
}
