﻿// JScript File
var Prs = {

    _Last:null,
    _Length:0,
    _T:null,
    _Total:0,
    _TotalHidden:0,

    ToggleNext: function(obj,id) {
        //alert(obj);
	    if($('item_'+id).visible() == false) {
	        //Effect.Appear('item_'+id);
		  $('item_'+id).show();
	        //if(obj.className == "anchor_drop") { obj.className = "anchor_drop_up"; }
	        obj.style.color = "#000000";
	        $('paragraph_'+id).style.backgroundColor = "#f9f8f8";
	    }
	    else {
	        $('item_'+id).hide();
	        obj.style.color = "#ec1d23";
	        $('paragraph_'+id).style.backgroundColor = "#ffffff";
	    }
	}
}


function getFlashCode (url,id,w,h,bgcolor, wmode){
	if (document.all){
		bgcolor=bgcolor ? '<param name="bgColor" value="'+bgcolor+'" />' : "";
		wmode=wmode ? '<param name="wmode" value="'+wmode+'" />' : "";

		str = '<object type="application/x-shockwave-flash" \
			classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \
			codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"\
			name="' + id + '" id="' + id + '" \
			style="width:'+w+'px;height:'+h+'px;">\
			<param name="movie" value="'+url+'" />\
			<param name="allowScriptAccess" value="always" />\
			'+bgcolor+'\
			'+wmode+'\
			</object>';

	}else{
		str = '<embed swLiveConnect="true" quality=best type="application/x-shockwave-flash" menu=false  ' +
			' name="' + id + '" id="' + id + '" ' +
			' src="' + url + '" ' +
			' wmode="'+ wmode +'" ' +
			' bgcolor="' + bgcolor + '" ' +
			' width=' + w + ' height=' + h +
			' swLiveConnect=true ' +
			' allowScriptAccess="always" ' +
			' type="application/x-shockwave-flash" ' +
			' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ></embed>';


	}
	if(!window[id])window[id] = $(id);
	//alert (str);
	return str;
}


function addFlashInside (containerId, url,id,w,h,bgcolor, wmode){
	var str = getFlashCode(url,id,w,h,bgcolor, wmode);
	$(containerId).innerHTML = str;
	//$("flashadded").innerHTML = $("flashadded").innerHTML+"<br />yep";
	//alert("str");
	//document.write("<div style='display:none;' id='flashadded'>yep</div>");
}

function addFlash(url,id,w,h,bgcolor, wmode){
	var str = getFlashCode(url,id,w,h,bgcolor, wmode);

	document.write (str);
}

function viewMovie(sitePath,flv,title,linkObj){
	//alert(sitePath);
	addFlashInside ("moviePlayer", sitePath+"Resources/en-US/Flash/lightBoxPlayer.swf?file="+sitePath+flv+"&boxLabel="+title,"movieVideo",340,260,"#fff", "opaque"); 
  
   var lightboxOverlay = document.getElementById("lightbox-overlay");
	
   lightboxOverlay.style.width = document.body.offsetWidth+"px";
   lightboxOverlay.style.height = document.body.offsetHeight+50+"px";
   lightboxOverlay.style.visibility = "visible";
   
	$(document.getElementById("movieLightbox")).style.display = "block";

}

//function closeMovie(){
//    $(document.getElementById("lightbox-overlay")).style.visibility = "hidden";
//    $(document.getElementById("movieLightbox")).style.display = "none";
//    //$(document.getElementById("moviePlayer")).innerHTML = "";
//}



