function IncludeJavaScript(jsFile)
{
  document.write('<script type="text/javascript" src="'
    + jsFile + '"></scr' + 'ipt>'); 
}

var riaUrl = "";
IncludeJavaScript(riaUrl+'js/swfobject.js');
IncludeJavaScript(riaUrl+'js/lib/prototype.js');
IncludeJavaScript(riaUrl+'js/scriptaculous/scriptaculous.js?load=effects');
IncludeJavaScript(riaUrl+'js/util.js');
IncludeJavaScript(riaUrl+'js/flashvideobox.js');
IncludeJavaScript(riaUrl+'js/framevideobox.js');

document.write('<link rel="stylesheet" href="'+riaUrl+'css/flashvideobox.css" type="text/css" />');
document.write('<link rel="stylesheet" href="'+riaUrl+'css/framevideobox.css" type="text/css" />');

//this method is called by Flash to launch a swf file in Litebox
function SWFDelegate(url,width,height) {
		var objLink = document.createElement('a');
		objLink.setAttribute('href',url);
		objLink.setAttribute('rel','videobox['+width+','+height+']');
		myFlashVideoBox.launchVideo(objLink);
}

//this method is called by Flash to launch a swf file in Litebox
function FRAMEDelegate(url, width, height) {
    var objLink = document.createElement('a');
    objLink.setAttribute('href', url);
    objLink.setAttribute('rel', 'videobox[' + width + ',' + height + ']');
    myFrameVideoBox.launchVideo(objLink);
}

function doLoading(cName) {
	document.getElementById("flashVideoContainer").className = cName;
}

function closeLiteBox() {
	//alert('close');
	myFlashVideoBox.endVideo();	
}

function doScreenCasts(url)
 {
    if (url.indexOf(".html") != -1) 
    {
        window.location.href = url;
    } 
    else 
    {
        var newURL = url.replace(".htm", ".swf");
        dcLightbox(newURL);
    } 
}

function wwwLightbox(u,w,h) {
    initFrameVideoBox();
    FRAMEDelegate(u,w,h);
}

function dcLightbox(swf) {
		initFlashVideoBox();
		doLoading("");
		//var pageTracker = _gat._getTracker("UA-1341196-1");
		SWFDelegate(swf, 640, 498);
}

function ck() {
	var d = new Date();
	var newDate = (d.getYear()+1900)+""+d.getMonth()+""+d.getDay()+"_"+d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();
	return newDate;
}


function getURLParam(strParamName){
  var strReturn = "";
  var strHref = window.location.href;
  if ( strHref.indexOf("?") > -1 ){
    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if (aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return unescape(strReturn);
} 


//Flash API Invoke methods end
function writeNoFlashMessage(lang,id){
		var str='';
			var str='';
			str+='<div id='+id+' style="text-align: center; vertical-align: middle;">';
			str+='<br\/>';
			str+='<br\/>';
			str+='<br\/>';
			str+='<br\/>';
			str+='<br\/>';
			str+='<br\/>';
			str+='<br\/>';
			str+='You must install the Flash player version 9.0.115 to view this content.';
			str+='<br\/>';
			str+='Please click <a href="http:\/\/www.adobe.com\/shockwave\/download\/download.cgi?P1_Prod_Version=ShockwaveFlash&ogn=EN_US-gntray_dl_getflashplayer" target="_blank">here<\/a>';
			str+=' to upgrade your player.';
			str+='<\/div>';
			document.write(str);	
}
