/* Minneapolis Marquee*/
/* Son of Suckerfish Dropdrown */
sfHover = function() {
var sfEls = document.getElementById("indicators").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
sel = document.getElementsByTagName("select");
for (var i=0; i<sel.length; i++) {
sel[i].style.visibility = 'hidden';
}
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
sel = document.getElementsByTagName("select");
for (var i=0; i<sel.length; i++) {
sel[i].style.visibility = 'visible';
}
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

/* global.js */

/* Clear the default value of a form field */
function clearDefault(el) {
	if (el.defaultValue==el.value) {el.value = "";}
}
function restoreDefault(el) {
	if (el.value=="") {el.value = el.defaultValue;}
}

/* Open a new window using newWin handle */
/* [a href="dialog.php" onclick="NewWindow(this.href,'sponsors','300','325','no','center');return false" onFocus="this.blur()"]New window[/a]*/
var newWin=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	newWin=window.open(mypage,myname,settings);
}

/* Generic find object function from Dreamweaver */
function MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function cProp(objName,theProp,theValue) { //MM changeProp v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
	if (theValue == true || theValue == false)
	  eval("obj."+theProp+"="+theValue);
	else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/* For expanding lists in Ideas at work */

function viewToggle(off,on) {
	var hide = document.getElementById(off).style;
	var show = document.getElementById(on).style;
      hide.display = "none";
	  show.display = "inline";
}
function displayToggle(id) {
	var el = document.getElementById(id).style;
	if(el.display == "none") {
      el.display = "block";
   }
   else if(el.display == "block") {
      el.display = "none";
   }
}
function displayToggleSet() { //first arg is ID to show/hide, rest will only be hidden if not the first arg repeated
   var el,args=displayToggleSet.arguments;
   if (args.length == 0) {return false;}
   for(var i=0;i<args.length;i++){
      el=document.getElementById(args[i]).style;
      if (i==0) {
	     if(el.display == "none") {
            el.display = "block";
         }
         else if(el.display == "block") {
            el.display = "none";
         }
      }
	  else if (args[i] != args[0]) {
	     el.display = "none";
	  }
   }
}
function showDisplay(id,display) { //simple change of display passed for id
   document.getElementById(id).style.display=display;
} 
