document.write( '<div id="divChatVideo"></div> ');
document.write( '<scr' + 'ipt src="http://www.universityalliance.com/swfobject.js" type="text/javascript"></scr' + 'ipt>' );
document.write( '	\
	<style type="text/css">	\
		#divChatVideo{overflow:hidden;position:fixed;left:0;bottom:0;z-index:500;}	\
	</style>	\
	<!--[if gte IE 5.5]>	\
		<style type="text/css">#divChatVideo{position:absolute;bottom:auto;left:expression((0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft)) + "px");top:expression((0 - divChatVideo.offsetHeight + (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight) + (ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)) + "px");}</style>	\
	<![endif]-->	\
' );

function loadVideo() {
	if( getCookie( "video" ) != "played" ) {
		var so = new SWFObject( "../../framedchat/video.swf", "flash", "100%", "100%", "8", "#ffffff" );
		so.addParam( "wmode", "transparent" );
		so.addVariable( "vidFile", "UAVersion.flv" );
		so.addVariable( "vidW", 142 );
		so.addVariable( "vidH", 130 );
		so.write( "divChatVideo" );
		sizeVideoDiv( 142, 130 )
		document.cookie = "video=played;path=/;";
	}
}
function sizeVideoDiv( varW, varH ) {
	var myDiv = document.getElementById("divChatVideo");
	myDiv.style.width = varW + "px";
	myDiv.style.height = varH + "px";
}
function closeVideo() {
	var myDiv = document.getElementById("divChatVideo");
	myDiv.style.width = 0;
	myDiv.style.height = 0;
}
function closeChat() {
	if(top != self) top.location = self.location;
}
function getCookie( name ) {
	var result = null; 
	var myCookie = " " + document.cookie + ";";
	var searchName = " " + name + "=";
	var startOfCookie = myCookie.indexOf( searchName ); 
	var endOfCookie; 
	if ( startOfCookie != -1 ) {
		startOfCookie += searchName.length; 
		endOfCookie = myCookie.indexOf( ";", startOfCookie ); 
		result = unescape( myCookie.substring( startOfCookie, endOfCookie ) ); 
	}
	return result; 
}