var folder = "";

if (!sectioncol) {
var sectioncol = "#FF0000";
var sectioncol = "#dd3333";
}


function init() {

      settings = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true
      }

      var myBoxObject = new curvyCorners(settings, "container");
      myBoxObject.applyCornersToAll();

      
updateMenu();
gosifr();
rolloverInit();
}


function gosifr() {
if(typeof sIFR == "function"){
	//sIFR.replaceElement(named({sSelector:"ul#menulist>li", sFlashSrc:"/sifr/futura.swf", sColor:"#FF0000", sLinkColor:"#FF0000", sBgColor:"#FFFFFF", sHoverColor:"#DD0000", 	sFlashVars:"textalign=left&offsetTop=0&nPaddingBottom=0"}));
	sIFR.replaceElement(named({sSelector:"#section", sFlashSrc:"/sifr/futura.swf", sColor:sectioncol, sLinkColor:"#FF0000", sBgColor:"#FFFFFF", sHoverColor:"#DD0000", 	sFlashVars:						"textalign=left&offsetTop=0&offsetLeft=0&nPaddingLeft=0"}));
	sIFR.replaceElement(named({sSelector:"#sectionitalic", sFlashSrc:"/sifr/futuraobl.swf", sColor:sectioncol, sLinkColor:"#FF0000", sBgColor:"#FFFFFF", sHoverColor:"#DD0000", 	sFlashVars:			"textalign=left&offsetTop=0&offsetLeft=0&nPaddingLeft=0"}));	
	sIFR.replaceElement(named({sSelector:"#logo", sFlashSrc:"/sifr/futurabold.swf", sColor:"#FF0000", sLinkColor:"#FF0000", sBgColor:"#FFFFFF", sHoverColor:"#DD0000", 		sFlashVars:					"textalign=left&offsetTop=0&offsetLeft=0&nPaddingLeft=0"}));
	sIFR.replaceElement(named({sSelector:"#largelink", sFlashSrc:"/sifr/futura.swf", sColor:"#FF0000", sLinkColor:"#FF0000", sBgColor:"#FFFFFF", 	sFlashVars:					"textalign=left&offsetTop=0&nPaddingBottom=0"}));
	sIFR.replaceElement(named({sSelector:"#newsheader", 		sFlashSrc:"/sifr/futuralight.swf", 		sColor:sectioncol, sLinkColor:"#FF0000", sBgColor:"#FFFFFF", sHoverColor:"#DD0000", 	sFlashVars:	"textalign=left&offsetTop=0&offsetLeft=0&nPaddingLeft=0"}));
	sIFR.replaceElement(named({sSelector:"#newsheaderitalic", 	sFlashSrc:"/sifr/futuralightobl.swf", 	sColor:sectioncol, sLinkColor:"#FF0000", sBgColor:"#FFFFFF", sHoverColor:"#DD0000", 	sFlashVars:	"textalign=left&offsetTop=0&offsetLeft=0&nPaddingLeft=0"}));

};
}


function getFolder(){
  var url = window.location.href;
        urlarr = url.split("/");
			folder = urlarr[urlarr.length-2];
// alert(folder);
}

function updateMenu(){ //
getFolder();
var i = 0;
while(document.getElementById("menuitem" + i)) {

var menuitem = document.getElementById("menuitem" + i);

var menhref = menuitem.href;

if( (menhref.indexOf("/" + folder + "/") > -1) && (folder.indexOf("org.uk") == -1) ){

//menuitem.href = "#";
document.getElementById("menuitemimg" + i).src = "/siteimages/menu_" + (i+1) + "_current.gif";
document.getElementById("menuitemimg" + i).onmouseover = null;
document.getElementById("menuitemimg" + i).onmouseout = null;
document.getElementById("menuitemimg" + i).onImage.src = "/siteimages/menu_" + (i+1) + "_current.gif";
document.getElementById("menuitemimg" + i).offImage.src = "/siteimages/menu_" + (i+1) + "_current.gif";

//menuitem.parentNode.className = "menucurrent";
}

i++;

}
}

function updateMenuOLD(){ // this one puts a line under the current menu item
getFolder();

if ( "slivka".indexOf(folder) == -1) {
var i = 0;
while(document.getElementById("menuitem" + i)) {

var menuitem = document.getElementById("menuitem" + i);

var menhref = menuitem.href;

if(menhref.indexOf("/" + folder + "/") > -1) {
//menuitem.href = "#";
menuitem.parentNode.className = "menucurrent";
}

i++;
}
}
}








function swapimage(thisimg) {
if( typeof(thisimg) != "undefined") { im = thisimg } ;
document.getElementById('bigpic').src = "../pics/" + big[mcat][scat][im];

// caption
if( typeof( cap[mcat][scat][im] ) != "undefined" ) { 
document.getElementById('caption').innerHTML = cap[mcat][scat][im]; }
else { document.getElementById('caption').innerHTML = ""; };

// border
var i = 0;
while (document.getElementById('smallpic'+i)) {
if (i == im) document.getElementById('smallpic'+i).className = "smallpiccurrent";
else document.getElementById('smallpic'+i).className = "smallpic";
i++;
}

}

function prev(){
if( im > 0 ) {
im--;
swapimage();
}

};

function next(){
if( im < ( big[mcat][scat].length) -1 ) {
im++;
swapimage();
}

};











