		function ScrollOutHeader(){
		//window.scrollTo(0,120);
	//	var thisHead = document.getElementById("head");
	//	thisHead.style.visibility="hidden";
		}
		

function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

function CloseWindow(layerName){
	var thisLayer = document.getElementById(layerName);
	thisLayer.style.visibility="hidden";
}
function OpenWindow(layerName){
	var thisLayer = document.getElementById(layerName);
	thisLayer.style.visibility="visible";
}
function ToggleWindow(layerName){
	var thisLayer = document.getElementById(layerName);
	if(thisLayer.style.visibility=="visible"){
		thisLayer.style.visibility="hidden";
	}
	else{
		thisLogo = document.getElementById("viewer_logo");
		thisLayer.style.visibility="visible";
		thisLayer.style.left= thisLogo.style.left;
	}
}
function Unavailable(){
alert("Functionality Available Soon");
}
function DefaultPageView(){
MakeCallback(jsCbkAction, 'cancel')

}

function ClearLoading(){
       var thisLoad = document.getElementById("cliploading");
	thisLoad.style.visibility="hidden";
       var thisDiv = document.getElementById("scrollinglist");
	thisDiv.style.visibility="visible";
}
function ClearRightLoading(){
       var thisLoad = document.getElementById("rightLoading");
	thisLoad.style.visibility="hidden";
       var thisDiv = document.getElementById("pnlClipEngagement");
	thisDiv.style.visibility="visible";
}
function StartRightLoading(){
       var thisLoad = document.getElementById("rightLoading");
	thisLoad.style.visibility="visible";
       var thisDiv = document.getElementById("pnlClipEngagement");
	thisDiv.style.visibility="hidden";
}
function ClearBigRightLoading(){
       var thisLoad = document.getElementById("rightLoading");
	thisLoad.style.visibility="hidden";
       var thisDiv = document.getElementById("pnlViewerRight");
	thisDiv.style.visibility="visible";
}
function StartBigRightLoading(){
       var thisLoad = document.getElementById("rightLoading");
	thisLoad.style.visibility="visible";
       var thisDiv = document.getElementById("pnlViewerRight");
	thisDiv.style.visibility="hidden";
}
function StartLeftLoading(){
       var thisLoad = document.getElementById("cliploading");
	thisLoad.style.visibility="visible";
       var thisDiv = document.getElementById("scrollinglist");
	thisDiv.style.visibility="hidden";
}


var Popup = {
  open: function(options)
  {
    this.options = {
      url: '#',
      width: 600,
      height: 500,
      name:"_blank",
      location:"no",
      menubar:"no",
      toolbar:"no",
      status:"yes",
      scrollbars:"yes",
      resizable:"yes",
      left:"",
      top:"",
      normal:false
    }
    Object.extend(this.options, options || {});

    if (this.options.normal){
        this.options.menubar = "yes";
        this.options.status = "yes";
        this.options.toolbar = "yes";
        this.options.location = "yes";
    }

    this.options.width = this.options.width < screen.availWidth?this.options.width:screen.availWidth;
    this.options.height=this.options.height < screen.availHeight?this.options.height:screen.availHeight;
    var openoptions = 'width='+this.options.width+',height='+this.options.height+',location='+this.options.location+',menubar='+this.options.menubar+',toolbar='+this.options.toolbar+',scrollbars='+this.options.scrollbars+',resizable='+this.options.resizable+',status='+this.options.status
    if (this.options.top!="")openoptions+=",top="+this.options.top;
    if (this.options.left!="")openoptions+=",left="+this.options.left;
    window.open(this.options.url, this.options.name,openoptions );
    return false;
  }
}

 function OnSelecting(sender, eventArgs)
            {
            MakeCallback(jsClipCallback, eventArgs.Tab.Value);
       var thisDiv = document.getElementById("scrollinglist");
	thisDiv.style.visibility="hidden";
       var thisLoad = document.getElementById("cliploading");
	thisLoad.style.visibility="visible";
    }
		function OnSelectingActions(sender, eventArgs) {
		MakeCallback(jsCbkAction, eventArgs.Tab.Value); 
		
		}
		
		function ClearSubscribeBox(){
			var subText = jstxtSubscribe.value;
			if(subText == "Sign up for updates"){
				jstxtSubscribe.value="";
			}
		}
		
function fullwin(targeturl){
window.open("POP_" + targeturl + ".aspx","", "scrollbars=yes,resizable=yes,fullscreen=yes")
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function setWindowSize( new_w, new_h )
{
	//Vars
	var old_w = this.innerWidth || document.documentElement.clientWidth || this.document.body.clientWidth;
	var old_h = this.innerHeight || document.documentElement.clientHeight || this.document.body.clientHeight;
	
	//Test width and height
	if ( !new_w )
	{
		new_w = old_w;
	} 
	if ( !new_h )
	{ 
		new_h = old_h;
	}
	new_w -= old_w;
	new_h -= old_h;
	
	//Resize various DOMs
	if ( this.innerWidth && this.innerWidth != 489 )
	{
		self.resizeBy( new_w, new_h );
	}
	else if ( document.documentElement && document.documentElement.clientWidth != 489 )
	{
		self.resizeBy( new_w, new_h );
	}
	else if ( document.body && document.body.clientWidth != 489 )
	{
		self.resizeBy( new_w, new_h );
	}		
}