// JavaScript Document
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
function toggle(targetId) {
	if(document.getElementById){
		target=document.getElementById(targetId);
		if(target.style.display=="none") {
			target.style.display="";
		} else {
			target.style.display="none";
		}
	}
}

function hideMe(targetId) {
	if(document.getElementById){
		target=document.getElementById(targetId);
		target.style.display="none";
	}
}

function showMe(targetId) {
	if(document.getElementById){
		target=document.getElementById(targetId);
		target.style.display="";
	}
}

function classMe(targetId, classN) {
	if(document.getElementById){
		target=document.getElementById(targetId);
		target.className=classN;
	}
}

function move(fbox, tbox) {
     var arrFbox = new Array();
     var arrTbox = new Array();
     var arrLookup = new Array();
     var i;
     for(i=0; i<tbox.options.length; i++) {
          arrLookup[tbox.options[i].text] = tbox.options[i].value;
          arrTbox[i] = tbox.options[i].text;
     }
     var fLength = 0;
     var tLength = arrTbox.length
     for(i=0; i<fbox.options.length; i++) {
          arrLookup[fbox.options[i].text] = fbox.options[i].value;
          if(fbox.options[i].selected && fbox.options[i].value != "") {
               arrTbox[tLength] = fbox.options[i].text;
               tLength++;
          } else {
               arrFbox[fLength] = fbox.options[i].text;
               fLength++;
          }
     }
     arrFbox.sort();
     arrTbox.sort();
     fbox.length = 0;
     tbox.length = 0;
     var c;
     for(c=0; c<arrFbox.length; c++) {
          var no = new Option();
          no.value = arrLookup[arrFbox[c]];
          no.text = arrFbox[c];
          fbox[c] = no;
     }
     for(c=0; c<arrTbox.length; c++) {
     	var no = new Option();
     	no.value = arrLookup[arrTbox[c]];
     	no.text = arrTbox[c];
     	tbox[c] = no;
     }
}

function selectAll(box) {
     for(var i=0; i<box.length; i++) {
     box[i].selected = true;
     }
}

var plm=1;
function plusminus(targetId) {
	if(document.getElementById){
		target=document.getElementById(targetId);
		if(plm==0) {
			target.src="images/minus.png";
			plm=1;
		} else {
			target.src="images/plus.png";
			plm=0;
		}
	}
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function togglejobs(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("jobs").getElementsByTagName("div");
		if(el.style.display == "none"){
			for (var i=0; i<ar.length; i++){
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function hidetabcontents() {
	hideMe('tabcontent1');
	hideMe('tabcontent2');
	hideMe('tabcontent3');
	hideMe('tabcontent4');
	hideMe('tabcontent5');
	hideMe('tabcontent6');
	classMe('tab1', 'infotabs');
	classMe('tab2', 'infotabs');
	classMe('tab3', 'infotabs');
	classMe('tab4', 'infotabs');
	classMe('tab5', 'infotabs');
	classMe('tab6', 'infotabs');
}

function switchMe(targetId, actionerId) {
	if(document.getElementById){
		target=document.getElementById(targetId);
		actioner=document.getElementById(actionerId);
		target.style.display="block";
		actioner.className="infotabsactive";
	}
}

function RowOn(Row)
{
	Row.className='new_off_row_on';
	
}
function RowOff(Row)
{
  Row.className='new_off_row_off';
  
}
