function ajaxim() {

	if (typeof ajaxim._initialized == "undefined") {

		this.ims = Array();

		this.sound;
		
		this.away = false;
		this.active = true;

		this.focused = false;

		this.blinkSpeed = 1.5; // seconds

		this.lastPing = 0; // used for retrieving new events and messages.
		this.lastSend = 0; // used for away satus
		this.awayTime = 0.4; // minutes

		this.focusTime;
		
		this.minimized_height = 71;
		this.content_offset = 160;
		this.default_height = 360;
		this.default_width = 300;

		this.message_ids = new Array();
		this.event_ids = new Array();
		this.id = 0; // debug purposes

		////////////////////////////////////////////////////////////////////////////////
		// Build																																			//
		////////////////////////////////////////////////////////////////////////////////

		ajaxim.prototype.build = function() {

			this.manager = new YAHOO.widget.OverlayManager();
			this.focus_me();

			var onFocus = function() { this.focus_me(); }
			var onBlur = function() { this.focused = false; }

			YAHOO.util.Event.addFocusListener( window, onFocus, this, true );
			YAHOO.util.Event.addFocusListener( document, onFocus, this, true );
			YAHOO.util.Event.addBlurListener( window, onBlur, this, true );
			YAHOO.util.Event.addBlurListener( document, onBlur, this, true );

			this.id = Math.ceil( 100 * Math.random() );

			// show an upgrade message for ie6 and other old browsers
			this.ie_error = false;
			if (!window.XMLHttpRequest) ie_error = true;

		}

		////////////////////////////////////////////////////////////////////////////////
		// Calls To The AjaxIM Library																								//
		////////////////////////////////////////////////////////////////////////////////

		/*
			Login
		*/
		ajaxim.prototype.login = function() {
			if ( typeof( dash_loader.ajaxim.send_call ) == "undefined" ) dash_loader.ajaxim.send_call = new send_call( dash_loader.ajaxim, "ajaxim" );
			dash_loader.ajaxim.send_call.set_call( "login" );

			var pass_vars = new Array();
			pass_vars['time'] = dash_loader.ajaxim.focusTime;
			pass_vars['last_ping'] = dash_loader.ajaxim.lastPing;
			pass_vars['id'] = dash_loader.ajaxim.id;

			dash_loader.ajaxim.send_call.set_url_vars( pass_vars );
			dash_loader.ajaxim.send_call.send( dash_loader.ajax.ajax_support );
		}

		/*
			Send Instant Message
		*/
		ajaxim.prototype.send = function( sendto ) {
			if ( typeof( this.post_call ) == "undefined" ) this.post_call = new post_call( this, "ajaxim" );
			this.post_call.set_call( "im_send_"+sendto );
			this.post_call.post();
		}

		/*
			Close a conversation
		*/
		ajaxim.prototype.do_close = function( sendto ) {

			if ( typeof( dash_loader.ajaxim.send_call ) == "undefined" ) dash_loader.ajaxim.send_call = new send_call( dash_loader.ajaxim, "ajaxim" );
			dash_loader.ajaxim.send_call.set_call( "do_close" );

			var pass_vars = new Array();
			pass_vars['sendto'] = sendto;

			dash_loader.ajaxim.send_call.set_url_vars( pass_vars );
			dash_loader.ajaxim.send_call.send( dash_loader.ajax.ajax_support );
		}	

		/*
			Block Instant Messages
		*/
		ajaxim.prototype.block_user = function( user ) {
			if ( typeof( this.send_call ) == "undefined" ) this.send_call = new send_call( this, "ajaxim" );
			this.send_call.set_call( "block_user" );
			
			var pass_vars = new Array();
			pass_vars['user'] = user;

			this.send_call.set_url_vars( pass_vars );
			this.send_call.send( dash_loader.ajax.ajax_support );
		}

		/*
			Ping for messages
		*/
		ajaxim.prototype.ping = function() {

			var obj = dash_loader.ajaxim;
			if ( obj.active ) {
				if ( typeof( obj.send_call ) == 'undefined' ) obj.send_call = new send_call( obj, 'ajaxim' );
				obj.send_call.set_call( 'ping' );

				var pass_vars = new Array();
				pass_vars['away'] = obj.away;
				pass_vars['last_ping'] = obj.lastPing;
				pass_vars['id'] = obj.id;

				obj.send_call.set_url_vars( pass_vars );
				obj.send_call.send( dash_loader.ajax.ajax_support );
			}
		}

		ajaxim.prototype.report = function( message ) {
			
			var obj = dash_loader.ajaxim;
			if ( typeof( obj.send_call ) == 'undefined' ) obj.send_call = new send_call( obj, 'ajaxim' );
			obj.send_call.set_call( 'report' );

			var pass_vars = new Array();
			pass_vars['message'] = message;

			obj.send_call.set_url_vars( pass_vars );
			obj.send_call.send( dash_loader.ajax.ajax_support );
		}

		/*
			Log user out of IM when leaving page
		*/
		ajaxim.prototype.logout = function() {
			if ( typeof( this.send_call ) == 'undefined' ) this.send_call = new send_call( this, 'ajaxim' );
			this.send_call.set_call( 'logout' );
			this.send_call.send( dash_loader.ajax.ajax_support );
		}

		////////////////////////////////////////////////////////////////////////////////
		// Return Calls																																//
		////////////////////////////////////////////////////////////////////////////////

		ajaxim.prototype.return_call = function( response_text, call ) {
			switch( call ) {
			case "login":
				try {
					var r = YAHOO.lang.JSON.parse(response_text);
					this.do_login( r );
				} catch( e ) {}
				break;
			case "ping":
				try {
					var response = YAHOO.lang.JSON.parse(response_text);
					this.lastPing = response.ping_time;

					if ( response.events ) {
						for ( i in response.events ) {
							var e = response.events[i];
							this.process_event( e );
						}
					}
					
					if ( response.messages ) {
						for ( i in response.messages ) {
							this.process_message( response.messages[i] );
						}
						dash_loader.pinger.updateActivity();
					}
						
					this.checkAway();
					
				} catch ( e ) {}
				break;
			case "block_user":
				// block user should not use default return call
				break;
			case "report":
				// report should not use default return call
				break;
			case "logout":
				break;
			case "do_close":
				break;
			default: // send post call is variable.
				try {
					var m = YAHOO.lang.JSON.parse(response_text);

					if ( !m.send ) {
						switch( m.message ) {
						case "not_online":
							var message = '<font style="background-color:red;color:white;">The User Is Offline Or Switching Pages</font>';
							this.populate( m.sendto, message, "Jobvana", "", false, this.sound, !this.focused, true );
							break;
						case "too_long":
							var message = '<font style="background-color:red;color:white;">Your Message Is Too Long</font>';
							this.populate( m.sendto, message, "Jobvana", "", false, this.sound, !this.focused, true );
							break;
						}
					}
					
				} catch( e ) {}
				
			}
			
		}


		////////////////////////////////////////////////////////////////////////////////
		// Functions Used To Create The IM Window																			//
		////////////////////////////////////////////////////////////////////////////////


		/*
			Create or show IM Window
		*/
		ajaxim.prototype.newIm = function( sendto, to_name, open ) {

			this.sendto = sendto;
			this.to_name = to_name;

			if ( this.ims[this.sendto] ) {
				if ( this.is_minimized( this.sendto ) ) this.minimize( null, this.imwindow ); // unminimize if minimized
			} else {
				this.ims[this.sendto] = this.createIm();
			}

			if ( open ) {
				this.ims[this.sendto].dialog.show();
				this.ims[this.sendto].dialog.bringToTop();
			}

		}


		/*
			Create IM Window
		*/
		ajaxim.prototype.createIm = function () {

			this.imwindow = new imwindow();

			this.imwindow.sendto = this.sendto;
			this.imwindow.to_name = this.to_name;
			this.imwindow.from_name = this.from_name;
			
			this.imwindow.dialog = this.setup_dialog(); // create the dialog
			this.imwindow.editor = this.setup_editor();

			this.imwindow.dialog.focusEvent.subscribe( function() {
				if ( !this.rendered ) {
					document.getElementById( "dummy_"+this.sendto ).style.display = "none";
					this.editor.render();
					this.dialog.showEvent.subscribe(this.editor.show, this.editor, true);
					this.dialog.hideEvent.subscribe(this.editor.hide, this.editor, true);
					this.dialog.hideEvent.subscribe(this.editor.clearEditorDoc, this.editor, true );
					document.getElementById( "im_send_link_"+this.sendto ).style.display = "block";
					this.rendered = true;
				}
			}, this.imwindow, true );

			this.imwindow.dialog.render( document.body );

			this.imwindow.resize = this.setup_resize(); // resize must be setup after rendering dialog

			this.add_listeners(); // add listeners to the buttons in the dialog
			

			return this.imwindow;
		}

		/*
			Create The IM Dialog
		*/
		ajaxim.prototype.setup_dialog = function() {
			coords = this.getRandomCoords();

			var dialog = new YAHOO.widget.Dialog(
				this.sendto+"_im",
				{
					xy:coords,
					height:this.default_height+"px",
					width:this.default_width+"px",
					close:false,
					fixedcenter:false,
					zindex:2000,
					visible:false,
					underlay:"none",
					constraintoviewport:true,
					effect:[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},{effect:YAHOO.widget.ContainerEffect.SLIDE,duration:0.5}]
				}
			);

			this.manager.register( dialog );

			dialog.setHeader( this.getHeaderContent() );
			dialog.setBody( this.getBodyContent() );

			return dialog;
		}

		/*
			Make the IM Window resizeable.
		*/
		ajaxim.prototype.setup_resize = function() {

			var resize = new YAHOO.util.Resize(
				this.sendto+"_im",
				{
					handles: ['br'], // handle in bottom right corner
					autoRatio: false,
					minWidth: 300,
					minHeight: 300,
					status: false
				}
			);

			resize.on( 'resize',
				function(args) {

					var sendto = this.sendto;
					var sendbox = document.getElementById( "im_sendbox_"+sendto );

					sendbox.style.height = ( args.height - dash_loader.ajaxim.content_offset ) + "px";

					var panelHeight = args.height;
					this.dialog.cfg.setProperty("height", panelHeight + "px");
				},
				this.imwindow, true
			);

			return resize;
		}

		ajaxim.prototype.setup_editor = function() {

			var editorConfig = { 
				autoheight:true,
				focusAtStart:true,
				width:'100%',
				toolbar: {
					buttons: [
						{ group: 'textstyle',
							buttons: [
								{ type: 'push', label: 'Bold', value: 'bold' },
								{ type: 'push', label: 'Italic', value: 'italic' },
								{ type: 'push', label: 'Underline', value: 'underline' },
								{ type: 'separator' },
								{ type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true },
								{ type: 'separator' },
								{ type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
								{ type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
							]
						}
					]
				}
			};

			var editor = new YAHOO.widget.Editor( "im_input_"+this.sendto, editorConfig );

			editor.on( "beforeEditorKeyDown", this.checkSend, this.imwindow, true );
			editor.on( "editorWindowFocus", this.focus_me, this, true );

			/*this.imwindow.dialog.showEvent.subscribe(editor.show, editor, true);
			this.imwindow.dialog.hideEvent.subscribe(editor.hide, editor, true);
			this.imwindow.dialog.hideEvent.subscribe(editor.clearEditorDoc, editor, true );*/

			return editor;
		}

		/*
			Add event lisiteners to the buttons in the IM Window
		*/
		ajaxim.prototype.add_listeners = function() {
			YAHOO.util.Event.addListener( "im_close_"+this.sendto, "click", this.close_im, this.imwindow, true );
			YAHOO.util.Event.addListener( "im_minimize_"+this.sendto, "click", this.minimize, this.imwindow, true );
			YAHOO.util.Event.addListener( "im_block_"+this.sendto, "click", this.block, this.imwindow, true );
			YAHOO.util.Event.addListener( "im_settings_"+this.sendto, "click", this.settings, this.imwindow, true );
			YAHOO.util.Event.addListener( "im_send_link_"+this.sendto, "click", this.checkSend, this.imwindow, true );
		}

		////////////////////////////////////////////////////////////////////////////////
		// Callback Functions																													//
		////////////////////////////////////////////////////////////////////////////////

		/*
			Close the conversation.
		*/
		ajaxim.prototype.close_im = function() {
			dash_loader.ajaxim.do_close( this.sendto );
			this.dialog.hide();
		}

		/*
			Make current window that receives the ping call
		*/
		ajaxim.prototype.focus_me = function() {
			
			this.focusTime = getTime();
			this.active = true;
			this.cancelBlink();
			
			if ( !this.focused ) {
				this.login();
			}

			this.focused = true;
			
		}

		/*
			Callback for Minimize button
		*/
		ajaxim.prototype.minimize = function( e, imwindow ) {

			var obj = imwindow.dialog;

			var sendto = imwindow.sendto;
			var resize = YAHOO.util.Resize.getResizeById( sendto + "_im" );
			var im_body = document.getElementById( "im_body_"+sendto );

			if ( dash_loader.ajaxim.is_minimized( sendto ) ) { // maximize
				im_body.style.display = "block";
				var restoreHeight = obj.cfg.getProperty( "restoreHeight" );
				if ( !restoreHeight ) restoreHeight = dash_loader.ajaxim.default_height;
				resize.unlock();
				obj.cfg.setProperty( "height", restoreHeight );
			} else { // minimize
				var current = obj.cfg.getProperty( "height" );

				if ( obj.cfg.getProperty( "restoreHeight" ) ) obj.cfg.setProperty( "restoreHeight", current );
				else obj.cfg.addProperty( "restoreHeight", { value: current } );

				im_body.style.display = "none";

				resize.lock(); // lock the resizer
				obj.cfg.setProperty( "height", dash_loader.ajaxim.minimized_height + "px" );
			}
		}
 
		ajaxim.prototype.settings = function() {
			var header = "Change Settings";
			var confirm = "Your IM settings are availabel under Account Settings in the Admin section.  Would you like to go to your IM settings now?  This will navigate away from your current page.";

			if ( typeof( dash_loader.ajaxim.popup == "undefined" ) ) dash_loader.ajaxim.popup = new dialog();
			dash_loader.ajaxim.popup.build();

			var change_settings = function() {
				window.location = "/login/?redir=/admin-dash=useraccount_tab=imsettings";
			}
			dash_loader.ajaxim.popup.create( header, confirm, "YesNo", [ change_settings, dash_loader.ajaxim.popup.obj.hide ] );

		}

		ajaxim.prototype.block = function() {
			
			var sendto = this.sendto;
			var user = this.to_name;
			var confirm = 'Are you sure you want to block <b>' + user + '</b> from sending you instant messages?';
			var blocked = 'You have blocked <b>' + user + '</b> from sending you instant messages.<br/><a href="/login/?redir=/admin-dash=useraccount_tab=imsettings">Click Here</a> to view who is currently blocked from sending you instant messages.';
			var header = "Block User";

			if ( typeof( dash_loader.ajaxim.popup == "undefined" ) ) dash_loader.ajaxim.popup = new dialog();
			dash_loader.ajaxim.popup.build();

			var block_user = function() {
				dash_loader.ajaxim.block_user( sendto );
				dash_loader.ajaxim.ims[sendto].dialog.hide();
				dash_loader.ajaxim.popup.create( header, blocked, "Ok", [ dash_loader.ajaxim.popup.obj.hide ] );
			}
			dash_loader.ajaxim.popup.create( header, confirm, "YesNo", [ block_user, dash_loader.ajaxim.popup.obj.hide ] );
			
		}

		/*
			Callback for sending a message
		*/
		ajaxim.prototype.checkSend = function( e, obj ) {

			var doSend = false;

			if ( e.ev ) {
				if ( e.ev.keyCode == 13 && !e.ev.shiftKey ) doSend = true;
			} else {
				if ( e.type == "click" ) doSend = true;
			}

			if ( doSend ) {
				var sendto = obj.sendto
				var to_name = obj.to_name;
				var from_name = obj.from_name;
				var sound = dash_loader.ajaxim.sound;

				obj.editor.saveHTML();
				obj.editor.clearEditorDoc();
				var text_area = document.getElementById( "im_input_"+sendto );

				var message = text_area.value;
				message = message.replace( /&nbsp;/g, "" ).replace(/ /g, "" ).replace( /<br>/g, "" ); // does the message contain content?

				if ( message.length ) {
					dash_loader.ajaxim.send( sendto );
					text_area.value = ''; // clear the input box

					dash_loader.pinger.updateActivity();
					dash_loader.pinger.checkIdle();

					dash_loader.ajaxim.lastSend = getTime();
					dash_loader.ajaxim.checkAway();
				}
				
				try {
					YAHOO.util.Event.preventDefault( e.ev ); // stop event from proceeding.
				} catch ( e ) {}
				return false;
			}
		}


		////////////////////////////////////////////////////////////////////////////////
		// Helper Functions																														//
		////////////////////////////////////////////////////////////////////////////////


		ajaxim.prototype.is_minimized = function( sendto ) {
			var im_body = document.getElementById( "im_body_"+sendto );
			if ( im_body.style.display == "none" ) return true;
			return false;
		}

		ajaxim.prototype.populate = function( sendto, message, to_name, from_name, sender, sound, blink, open ) {

			if ( !open ) {
				sound = false;
				blink = false;
			}

			this.newIm( sendto, to_name, open );

			var received = document.getElementById( "im_sendbox_"+sendto );
			var name;
			var color;

			if ( sender ) {
				name = from_name;
				color = 'blue';
				if ( sound ) this.soundManager.play( "msg_in" );
			} else {
				name = to_name;
				color = 'red';
				if ( blink ) this.startBlink( to_name, message );
				if ( sound ) this.soundManager.play( "msg_out" );
			}

			received.innerHTML += '<div class="im-message"><font style="font-weight:bold;color:' + color + ';">'+name+':&nbsp;</font>'+message+'</div>';
			received.scrollTop = received.scrollHeight;
		}

		ajaxim.prototype.startBlink = function( name, message ) {
			this.cancelBlink();
			this.defaultTitle = document.title;
			obj = dash_loader.ajaxim;
			message = message.replace( /&nbsp;/g, " " ).replace( /<br>/g, "" ).replace( /'/g, "" ).replace( /"/g, "" );
			obj.blinker = setTimeout( 'obj.blink(\''+1+'\',\''+name+'\',\''+message+'\' )', this.blinkSpeed * 1000 );
		}
			

		ajaxim.prototype.blink = function( stage, name, message ) {

			obj = dash_loader.ajaxim;
			stage = parseInt( stage );

			switch( stage ) {
			case 1:
				document.title = name + "!";
				obj.blinker = setTimeout( 'obj.blink(\''+2+'\',\''+name+'\',\''+message+'\')', obj.blinkSpeed * 1000 );
				break;
			case 2:
				try {
					document.title = '"' + message.substring(0, 10) + (message.length > 10 ? '...' : '') + '"';
				} catch( e ) {} // incase there is a character that breaks it.
				obj.blinker = setTimeout( 'obj.blink(\''+3+'\',\''+name+'\',\''+message+'\')', obj.blinkSpeed * 1000 );
				break;
			case 3:
				document.title = obj.defaultTitle;
				obj.blinker = setTimeout( 'obj.blink(\''+1+'\',\''+name+'\',\''+message+'\')', obj.blinkSpeed * 1000 );
				break;
			}
			
		}

		ajaxim.prototype.cancelBlink = function() {
			try {
				if ( this.defaultTitle ) document.title = this.defaultTitle;
				clearTimeout( this.blinker );
			} catch( e ) {}
		}

		ajaxim.prototype.process_event = function( e ) {
			if ( !this.event_ids[e.id] ) {
				this.event_ids[e.id] = true;
				switch( e.type ) {
				case "focus":
					if ( this.focusTime < parseInt( e.message ) ) {
						this.active = false;
						this.stopPing();
					}
					break;
				}
			}
		}

		ajaxim.prototype.process_message = function( m ) {

			var isSender = ( m.sender == this.uid );
			var open;
			
			if ( isSender ) {
				imId = m.recipient;
				open = parseInt( m.sender_open )? true : false;
			} else {
				imId = m.sender;
				open = parseInt( m.recipient_open )? true : false;
			}

			if ( !this.message_ids[m.id] ) {
				this.populate( imId, m.message, m.sender_name, m.recipient_name, isSender, this.sound, !this.focused, open );
				this.message_ids[m.id] = true;
			}

		}

		ajaxim.prototype.checkAway = function() {
			var timeStamp = getTime() - ( this.awayTime * 1000 * 60 );

			if ( this.lastSend < timeStamp ) {
				if ( !this.away ) this.away = true;
			} else {
				if ( this.away ) this.away = false;
			}
		}

		ajaxim.prototype.getRandomCoords = function() {
			var x = YAHOO.util.Dom.getViewportWidth();
			var y = YAHOO.util.Dom.getViewportHeight();

			var rand_x = Math.ceil( ( x - this.default_width ) * Math.random() );
			var rand_y = Math.ceil( (y - this.default_height ) * Math.random() );

			return [ rand_x, rand_y ];
		}

		ajaxim.prototype.startPing = function() {
			dash_loader.pinger.updateActivity();
			dash_loader.pinger._ping.unsubscribe( this.ping );
			dash_loader.pinger._ping.subscribe( this.ping );
		}

		ajaxim.prototype.stopPing = function() {
			dash_loader.pinger._ping.unsubscribe( this.ping );
		}

		ajaxim.prototype.do_login = function( m ) {

			if ( m.login ) { // success

				this.sound = parseInt( m.sound ); // settings returned from login
				this.from_name = m.username;
				this.uid = m.uid;

				if ( typeof( this._setup ) == "undefined" ) {

					YAHOO.util.Event.addListener( window, 'unload', this.logout, this, true );

					// load files needed for the im window ( no need to load if failed login )
					YAHOO.util.Get.script( 
						[ 
							"/www/js/yui/element-min.js",
							"/www/js/yui/menu-min.js",
							"/www/js/yui/button-min.js",
							"/www/js/yui/editor-min.js",
							"/www/js/yui/resize-min.js",
							"/www/js/sm2.js"
						], 
						{
							onSuccess: function() {

								// initialize the sound manager and the sounds we will be using
								soundManager = new SoundManager();
								soundManager.onload = function() {
									soundManager.createSound({id: 'msg_in', url: '/www/sounds/msg_in.mp3', autoLoad: true});
									soundManager.createSound({id: 'msg_out', url: '/www/sounds/msg_out.mp3', autoLoad: true});
								}
								soundManager.beginDelayedInit();
								this.soundManager = soundManager;

								// are there messages to process?
								
								if ( m.ping ) {
									p = YAHOO.lang.JSON.parse( m.ping );
									if ( p.messages ) {
										this.lastPing = p.ping_time;
										for ( i in p.messages ) {
											p.messages[i].sound = 0;
											this.process_message( p.messages[i] );
										}
									}
								}

							},
							scope: this
						}
					);

					this._setup = true;
				}

				this.startPing();
				this.lastSend = getTime();
			}
		}

		////////////////////////////////////////////////////////////////////////////////
		// HTML Content																																//
		////////////////////////////////////////////////////////////////////////////////

		/*
			Get the content for the titlebar in the IM Window
		*/
		ajaxim.prototype.getHeaderContent = function() {
			var content = this.getBlockButton()+this.getSettingsButton()+'<div style="float:left;">'+this.to_name+'</div>' + this.getWindowButtons();
			return content;
		}

		/*
			Get the main body of the IM Window
		*/
		ajaxim.prototype.getBodyContent = function() {
			var content = '<div class="im-body" id="im_body_'+this.sendto+'">' + this.getReceivedBox() + this.getInputForm() + '</div>';
			return content;
		}

		ajaxim.prototype.getBlockButton = function() {
			var html = "";
			html += '<div id="im_block_'+this.sendto+'" class="im-block-button" >&nbsp;</div>';
			return html;
		}

		ajaxim.prototype.getSettingsButton = function() {
			var html = "";
			html += '<div id="im_settings_'+this.sendto+'" class="im-settings-button">&nbsp;</div>';
			return html;
		}

		ajaxim.prototype.getWindowButtons = function() {
			var html = '';
			html += '<div id="im_close_'+this.sendto+'" class="window-close-button im-window-button" >&nbsp;</div>';
			html += '<div id="im_minimize_'+this.sendto+'" class="im-minimize-button im-window-button" >&nbsp;</div>';
			return html;
		}

		ajaxim.prototype.getReceivedBox = function() {
			var html = '<div class="im-received" id="im_sendbox_'+this.sendto+'"></div>';
			return html;
		}

		ajaxim.prototype.getInputForm = function() {
			var html = '<form id="im_send_'+this.sendto+'_frm" class="yui-skin-sam" method="post" action="">';
			html += '<div id="dummy_'+this.sendto+'" style="width:100%;height:80px;border:1px solid #808080;"><font style="margin-top:3px;margin-left:3px;">Click to initialize...</font></div>';
			html += '<textarea style="visibility:hidden;height:50px;" name="message" id="im_input_'+this.sendto+'"></textarea>';
			html += '<input type="hidden" name="recipient" value="'+this.sendto+'" />';
			html += '<a style="display:none;" id="im_send_link_'+this.sendto+'" href="javascript:void(0);">Send Message</a>';
			html += '</form>';
			return html;
		}

		ajaxim._initialized = true;
	}

} // end ajaxim

function imwindow () {

	this.resize;
	this.editor;
	this.dialog;
	this.rendered;
	this.sendto;
	this.to_name;
	this.from_name;

}
