

///////////////////////////////////////////////////
//////////////    INCLUDE    //////////////////////
///////////////////////////////////////////////////

function include(id, url) {
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id + 
   "passed to include." +
   "You need a div or span element " +
   "with this id in your page.");
  return;
 }
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Sorry, your browser does not support " +
      "XMLHTTPRequest objects. This page requires " +
      "Internet Explorer 5 or better for Windows, " +
      "or Firefox for any system, or Safari. Other " +
      "compatible browsers may also exist.";
  }
}






///////////////////////////////////////////////////
//////////////    DROPMENU   //////////////////////
///////////////////////////////////////////////////





var timerID=null;

function timer_start(){

timerID= setTimeout('removeLayers()',500);

}

function timer_clear(){

clearTimeout(timerID);

}

allTimer = null;
 function imageswap(name,src){
 eval("document."+name+".src = '"+src+"'");
 
 }
function removeLayers() {

  if (!removedLayers) {
    FS_showHideLayers('Aboutus','','hide','Privates','','hide','Companies','','hide','Probanking','','hide');
  
  
  }
  removedLayers = true;

}

function FS_swapImgRestore() { //v3.0
  var i,x,a=document.FS_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

var PimagesS = new Array ('images/menu/h-on-s.gif', 'images/menu/eng-on.gif', 'images/menu/a-on-s.gif', 'images/menu/p-on-s.gif', 'images/menu/c-on-s.gif', 'images/menu/pb-on-s.gif', 'images/menu/pl-on-s.gif', 'images/menu/sc-on-s.gif', 'images/menu/ct-on-s.gif', 'images/menu/sm-on-s.gif');

function FS_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.FS_p) d.FS_p=new Array();
    var i,j=d.FS_p.length,a=FS_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.FS_p[j]=new Image; d.FS_p[j++].src=a[i];}}
}

/*function FS_preloadImagesE() { //v3.0
  var d=document; if(d.images){ if(!d.FS_p) d.FS_p=new Array();
    var i,j=d.FS_p.length,a=FS_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.FS_p[j]=new Image; d.FS_p[j++].src=a[i];}}
}*/

function FS_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=FS_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function FS_swapImage() { //v3.0
  var i,j=0,x,a=FS_swapImage.arguments; document.FS_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=FS_findObj(a[i]))!=null){document.FS_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var removedLayers = false;
if (document.layers) {
window.captureEvents(Event.MOUSEMOVE);
}

function FS_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.FS_pgW=innerWidth; document.FS_pgH=innerHeight; onresize=FS_reloadPage; }}
  else if (innerWidth!=document.FS_pgW || innerHeight!=document.FS_pgH) location.reload();
}
FS_reloadPage(true);


function FS_showHideLayers() { //v3.0
  var i,p,v,obj,args=FS_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=FS_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
	removedLayers = false;
}

var Xpos = 1;
var Ypos = 1;

if (document.all) {

  function MoveHandler(){
    Xpos = document.body.scrollLeft + event.x;
    Ypos = document.body.scrollTop + event.y;
	
	if (!(Xpos>350 && Ypos>100 && Xpos < 850 && Ypos < 550)) removeLayers();
  }

}
else if (document.layers) {
 
  function xMoveHandler(evnt) {
    Xpos = evnt.pageX;
    Ypos = evnt.pageY;
	if (!(Xpos>350 && Ypos>100 && Xpos <850 && Ypos < 550)) removeLayers();
  }
  window.onMouseMove = xMoveHandler;
}
else {
   
	function MoveHandler(anEvent){
    Xpos = anEvent.clientX;
    Ypos = anEvent.clientY;
	if (!(Xpos>350 && Ypos>100&& Xpos < 850 && Ypos < 550)) removeLayers();
  }

}




///////////////////////////////////////////////////
//////////////  RANDOM PICS     //////////////////////
///////////////////////////////////////////////////

var random = Math.random() ;
var picnum = Math.round(random*3)+1;


///////////////////////////////////////////////////
//////////////  PRELOAD PAGE     //////////////////////
///////////////////////////////////////////////////

