/*DesignSite.ru 2003*/

IE4=(document.all)?1:0;
NS4=(document.layers)?1:0;ver4=(NS4||IE4)?1:0;
DOM=(document.getElementById)?1:0;
var t = window.location.pathname;


function popUp(name,on){if(on){if(NS4)document.layers[name].visibility="show";else{if(IE4)document.all[name].style.visibility="visible";else document.getElementById(name).style.visibility="visible";}}else{if(NS4)document.layers[name].visibility="hide";else{if(IE4)document.all[name].style.visibility="hidden";else document.getElementById(name).style.visibility="hidden";}}}
function moveLayers(name,l,t){if(NS4){document.layers[name].left=l;document.layers[name].top=t;}else{if(IE4){document.all[name].style.pixelLeft=l;document.all[name].style.pixelTop=t;}else{document.getElementById(name).style.left=l;document.getElementById(name).style.top=t;}}}
function getScreenWidth(){return (NS4)?window.innerWidth:(document.body.clientWidth + 16);}
function getScreenHeight(){return (NS4)?window.innerHeight:(document.body.clientHeight + 16);}
function setTime(){this.Interval = setTimeout("popUp('"+this.name+"',false)",500);}
function clearTime(){clearTimeout(this.Interval);}
function objLayer(name, delta1, delta2, delta3){
this.obj = null;
this.visible = "";
this.name = name;
this.delta1 = delta1;
this.delta2 = delta2;
this.delta3 = delta3;
this.timeInterval = null;
this.init = function(){if(!this.obj)this.obj = document.getElementById(this.name).style;}
this.layerOn = function(){moveLayers(this.name,((getScreenWidth()>950)?(((getScreenWidth())/2)-this.delta1):this.delta2),this.delta3);popUp(this.name,true);this.clearTime();this.visible='visible'};
this.layerOff = function(){this.clearTime();popUp(this.name,false);this.visible='hidden'};
this.setTime = setTime;
this.clearTime = clearTime;
this.setSize = function(w,h){
	if(this.visible){
		this.obj.width=w+((!document.all)?'px;':'');
		this.obj.height=h+((!document.all)?'px;':'');
	}
}
}

var about = new objLayer('about',-295,780,89);
var service = new objLayer('service',-295,780,119);
var partners = new objLayer('partners',-295,780,149);
var allabout = new objLayer('allabout',-295,780,179);
var contacts = new objLayer('contacts',-295,780,209);

function showPicture(){eval("window.open('show.htm?"+this.name+"','pic"+this.name+"','width="+this.x+",height="+this.y+"');");}
function picture(name,x,y){this.name = name;this.x = x;this.y = y;this.showPicture = showPicture;}

function putFlash(){
    document.write('<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="552" height="55" align="absmiddle">');
    document.write('<param name="movie" value="images/top_buttons_test.swf">');
    document.write('<param name="quality" value="high">');
    document.write('<embed src="images/top_buttons_test.swf" width="552" height="55" align="absmiddle" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
    document.write('</object>');
}

