var baseURL = "http://sscserver/rsfinal/SiteNovo";
//var baseURL = "http://www.right.com";

var roundOn, roundOff, roundOn_country, roundOff_country
var currentSection

roundOn = new Image();
roundOn.src = baseURL + "/_img/nav_round_on.gif";
roundOff = new Image();
roundOff.src = baseURL + "/_img/nav_round.gif";

roundOn_country = new Image();
roundOn_country.src = baseURL + "/_img/nav_round_on.gif";
roundOff_country = new Image();
roundOff_country.src = baseURL + "/_img/nav_round.gif";

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;
  var noswap = false;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) {
	id = x.name.substr(5);
	if (currentSection != id) x.src=roundOff.src;
  }
  swapCellRestore();
}

function MM_findObj(n, d) { //v4.0
  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=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n);
  return x;
}

function MM_swapImage(imgName,divName,newSrc) { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; 
  if(!x.oSrc) x.oSrc=roundOff.src; 
  x.src=roundOn.src;}

}

function swapCell(cellToSwap){
	if (document.all){
		eval("document.all." + cellToSwap + ".style.backgroundColor = '#8AB7D9'");
	}else if (document.getElementById){
		elementID = "cell" + cellToSwap.substr(2);
		element = document.getElementById(elementID);
		//element.style.backgroundColor = "#9999FF";
		element.style.backgroundColor = "#8AB7D9";
	}else{
		eval("document.layers['" + cellToSwap + "'].bgColor = '#8AB7D9'");
	}
}

function swapCellRestore(i){
	for (var i = 1; i < 7; i++){
		if (i != currentSection) {
			if (document.all){
				eval("document.all.dd" + i + ".style.backgroundColor = ''");
			}else if (document.getElementById){
				elementID = "cell" + i;
				element = document.getElementById(elementID);
				element.style.backgroundColor = "#0368A3";
			}else{
				eval("document.layers['dd" + i + "'].bgColor = '#0368A3'");
			}
		}

	}
}

function showCell(section) {
	currentSection = section.substr(2);
	imgToSwap = 'round' + currentSection;
	MM_swapImage(imgToSwap,'',roundOn.src,1);
	swapCell(section);
}

function showCell_country(section) {
	currentSection = section.substr(10);
	imgToSwap = 'round' + currentSection;
	MM_swapImage_country(imgToSwap,'',roundOn_country.src,1);
	swapCell_country(section);
}

function MM_swapImage_country(imgName,divName,newSrc) { //v3.0
  var i,j=0,x,a=MM_swapImage_country.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; 
  if(!x.oSrc) x.oSrc=roundOff_country.src; 
  x.src=roundOn_country.src;}

}

function swapCell_country(cellToSwap){
	if (document.all){
		eval("document.all." + cellToSwap + ".style.backgroundColor = '#8AB7D9'");
	}else if (document.getElementById){
		elementID = "cell" + cellToSwap.substr(2);
		element = document.getElementById(elementID);
		element.style.backgroundColor = "#8AB7D9";
	}else{
		eval("document.layers['" + cellToSwap + "'].bgColor = '#8AB7D9'");
	}
}

function showSubNav(cellToSwap){
	if (document.all){
		eval("document.all." + cellToSwap + ".style.backgroundColor = '#9999FF'");
	}else if (document.getElementById){
		elementID = "cell" + cellToSwap.substr(2);
		element = document.getElementById(elementID);
		element.style.backgroundColor = "#9999FF";
	}else{
		eval("document.layers['" + cellToSwap + "'].bgColor = '#9999FF'");
	}
}

function hideSubNav(cellToSwap){
	if (document.all){
		eval("document.all." + cellToSwap + ".style.backgroundColor = ''");
	}else if (document.getElementById){
		elementID = "cell" + cellToSwap.substr(2);
		element = document.getElementById(elementID);
		element.style.backgroundColor = "";
	}else{
		eval("document.layers['" + cellToSwap + "'].bgColor = '#0368A3'");
	}
}

