/*


The following code is Copyright 2004 The LVRI of Los Angeles.


All rights reserved. Unauthorized use is prohibited.


*/


var is_start_script = false;


var ver_flash = false;


function showFlash(){


	if ( !arguments ) return;


	arg = new Object();


	j = 0;


	for ( i = 0; i < arguments.length; ++ i ){


		t = arguments[i].toString();


		pos = t.indexOf('=');


		if ( pos > 0 )


			arg[ t.substr( 0, pos ) ] = t.substr( pos + 1, t.length );


		else


			arg[ t ] = true;


	}


	d=document;


	m='<';


	b='>';


	if ( arg['flash'] ){


		if ( !is_start_script ){


			n=navigator;


			p=n.plugins;


			v=10;


			f=false;


			if (p){


				var fp=p['Shockwave Flash'];


				if(typeof fp=='object'){


					vv=fp.description;k=vv.indexOf('.');


					if(k)f=vv.substring(k-1,k+2);


				}                                                               


			}


			d.write(m+'SCRIPT language="VBScript"'+b+'\non error resume next \nDIM o \ni='+v+'\nf=0\nDo\nSET o = CreateObject("ShockwaveFlash.ShockwaveFlash."&i)\nIF IsObject(o) THEN \nf=i\nEND IF\ni=i-1\nLoop Until i<1 or f<>0\n'+m+'/SCRIPT'+b);


			is_start_script = true;


			ver_flash = f;


		}


		if (ver_flash){


			ver=(arg['ver']?arg['ver']:ver_flash);


			if (ver_flash>=ver){


				d.write(m+'object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver_flash+',0,0,0"'+(arg['width']?' width="'+arg['width']+'"':'')+(arg['height']?' height="'+arg['height']+'"':'')+(arg['name']?' name="'+arg['name']+'"':'')+b);


					d.write(m+'param name=movie value="'+arg['flash']+'"'+b);


					if ( arg['quality'] )


						d.write(m+'param name=quality value='+arg['quality']+b);


					d.write(m+'param name=menu value='+(arg['menu']?'true':'false')+b);


					d.write(m+'param name=loop value='+(arg['loop']?'true':'false')+b);


					if ( arg['bgcolor'] )


						d.write(m+'param name=bgcolor value='+arg['bgcolor']+b);


					d.write(m+'embed src="'+arg['flash']+'" swLiveConnect=false'+(arg['quality']?' quality='+arg['quality']:'')+(arg['menu']?' menu=true':' menu=false')+(arg['bgcolor']?' bgcolor='+arg['bgcolor']:'')+(arg['loop']?' loop=true':' loop=false')+(arg['width']?' width="'+arg['width']+'"':'')+(arg['height']?' height="'+arg['height']+'"':''));


					d.write(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"'+b);


					d.write(m+'/embed'+b);


				d.write(m+'/object'+b);





				return;


			}


		}


	}


	if (arg['image'])


		d.write(m+'img src="'+arg['image']+'" border="0"'+(arg['width']?' width="'+arg['width']+'"':'')+(arg['height']?' height="'+arg['height']+'"':'')+b);


	else


		if (arg['html'])


			d.write(arg['html']);


}


function dynamicWindow(hrefLocation) {


	var intWinHeight = 10;


	var intWinWidth = 10;


	var i = 0;


	windowReference = window.open(hrefLocation, 'newDynamicWindow', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=3, height=3');


	do {


		i += 1;


		windowReference.resizeTo(intWinWidth, intWinHeight);


		intWinHeight = intWinHeight + 10;


		intWinWidth = intWinWidth + 11;


	} while (i < 40)


}


function staticWindow(hrefLocation) {


	window.open(hrefLocation, 'newStaticWindow', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=800, height=600');


}


function showHide(menuItem) {


     var menu = document.getElementById(menuItem).style;


     menu.display = (menu.display == "none") ? "" : "none";


}