			function VideoShow(ClipID, wide, pls)
			{    
				var obj5 = document.getElementById("VideoFrame"); 
				var obj6 = document.getElementById("InVideo");
				wide = wide || 0;
				pls = pls || 0;
				/*var videoH = 0;
				var vidoeW = "640";
				if (wide) {videoH = "360";}
				else {videoH = "480";}*/
				if (wide) {var s0 = new SWFObject("http://www.ruscircus.ru/flash-video-player/TarantinovFLV2/TarantinovFLV2.swf", "n0", "640", "360", "7");}
				else {var s0 = new SWFObject("http://www.ruscircus.ru/flash-video-player/TarantinovFLV2/TarantinovFLV2.swf", "n0", "640", "480", "7");}
				/*s0.addParam("allowfullscreen","true");
				s0.addParam("allowscriptaccess","always");	
				s0.addVariable("javascriptid","n0");				
				s0.addVariable("height","360");
				s0.addVariable("width","640");
				s0.addVariable("image","http://www.ruscircus.ru/upload/shot/clip_"+ClipID+".jpg");
				s0.addVariable("searchbar","false");
				s0.addVariable("screencolor","000000");				
				s0.addVariable("overstretch","true");
				s0.addVariable("stretching","exactfit");
				s0.addVariable("logo.file","http://www.ruscircus.ru/upload/rc_logo.png");
				s0.addVariable("logo.hide","false");
				s0.addVariable("showeq","false");
				s0.addVariable("showicons","true");							
				//s0.addVariable("skin","http://www.ruscircus.ru/flash-video-player/skins/overlay/overlay.swf");
				s0.addVariable("author","ruscircus.ru");
				s0.addVariable("shownavigation","true");
				s0.addVariable("showstop","false");
				s0.addVariable("showndigits","true");
				s0.addVariable("showdownload","true");
				s0.addVariable("usefullscreen","true");
				s0.addVariable("autoscroll","false");
				s0.addVariable("displayheight","240");
				s0.addVariable("thumbsinplaylist","true");
				s0.addVariable("autostart","true");
				s0.addVariable("controlbar","over");
				s0.addVariable("bufferlength","3");
				s0.addVariable("repeat","false");
				s0.addVariable("rotatetime","5");
				s0.addVariable("shuffle","false");
				s0.addVariable("smoothing","true");
				s0.addVariable("volume","50");
				s0.addVariable("enablejs","true");
				s0.addVariable("linkfromdisplay","true");
				s0.addVariable("linktarget","_self");
				s0.addVariable("searchlink","http://search.longtail.tv/?q=");
				if (ClipID < 600)
				 {s0.addVariable("file","http://www.ruscircus.ru/upload/video/clip_"+ClipID+".flv");}
				 else {s0.addVariable("file","http://www.m01ruscircusru.511.com1.ru/upload/video/clip_"+ClipID+".flv");}
				*/
				
				if (ClipID < 600)
				 {s0.addVariable("vid","http://www.ruscircus.ru/upload/video/clip_"+ClipID+".flv");}
				 else {s0.addVariable("vid","http://www.m01ruscircusru.511.com1.ru/upload/video_28/clip_"+ClipID+".flv");}
				
				s0.addParam("quality", "high");
                s0.addParam("allowFullScreen","true");
				s0.addVariable("prev", "http://www.ruscircus.ru/upload/shot/clip_"+ClipID+".jpg");
				//s0.addVariable("conn", "local");
				s0.addVariable("auto_play", "Y");
				s0.addVariable("display", "full");
				
				/*if (ClipID > 1171 && ClipID < 1176)
				{s0.addVariable("pListLoad", "/flash-video-player/TarantinovPlaylists/test.pls");}*/
				
				if (pls != "0")
				{s0.addVariable("pListLoad", "/flash-video-player/TarantinovPlaylists/"+pls+".pls");}
				//alert("/flash-video-player/TarantinovPlaylists/"+pls+".pls");
				
				s0.write("container2");
				obj6.style.top=0;
				obj6.style.left=0;
				obj5.style.height=0;
				var Vheight=0;
				var ScrPos=0;
				var VVheight=0; //высота отображаемого окна браузера
				if (!Vheight)
				 {Vheight=document.body.scrollHeight;}//высота скролла
				if (!VVheight)
				 {VVheight=document.body.clientHeight;}//
				if (!VVheight) 
				 {VVheight=window.innerHeight;}
				if (!Vheight)	{Vheight=VVheight;}
				obj5.style.height = Vheight;
				obj5.style.width = document.body.scrollWidth;
				ScrPos = document.body.scrollTop;  //вертикальная полоса прокрутки
				if (ScrPos+(VVheight-600)/2>0)		{obj6.style.top = ScrPos+(VVheight-600)/2;} //положение окна просмотра(верх)
													else {obj6.style.top = 0;}
				obj6.style.left = 192;
				
				var wwidth=(window.innerWidth)?window.innerWidth:((document.all)?document.body.offsetWidth:null);
				var wheight=(window.innerHeight)?window.innerHeight:((document.all)?document.body.offsetHeight:null); 
				if (wide) {obj6.style.top = wheight/2 - 360/2 - 16 + ScrPos;}
				else {obj6.style.top = wheight/2 - 480/2 - 16 + ScrPos;}
				obj6.style.left = wwidth/2 - 640/2;
				obj5.style.visibility = "visible";
				obj6.style.visibility = "visible";
				showClock(ClipID);  //Увеличиваем счетчик
			} // show
			
			function VideoHide()
			{
			   var obj5 = document.getElementById("VideoFrame");
			   var obj6 = document.getElementById("InVideo");
			   s0.addVariable("vid","null");
			   s0.write("container2");			   
			   obj5.style.visibility = "hidden";
			   obj6.style.visibility = "hidden";			
			   
			}
			
function showClock(stroka) {
 
var req; 
if (window.XMLHttpRequest)  req = new XMLHttpRequest();
else if(window.ActiveXObject) 
{
    try {
        req = new ActiveXObject('Msxml2.XMLHTTP'); 
    } catch (e){}                                  
    try {                                          
        req = new ActiveXObject('Microsoft.XMLHTTP');
    } catch (e){}
}        
 
if (req) {
    req.onreadystatechange = function() {
        if (req.readyState == 4 && req.status == 200) 
        { 
		  if((req.responseText).length > 0)  //если сервер вернул результат
		  {
		  var otvet = unescape(req.responseText);		  		  
		  }		  
		}       
    }; 	
	stroka=encodeURIComponent(stroka);
    req.open("POST", 'xmlhttp.php', true);
    req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    req.send('clock='+stroka+'&ajax=1');
}
}


