// JavaScript Document


// image rotation header


var currentBackground = 0;
var backgrounds = [];
backgrounds[0] = '../images/header_01.jpg';
backgrounds[1] = '../images/header_02.jpg';
backgrounds[2] = '../images/header_03.jpg';

function changeBackground() {
    currentBackground++;
    if(currentBackground > 2) currentBackground = 0;

    $('#header').fadeOut(1000,function() {
        $('#header').css({
            'background-image' : "url('" + backgrounds[currentBackground] + "')"
        });
        $('#header').fadeIn(1800);
    });


    setTimeout(changeBackground, 8000);
}

$(document).ready(function() {
    setTimeout(changeBackground, 7000);        
});



// open fullscreen popup

{var win= null;
function NewWindow(url,name,scroll){
  var w = (screen.width-12);
  var h = (screen.height-55);
  var settings  ='height='+h+','; 
      settings +='width='+w+',';
      settings +='top='+0+',';
      settings +='left='+0+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=no';
  win=window.open(url,name,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
 }
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// open browser window

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}



// pulldown menu

function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="_blank");
}}//-->


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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->


	
<!--
	function setPointer(theRow)
    {
        if ( typeof(theRow.style) == 'undefined' ) {
            return false;
        }
        if ( typeof(document.getElementsByTagName) != 'undefined' ) {
            var theCells = theRow.getElementsByTagName('td');
        } else if ( typeof(theRow.cells) != 'undefined' ) {
            var theCells = theRow.cells;
        } else {
            return false;
        }

        var rowCellsCnt  = theCells.length;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].style.backgroundColor = '#EFEFEF';
        }

        return true;
    }

    function unsetPointer(theRow)
    {
        if ( typeof(document.getElementsByTagName) != 'undefined' ) {
            var theCells = theRow.getElementsByTagName('td');
        } else if ( typeof(theRow.cells) != 'undefined' ) {
            var theCells = theRow.cells;
        } else {
            return false;
        }

        var rowCellsCnt  = theCells.length;
        for (var c = 0; c < rowCellsCnt; c++) {
            if ( theCells[c].className == "lightback" ) {
                theCells[c].style.backgroundColor = '#';
            } else {
                theCells[c].style.backgroundColor = '#ffffff';
            }
        }

        return true;
    }


<!--


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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
