var state="off";
	
function Preload() {
	var arImages=new Array();
	var temp = Preload.arguments; 
	for(x=0; x < temp.length; x++) {
		arImages[x]=new Image();
		arImages[x].src=Preload.arguments[x];
	}
}

function onl() {
	Preload('images/ab/1.gif','images/ab/2_a.gif','images/ab/3_a.gif','images/bn/1_a.gif','images/bn/2.gif','images/bn/3_a.gif','images/co/1_a.gif','images/co/2_a.gif','images/co/3.gif','images/ev/1_a.gif','images/ev/2.gif','images/ev/3_a.gif','images/prj/1_a.gif','images/prj/2.gif','images/prj/3_a.gif','images/prs/1_a.gif','images/prs/2.gif','images/prs/3_a.gif','images/arrow_on.gif','images/arrow_close.gif','images/arrow_close_on.gif');
	show_flash();
}

function about_load() {
	Preload('images/fon2.gif','images/logo.jpg','images/left_about.jpg','images/top_shadow.png','images/left_shadow.png','images/bottom_shadow.png');
}

function proj_load() {
	Preload('images/fon2.gif','images/logo.jpg','images/left_proj.jpg','images/top_shadow.png','images/left_shadow.png','images/bottom_shadow.png','images/more.png','images/speaker_alpha.png');
}

function project_load() {
	Preload('images/fon2.gif','images/proj_alpha.png');
}

function prs_load() {
	Preload('images/fon2.gif','images/logo.jpg','images/left2.jpg','images/top_shadow.png','images/left_shadow.png','images/bottom_shadow.png','images/more.png','images/speaker_alpha.png');
}

function ev_load() {
	Preload('images/fon2.gif','images/logo.jpg','images/left_ev.jpg','images/top_shadow.png','images/left_shadow.png','images/bottom_shadow.png','images/more.png','images/speaker_alpha.png');
}

function biz_load() {
	Preload('images/fon2.gif','images/logo.jpg','images/left_biz.jpg','images/top_shadow.png','images/left_shadow.png','images/bottom_shadow.png','images/more.png','images/speaker_alpha.png');
}

function cont_load() {
	Preload('images/fon2.gif','images/logo.jpg','images/left_cont.jpg','images/top_shadow.png','images/left_shadow.png','images/bottom_shadow.png','images/more.png');
}

function SwitchImg1()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data1;
    for (rem=0; rem < (SwitchImg1.arguments.length-2); rem+=3) {
        store = SwitchImg1.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
          switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg1.arguments[rem+2];
  } }
  document.Data1 = switcher;
} //end

function RestoreImg1()
{ //start
  if (document.Data1 != null)
    for (var rem=0; rem<(document.Data1.length-1); rem+=2)
      document.Data1[rem].src=document.Data1[rem+1];
} //end

function SwitchImg2()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data2;
    for (rem=0; rem < (SwitchImg2.arguments.length-2); rem+=3) {
        store = SwitchImg2.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
          switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg2.arguments[rem+2];
  } }
  document.Data2 = switcher;
} //end

function RestoreImg2()
{ //start
  if (document.Data2 != null)
    for (var rem=0; rem<(document.Data2.length-1); rem+=2)
      document.Data2[rem].src=document.Data2[rem+1];
} //end

function SwitchImg3()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data3;
    for (rem=0; rem < (SwitchImg3.arguments.length-2); rem+=3) {
        store = SwitchImg3.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
          switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg3.arguments[rem+2];
  } }
  document.Data3 = switcher;
} //end

function RestoreImg3()
{ //start
  if (document.Data3 != null)
    for (var rem=0; rem<(document.Data3.length-1); rem+=2)
      document.Data3[rem].src=document.Data3[rem+1];
} //end

function SwitchImg4()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data4;
    for (rem=0; rem < (SwitchImg4.arguments.length-2); rem+=3) {
        store = SwitchImg4.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
          switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg4.arguments[rem+2];
  } }
  document.Data4 = switcher;
} //end

function RestoreImg4()
{ //start
  if (document.Data4 != null)
    for (var rem=0; rem<(document.Data4.length-1); rem+=2)
      document.Data4[rem].src=document.Data4[rem+1];
} //end

function SwitchImg5()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data5;
    for (rem=0; rem < (SwitchImg5.arguments.length-2); rem+=3) {
        store = SwitchImg5.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
          switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg5.arguments[rem+2];
  } }
  document.Data5 = switcher;
} //end

