var currenttime = 'April 16, 2009 15:15:48';
var serverdate=new Date(currenttime);

function padlength(what){
	var output=(what.toString().length==1)? "0"+what : what;
	return output;
}
function getClientWidth() {
	return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}

function resizeScroller() {
  	obj1=document.getElementById("div");
	obj1.style.width=700; 
}

function displaytime(){
}

window.onload=function(){
	setInterval("displaytime()", 1000);
}

function flashVersion() { 
      // Отдельно определяем Internet Explorer 
      var ua = navigator.userAgent.toLowerCase(); 
      var isIE = (ua.indexOf("msie") != -1 && ua.indexOf("opera") == -1 && ua.indexOf("webtv") == -1); 
      // Стартовые переменные 
      var version = 0; 
      var lastVersion = 10; // c запасом 
      var i; 
      if (isIE) { // browser == IE 
            try { 
                  for (i = 3; i <= lastVersion; i++) { 
                        if (eval('new ActiveXObject("ShockwaveFlash.ShockwaveFlash.'+i+'")')) { 
                              version = i; 
                        } 
                  } 
            } catch(e) {} 
      } else { // browser != IE 
            for (i = 0; i < navigator.plugins.length; i++) { 
                  if (navigator.plugins[i].name.indexOf('Flash') > -1) { 
                        version = (parseInt(navigator.plugins[i].description.charAt(16)) > version) ? parseInt(navigator.plugins[i].description.charAt(16)) : version; 
                  } 
            } 
      } 
      return version; 
}

function Slider()
{
	if(flashVersion() != 0)
	{
		var flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="220">';
		flash += '<param name="movie" value="http://www.soyuzkniga.ru/flash/swf/slider.swf" />';
		flash += '<param name="quality" value="high"/>';
		flash += '<param name="wmode" value="transparent"/>';
		flash += '<embed src="http://www.soyuzkniga.ru/flash/swf/slider.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="220"></embed></bject>';
		document.getElementById("boundry").innerHTML = flash;
	}
	else 
	{
		loadScroller(); setInterval('displaytime()', 1000); setInterval('resizeScroller()', 2000);
	}
}


