//swap image functions

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; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_swapImage() { //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=x.src; x.src=a[i+2];}
}


//link on button

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


//feedback widget

function l(id){var res;if(document.getElementById) res=document.getElementById(id);if(document.all) res=document.all[id];if (res) return res.style;return null;};function a_i(a){var aux=l(a);if (aux){aux.top=205;aux.left=440;aux.visibility='visible';}};function a_o(a){var aux=l(a);if(aux) aux.visibility='hidden';};function be(o,su,i,st,p) {f('http://www.shiftboard.com/servola/tracker/tracker.cgi?feedback=1&s=45624e2913b49091&fragment=1&shiftboard=1&subject='+su+'&issue='+i+'&status='+st+'&priority='+p,'aux',o);return false;};var xmlhttp=rs_init_object();function delivery(element_id,oj,fm,em) {if(oj=='cmb'){cmb(xmlhttp.responseText,fm,em);};if(oj=='tbl'){tc(xmlhttp.responseText,element_id);};};function rs_init_object() {var A;try {A=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try {A=new ActiveXObject("Microsoft.XMLHTTP");}catch(oc) {A=null;}};if(!A && typeof XMLHttpRequest != "undefined") A = new XMLHttpRequest();if (!A) alert("You have an older browser. Unless you upgrade your brower, some features and information will be missing from your view. Needless to say: This will be a very annoying experience. Please upgrade your browser before proceeding.");return A;};function f(furl,eid,oj,fm,em) {if(oj== null){oj='tbl'};var element = document.getElementById(eid);xmlhttp.open("GET", furl);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){delivery(eid,oj,fm,em)};};xmlhttp.send(null);};function auxil(a) {f('http://www.shiftboard.com/servola/agents/feedback.cgi?'+ a + '=1&fragment=1','aux','tbl');return false;};function tc(z,c){if(z==''){document.location='http://www.shiftboard.com'}else{document.getElementById(c).innerHTML=z;}};


// script to display different questions for different registrant types

var opened ={};
function sw(tab_id){
	for(var i in opened) {
		document.getElementById(opened[i]).style.display='none';
		delete opened[opened[i]];
	}
	var cur_elem=document.getElementById(tab_id);
	cur_elem.style.display='block';
	opened[tab_id]=tab_id;
}


//popup window

function popUp(strURL,strType,strHeight,strWidth) {
    var strOptions="";
    if (strType=="console") strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;
    if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
    if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
    window.open(strURL, 'newWin', strOptions);
}