function RestoreImg5()
{ //start
  if (document.Data5 != null)
    for (var rem=0; rem<(document.Data5.length-1); rem+=2)
      document.Data5[rem].src=document.Data5[rem+1];
} //end

function SwitchImg6()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data6;
    for (rem=0; rem < (SwitchImg6.arguments.length-2); rem+=3) {
        store = SwitchImg6.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
          switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg6.arguments[rem+2];
  } }
  document.Data6 = switcher;
} //end

function RestoreImg6()
{ //start
  if (document.Data6 != null)
    for (var rem=0; rem<(document.Data6.length-1); rem+=2)
      document.Data6[rem].src=document.Data6[rem+1];
} //end

//1st row
// about
function ab_over(){
	if (state == "off") {
	SwitchImg1('document.im1','document.im1','images/ab/1.gif');
	SwitchImg2('document.im2','document.im2','images/ab/2_a.gif');
	SwitchImg3('document.im3','document.im3','images/ab/3_a.gif');
}}
function ab_out(){
	if (state == "off") {
	RestoreImg1();
	RestoreImg2();
	RestoreImg3();
}}

// events
function ev_over(){
	if (state == "off") {
	SwitchImg1('document.im1','document.im1','images/ev/1_a.gif');
	SwitchImg2('document.im2','document.im2','images/ev/2.gif');
	SwitchImg3('document.im3','document.im3','images/ev/3_a.gif');
}}
function ev_out(){
	if (state == "off") {
	RestoreImg1();
	RestoreImg2();
	RestoreImg3();
}}

// projects
function prj_over(){
	if (state == "off") {
	SwitchImg1('document.im1','document.im1','images/prj/1_a.gif');
	SwitchImg2('document.im2','document.im2','images/prj/2.gif');
	SwitchImg3('document.im3','document.im3','images/prj/3_a.gif');
}}
function prj_out(){
	if (state == "off") {
	RestoreImg1();
	RestoreImg2();
	RestoreImg3();
}}

//2nd row
// press
function prs_over(){
	if (state == "off") {
	SwitchImg1('document.im1','document.im1','images/prs/1_a.gif');
	SwitchImg2('document.im2','document.im2','images/prs/2.gif');
	SwitchImg3('document.im3','document.im3','images/prs/3_a.gif');
}}
function prs_out(){
	if (state == "off") {
	RestoreImg1();
	RestoreImg2();
	RestoreImg3();
}}

// biznews
function bn_over(){
	if (state == "off") {
	SwitchImg1('document.im1','document.im1','images/bn/1_a.gif');
	SwitchImg2('document.im2','document.im2','images/bn/2.gif');
	SwitchImg3('document.im3','document.im3','images/bn/3_a.gif');
}}
function bn_out(){
	if (state == "off") {
	RestoreImg1();
	RestoreImg2();
	RestoreImg3();
}}

//3rd row
// contact
function co_over(){
	if (state == "off") {
	SwitchImg1('document.im1','document.im1','images/co/1_a.gif');
	SwitchImg2('document.im2','document.im2','images/co/2_a.gif');
	SwitchImg3('document.im3','document.im3','images/co/3.gif');
}}
function co_out(){
	if (state == "off") {
	RestoreImg1();
	RestoreImg2();
	RestoreImg3();
}}

//slide
function slide1(){
	lc = document.getElementById('leftcol');
	lcp = document.getElementById('leftcolpic');
	ne = document.getElementById('news');
	no = document.getElementById('novosti');
	ab = document.getElementById('about');
	if (width >= 1280 && height > 0) {	
		lcp.width = 85;
		lc.width = 85;
		no.style.left = 201;
		ne.style.left = 129;
		ab.style.left = 813;
		ab.style.width = 370;
		ab.style.lineHeight = '22px';
	}
}

function slide2(){
	d = document.getElementById('div_dom');
	if (width >= 1280 && height > 0) {	
		d.style.left = 85;
	}
}

function slide3(){
	co = document.getElementById('div_copy');
	if (width >= 1280 && height > 0) {	
		co.style.left = 820;
	}
}
function slide4(){
	l = document.getElementById('login_layer');
	lb = document.getElementById('login_backgr');
	cb = document.getElementById('close_button');
	if (width >= 1280 && height > 0) {	
		l.style.left = 408;
		lb.style.left = 408;
		cb.style.left = 668;
	}
}

function show_flash(){
		d = document.getElementById('div_dom');
		d.style.visibility = 'visible';
}

