
// For adding video only!
// Include this JS file immediately after the SwfObject line.
// Locate or create div id="video-path", insert your path there.
// This allows them to generate as needed.
// Change **ONLY** the counter to be one MORE than total videos on the page.

window.onload=function() { attachBehaviors(); }
window.onunload=function() { 
	if (document.getElementById('progress')) {
		document.getElementById('progress').style.display='none';
		i=0; 
		if (t) { clearTimeout(t); } 
	}
};
function attachBehaviors() {
	var counter = 7;
	var vid = new Array();
	for (i=1;i<counter;i++) {
		var flname = 'flash-placeholder' + i;
		var path = 'video-path' + i;
		if (document.getElementById(flname)) {
			if (document.getElementById(path)) {
				var vid_path = document.getElementById(path).innerHTML;
				if (vid_path !='') {
					vid[i] = new SWFObject('/player.swf', 'DogrifficVideo', '278', '215', '6', '0x9f6e36'); 
					vid[i].addParam("wmode", "opaque");
					vid[i].addParam("bgcolor","000000"); // Different than bgcolor passed as variable
					vid[i].addVariable("movie",vid_path);
					vid[i].addVariable("fgcolor","0xA7d8c2");
					vid[i].addVariable("bgcolor","0x9f6e36");
					vid[i].addVariable("volume","70");
					vid[i].write(flname);
				}
			}
		}
	}
}