function sendEvent(swf,typ,prm) { 
	// we do get ccvideo for value of swf
	thisMovie(swf).sendEvent(typ,prm); 
}
function getUpdate(typ,pr1,pr2,swf) {
	if(typ=='state') {
		return pr1;
	}
}
function thisMovie(movieName) {
	// we do get ccvideo for value of movieName
    if(navigator.appName.indexOf("Microsoft") != -1) {
    	// correctly identified as IE
		return window[movieName];
	} else {
		// correctly identified as not IE
		return document[movieName];
	}
}
function positionSetHMS(hour,min,sec) {
	// turn hour, min, sec into seconds
	var allsec = hour*3600 + min*60 + sec;
	// tell the video to scrub to position 'allsec'
	sendEvent('ccvideo','scrub',allsec);
}
// This function is SPECIFIC to City Council Videos
function createPlayer(theFile) {
	var so = new SWFObject('http://69.164.254.208/councilvideos/5-4-2009/includes/mediaplayer.swf','ccvideo','352','240','8');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','false');
	so.addVariable('height','240');
	so.addVariable('width','352');
	so.addVariable('file','http://69.164.254.208/councilvideos/5-4-2009/flvs/'+theFile);
	so.addVariable('id','ccvideo');
	so.addVariable('bufferlength','8');
	so.addVariable('javascriptid','ccvideo');
	so.addVariable('searchbar','false');
	so.addVariable('enablejs','true');
	so.write('player');
}
// NOTE we may want to pass variables to createPlayer after we get this worked out.
// For now, hard codeing 2008 and video file name
// This function is generic
// flvpath is '/video/whatever/whatever/blah.flv'
function createPlayerOther(flvpath) {
	var so = new SWFObject('http://69.164.254.208/councilvideos/5-4-2009/includes/mediaplayer.swf','ccvideo','352','240','10');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addVariable('height','240');
	so.addVariable('width','352');
	so.addVariable('file','http://69.164.254.208/councilvideos/5-4-2009/flvs/5-4-2009.flv');
	so.addVariable('id','ccvideo');
	so.addVariable('bufferlength','10');
	so.addVariable('javascriptid','ccvideo');
	so.addVariable('searchbar','true');
	so.addVariable('enablejs','true');
	so.write('player');
}