var disn = 0;
var disar = new Array(6)
function disa(obj){

	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) { // IE;
      if(obj.href!=""){
		disar[disn] = obj.href;
	  }
    }
    else{
      if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) // Firefox
      {
        if(obj.attributes['href']!=null){
		  disar[disn] = obj.href;
		}
      }
      else{
        if(obj.href!=""){
			disar[disn] = obj.href;
		}
	  }
    }
    obj.removeAttribute('href');
    obj.style.color="gray";

disn = disn + 1;
}

function ena(obj){
	obj.setAttribute('href', '');
	obj.href = disar[6 - disn];
disn = disn - 1;
}


function show_login(){
	l = document.getElementById('login_layer');
	lb = document.getElementById('login_backgr');
	cb = document.getElementById('close_button');
	abi = document.getElementById('ab_img_a');
	coi = document.getElementById('co_img_a');
	bn = document.getElementById('bn_img_a');
	ev = document.getElementById('ev_img_a');
	prj = document.getElementById('prj_img_a');
	prs = document.getElementById('prs_img_a');
	
		l.style.visibility = 'visible';
		lb.style.visibility = 'visible';
		cb.style.visibility = 'visible';
		
		disa(abi);
		disa(ev);
		disa(prj);
		disa(prs);
		disa(bn);
		disa(coi);
}

function hide_login(){
	l = document.getElementById('login_layer');
	lb = document.getElementById('login_backgr');
	cb = document.getElementById('close_button');
	abi = document.getElementById('ab_img_a');
	coi = document.getElementById('co_img_a');
	bn = document.getElementById('bn_img_a');
	ev = document.getElementById('ev_img_a');
	prj = document.getElementById('prj_img_a');
	prs = document.getElementById('prs_img_a');
	
		l.style.visibility = 'hidden';
		lb.style.visibility = 'hidden';
		cb.style.visibility = 'hidden';
		
		ena(abi);
		ena(ev);
		ena(prj);
		ena(prs);
		ena(bn);
		ena(coi);
}

// revert arrow
function ar_click_in(){
	SwitchImg6('document.ar','document.ar','images/arrow_close.gif');
}

function ar_click_out(){
	SwitchImg6('document.ar','document.ar','images/07.jpg');
}


// arrow
function ar_over(){
	if (state == "off") {
		SwitchImg4('document.ar','document.ar','images/arrow_on.gif');
	}
	else {
		SwitchImg5('document.ar','document.ar','images/arrow_close_on.gif');
	}
}
function ar_out(){
	if (state == "off") {
		RestoreImg4();
	}
	else {
		RestoreImg5();
	}

}
function login_off(){
	lob = document.getElementById('logb');
	p = document.getElementById('pass');
	u = document.getElementById('user');
	
		if (browser == 'opera'){lob.focus();}
		lob.blur();
		ar_click_out();
		state="off";
		ar_out();
		u.blur();
		hide_login();
		window.clearTimeout(lotout);
}
function login(){
	lob = document.getElementById('logb');
	p = document.getElementById('pass');
	u = document.getElementById('user');	

	if (state == "off") {
		ar_click_in();
		state="on";
		ar_over();
		show_login();
		lob.focus();
		lob.blur();
		u.focus();
		lotout = window.setTimeout('login_off()', 5000);
	}
	else {
		if (browser == 'opera'){lob.focus();}
		lob.blur();
		ar_click_out();
		state="off";
		ar_over();
		u.blur();
		hide_login();
		window.clearTimeout(lotout);
	}
}
function clear(){
	p = document.getElementById('pass');
	u = document.getElementById('user');	

		u.value = '';
		p.value = '';
}
function login_off2(src){
if (((src.id != 'close_button_a') && (src.id != 'close_button') && (src.id != 'ar') && (src.id != 'login_backgr') && (src.id != 'login_layer') && (src.className != 'png') && (src.className != 'inp') && (src.className != 'login_button')) || (src.id == null) || (src.id == '') || (src.tagName == 'html') || (src.tagName == 'body') || (src.tagName == 'HTML') || (src.tagName == 'BODY')){
	if (state == "on"){
		lob = document.getElementById('logb');
		if (browser == 'opera'){lob.focus();}
		lob.blur();
		ar_click_out();
		state="off";
		ar_out();
		p = document.getElementById('pass');
		u = document.getElementById('user');
		u.blur();
		hide_login();
		window.clearTimeout(lotout);
	}
}
}
function loffclick(){
	var target = event.srcElement || event.target;
	login_off2(target);
}
function nn6_loffclick(event){
	login_off2(event.target);
}

function hide_progress_bar(){
	prb = document.getElementById('progress_bar');
	prb.style.visibility = 'hidden';
	disa(prb);
}