//Javascript document
//Written by Luke Freeman

function injectVideo(videoFile) {
	if(videoFile!='null'){
		if ($('#pageheader').length != 0){
			$("#pageheader").html('<object type="application/x-shockwave-flash" data="videofiles/'+videoFile+'" width="628" height="240" ><param name="movie" value="videofiles/'+videoFile+'" /><param name="wmode" value="opaque" /></object>');
		} else {
			Shadowbox.open({ content: 'http://'+location.host+'/includes/videoPopup.php?q='+videoFile, player:'iframe', height:'240', width:'628' });
		}
	}
}

function openWebinar(videoFile) {
	window.open('http://'+location.host+'/flash/'+videoFile);	
}

function getPDF(pdfFile) {
	if(pdfFile!='null') {
		window.open('http://'+location.host+'/pdf/'+pdfFile);	
	}
}

function getPresentation(file) {
	if(file!='null') {
		window.open('http://'+location.host+'/presentations/'+file);	
	}
}

function getDemo(file) {
	if(file!='null') {
		window.open('http://'+location.host+'/flash/'+file);	
	}
}