//Look at the src= for this script in the current page, steal its domain and prefix to use to include our own scripts
function getVideoIncludePrefix() {
 searchString = '/video/javascripts/client_bootstrap.js';
 var scripts = document.getElementsByTagName("script");
 for (var i = 0; i < scripts.length; i++) {
 src = scripts[i].getAttribute("src");
 if (typeof(src) == "string" && src.indexOf(searchString) >= 0) {
 return src.replace(searchString, '');
 }
}
 return '';
}

video_settings_include_prefix = getVideoIncludePrefix();

function loadCssFile(name) {
 document.write('<link rel="stylesheet" href="'+video_settings_include_prefix+name+'" type="text/css" />');
}

function loadJsFile(name) {
 document.write('<script type="text/javascript" src="'+video_settings_include_prefix+name+'"></script>');
}

loadCssFile('/video/stylesheets/lightwindow.css');
loadJsFile('/video/javascripts/prototype.js');
loadJsFile('/video/javascripts/effects.js');
loadJsFile('/video/javascripts/lightwindow.js');
loadJsFile('/video/javascripts/flash_button_launcher.js');


