﻿    function getClientWindowSize (){
	   var nav = navigator.appName;
	   if (nav != "Netscape")
	      {
	      var clientWidth = document.body.clientWidth;
	      var clientHeight = document.body.clientHeight;
	      }
	   else
	      {
	      var clientWidth = window.innerWidth;
	      var clientHeight = window.innerHeight;
	      }

   		return{windWidth: clientWidth, windHeight: clientHeight};
   }
   
function printObj(obj, r) 
{
	r = (r) ? true : false;	
	var s = "obj{";
	for (var i in obj){
		s += "\n"+'<br>' + i + "=" + obj[i] + '<br>'+"\n";
	}
	s += "}";
	if(r)
		return s;
	else alert(s);
}   
   
   
   var curPlayer;
   function watchFLV(divID, flvPath, flvJpgPath, divWidth, divHeight){
   	var divID = document.getElementById(divID);
   	 transOverId = document.getElementById('transOverLay');
   	curPlayer = new SWFObject('player.swf','mpl',divWidth,divHeight+20,'9');
	curPlayer.addParam('allowscriptaccess','always');
	curPlayer.addParam('allowfullscreen','true');
	
	curPlayer.addParam('flashvars','&file='+flvPath+'&image='+flvJpgPath+'&backcolor=999999&frontcolor=FFFFFF&lightcolor=ffffff&screencolor=000000&autostart=true');
	curPlayer.addParam('autostart','theAutostart');
	curPlayer.write(divID.id);
	divID.style.left = (Math.round(getClientWindowSize().windWidth/2) - Math.round(divWidth/2))+'px';
   	divID.style.top = (Math.round(getClientWindowSize().windHeight/2) - Math.round(divHeight/2)-100)+'px';
   	divID.style.display = 'block';
   	transOverId.style.top = '0px';
   	transOverId.style.left = '0px';
   	transOverId.style.display='block'; 
	
	}
	
    
   function removePlayer(obj,divID) {
   	divElem = document.getElementById(divID);
   	objRemove = document.getElementById(obj.getAttribute("id"));
	objRemove.parentNode.removeChild(objRemove);
	divElem.style.display="none";
}

   
  	
