window.onload = function () {
	if (document.getElementById('main') && document.getElementById('side')) {
				var mineHeight = document.getElementById('main').offsetHeight;
				var sideHeight = document.getElementById('side').offsetHeight;
				if (sideHeight < mineHeight){
					document.getElementById('side').style.height = mineHeight + 'px';
				}
			}
		}
	$(document).ready(function stefanVideoTest(){
		$('a.videoPlayerPopUp').each(function(i){
			var relAttr = $(this).attr('rel').split(' ');
			relAttr[1] = (relAttr[1] > 0) ? parseInt(relAttr[1]) : 286;
			relAttr[0] = (relAttr[0] > 0) ? parseInt(relAttr[0]) : 360;
			var hrefF = '/player.php?file=' + $(this).attr('href')+'&w=' + relAttr[0] + '&h=' +relAttr[1];
			var scrTop;
			var scrLeft;
			if (window.screenLeft && window.screenTop)
			{
			 scrTop = window.screenTop;
			 scrLeft = window.screenLeft;
			} else
			{
			 scrTop = window.screenX;
			 scrLeft = window.screenY;
			}
			$(this).attr('href','');
			$(this).bind("click", function(e){
			  stopVideo();
				//window.open(hrefF,'_blank','top='+scrTop+', left='+scrLeft+', height=' +relAttr[1]+', width='+relAttr[0]+', status=no, menubar=no, resizable=no, scrollbars=no, toolbar=no, location=no, directories=no');
				window.open(hrefF,'_blank','top='+scrTop+', left='+scrLeft+', height='+relAttr[1]+', width='+relAttr[0]+', status=no, menubar=no, resizable=no, scrollbars=no, toolbar=no, location=no, directories=no');
				return false;
			});
		});
	});
	$(document).ready(function stefanVideoTest(){
		$('a.videoPlayerPopUp1').each(function(i){
			var relAttr = $(this).attr('rel').split(' ');
			relAttr[1] = (relAttr[1] > 0) ? parseInt(relAttr[1]) : 286;
			relAttr[0] = (relAttr[0] > 0) ? parseInt(relAttr[0]) : 360;
					
			var hrefF = '/player.php?file=' + $(this).attr('href');
			hrefF += (relAttr[0] > 0) ? '&w=' + parseInt(relAttr[0]) : '';
			hrefF += (relAttr[1] > 0) ? '&h=' + parseInt(relAttr[1]) : '';
			var scrTop;
			var scrLeft;
			if (window.screenLeft && window.screenTop)
			{
			 scrTop = window.screenTop;
			 scrLeft = window.screenLeft;
			} else
			{
			 scrTop = window.screenX;
			 scrLeft = window.screenY;
			}
			$(this).attr('href','');
			$(this).bind("click", function(e){
				window.open(hrefF,'_blank','top='+scrTop+', left='+scrLeft+', height=' +relAttr[1]+', width='+relAttr[0]+', status=no, menubar=no, resizable=no, scrollbars=no, toolbar=no, location=no, directories=no');
				return false;
			});
			return false;
		});
	});
	
	
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=1000,height=720,left = 178,top = 51');");
}
	