//Browser detection, based on DOM
var hide = "hidden";var show = "visible";    //if IE                                      
			IE = true;
			NS = false;
			NS6 = false;
			
if(document.getElementById&&!document.all){  //if NS6
			NS6 = true;
			IE = false;
			} 		
else if(document.layers){   				//if NS4
			NS = true;
			IE = false;
			var hide = "hiden";var show = "show";
			}

function sirinaProzora() {
  if (IE)
    return document.body.clientWidth;
  if (NS4||NS6)
    return window.innerWidth;
	}

//Layer manipulation

var visibleLyr=0;				// keeps information about visible layer
// First, we'll made browser compliant objects, which we'll use to manipulate with layers.
var popUp = new Array();  //place were we keep browser compliant layer object								

function layPre(){	
	if (IE){                                  
		for (i=0;i<sloj.length;i++) {   
			 popUp[i] = eval('document.all.'+sloj[i]+'.style');
			 						}
			}		
	else if(NS6){
			for (i=0;i<sloj.length;i++) {
	 		popUp[i] = eval("document.getElementById('"+sloj[i]+"').style");
										}
		}
	else{													//NS4
		for (i=0;i<sloj.length;i++) {
	 		popUp[i] = document.eval(sloj[i]);
										}
			}
		}
		
//then we'll write a function to manipulate layers
function showRepro(){ //makes layer visible
	popUp[1].visibility=show;
	popUp[0].visibility=hide;
		}

function hideLyr(){ popUp[1].visibility=hide;popUp[0].visibility=hide; } //makes layer hidden		

function showProiz(){ //makes layer visible
	popUp[1].visibility=hide;
	popUp[0].visibility=show;
		}

function setLay(){
	levaStrana=sirinaProzora()/2-350;
	popUp[0].left=levaStrana;
	popUp[1].left=levaStrana+72;
	}
	
function resize(){
	if(IE||NS6) setLay();
	else history.go(0);
	}
	