function waitPreloadPage() { //DOM
if (document.getElementById){
document.getElementById('prepage').style.visibility='hidden';
}else{
if (document.layers){ //NS4
document.prepage.visibility = 'hidden';
}
else { //IE4
document.all.prepage.style.visibility = 'hidden';
}
}
}
 
  

///////////////////////////////////////////////////
//////////////  DETERMINE PAGE + LANGUAGE    //////////////////////
///////////////////////////////////////////////////

var sPath = window.location.pathname;
//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
//alert(sPage);


/*var partupdate = sPage.split("_");
//document.write(partupdate[0]);
//document.write(sPage);


if ((lang == ("english")) &&  !(partupdate[0] == ("about")) && !(sPage == ("private_pricelist.html")) && !(sPage == ("saving_conditions.html")) && !(sPage == ("contact.html")) ){ document.write('<meta http-equiv="refresh" content="0;URL=update.html">');}*/

if (lang == ("srpski")){
var part1 = sPage.split("_s.html");
var page = part1[0]+(".html");
} else { 
var part1 = sPage.split(".html");
var page = part1[0]+("_s.html");}


///////////////////////////////////////////////////
//////////////  POP-UP       //////////////////////
///////////////////////////////////////////////////

//function openNewWindow(URLtoOpen, windowName, windowFeatures) {
//newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

function popuppic(URL) { 
     window.open( "inc/popuppic.html?../"+URL, "",  
     "resizable=0,HEIGHT=300,WIDTH=300"); 
   }
   
function popup(URL,unknown,properties) {
window.open(URL, "", properties);
}
///////////////////////////////////////////////////
//////////////  DETERMINE BROWSER      //////////////////////
///////////////////////////////////////////////////

/*function browser() {
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("opera") != -1) return 'Opera';
if (agt.indexOf("staroffice") != -1) return 'Star Office';
if (agt.indexOf("webtv") != -1) return 'WebTV';
if (agt.indexOf("beonex") != -1) return 'Beonex';
if (agt.indexOf("chimera") != -1) return 'Chimera';
if (agt.indexOf("netpositive") != -1) return 'NetPositive';
if (agt.indexOf("phoenix") != -1) return 'Phoenix';
if (agt.indexOf("firefox") != -1) return 'Firefox';
if (agt.indexOf("safari") != -1) return 'Safari';
if (agt.indexOf("skipstone") != -1) return 'SkipStone';
if (agt.indexOf("msie") != -1) return 'Internet Explorer';
if (agt.indexOf("netscape") != -1) return 'Netscape';
if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
if (agt.indexOf('\/') != -1) {
if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
return navigator.userAgent.substr(0,agt.indexOf('\/'));}
else return 'Netscape';} else if (agt.indexOf(' ') != -1)
return navigator.userAgent.substr(0,agt.indexOf(' '));
else return navigator.userAgent;
}
var browser = browser();
if (browser == ('Firefox') && lang == ('srpski') && sPage != ('index_s.html')){
document.write('<style>#Probanking{ left: 636px; position: absolute; top: 121px; visibility: hidden; z-index: 1 }</style>');}
else if (browser == ('Firefox') && lang == ('english') && sPage != ('index_s.html')) {document.write('<style>#Probanking{ left: 667px; position: absolute; top: 121px; visibility: hidden; z-index: 1 }</style>');}*/



///////////////////////////////////////////////////
//////////////  DETERMINE VARPAGE TO INCLUDE      //////////////////////
///////////////////////////////////////////////////



<!-- hide from old browsers

function getValue(varname)
{
  // First, we load the URL into a variable
  var url = window.location.href+"?dummy";

  // Next, split the url by the ?
  var qparts = url.split("?");

  // Check that there is a querystring, return "" if not
  if (qparts.length == 0)
  {
    return "";
  }

  // Initialize the value with "" as default
  var value = "";
  var parts = qparts[1].split("=");
  value = parts[1];

  
  // Convert escape code
  value = unescape(value);

  // Convert "+"s to " "s
  value.replace(/\+/g," ");

  // Return the value
  return value;
}

// end hide -->


<!-- hide
var strana = getValue("strana");
if ((strana == 'undefined') && (lang == 'srpski')){ 
strana = "s.html"; } else if ((strana == 'undefined') && (lang == 'english')) {strana = "e.html";}

// end hide -->